Changing an existing Policy Type object
You can change an existing Policy Type object by changing the general properties, script, category, or icon. The general properties include the name, display name, and description. The Policy Type objects are located under Configuration/Server Configuration/Policy Types in the Active Roles console.
The following table summarizes the changes you can make to an existing Policy Type object, assuming that you have found the object in the Active Roles console.
Table 50: Changing an existing Policy Type object
Name of the object |
Right-click the object and click Rename. |
The name is used to identify the object, and must be unique among the objects held in the same Policy Type container. |
Display name or description |
Right-click the object, click Properties and make the necessary changes on the General tab. |
Changing the display name or description also changes the policy name or description on the page for selecting a policy in the Policy Object management wizards. |
Script Module |
Right-click the object, click Properties, click the Script tab, click Browse, and then select the Script Module you want. |
You can change the script in the Script Module that is currently associated with the Policy Type object instead of selecting a different Script Module. To view or change the script, find and select the Script Module in the Active Roles console tree, under Configuration/Script Modules.
Changing the script affects all the existing policies of this policy type. If you add a policy to a Policy Object and then change the script for the Policy Type object based on which the policy was created, the policy will run the changed script. |
Policy Type category |
Right-click the object, click Properties, click the Script tab, and then click either Provisioning or Deprovisioning. |
Changing this option changes the appearance of the respective policy type in the Policy Object management wizards. For example, once the option has been changed from Provisioning to Deprovisioning, the policy type is no longer displayed in the wizard for configuring a provisioning Policy Object; instead, it appears in the wizard for configuring a deprovisioning Policy Object.
However, changing the Policy Type category does not affect the existing policies of this policy type. For example, once a policy is added to a provisioning Policy Object, the policy is retained in that Policy Object after changing the Policy Type category from Provisioning to Deprovisioning in the respective Policy Type object. |
Function to declare parameters |
Right-click the object, click Properties, click the Script tab, and then choose the appropriate function from the Function to declare parameters list. |
Changing this setting changes the list of the policy parameters specific to this policy type. The changes do not affect the parameters of the existing policies of this type. When you add a new policy based on this policy type, the list of the policy parameters is built using the new function to declare parameters. |
Policy Type icon |
Right-click the object, click Properties, click the Script tab, click Policy Type Icon, and then do one of the following:
- Click Change and open an icon file containing the image you want.
- Click Use Default Icon to revert to the default image.
|
Changing this setting changes the image that appears next to the display name of the policy type in the Policy Object management wizards, on the page that prompts you to select a policy to configure. |
Using Policy Type containers
You can use a Policy Type container to store related Policy Type objects and other Policy Type containers.
Containers give you an additional way to categorize custom policy types, making it easier to locate and select the policy to configure in the wizards for managing Policy Objects. Thus, when you create a Policy Object, the wizard page that prompts you to select a policy displays the custom policy types along with the containers that hold the respective Policy Type objects.
To create a new Policy Type container
- In the console tree, under Configuration/Server Configuration/Policy Types, right-click the Policy Type container in which you want to create a new container, and select New | Policy Type Container.
For example, if you want to create a new container in the root container, right-click Policy Types.
- In the New Object - Policy Type Container wizard, type a name and, optionally, a description for the new container.
The name and description are displayed on the page for selecting a policy, in the wizards that are used to configure Policy Objects.
- Click Next and follow the steps in the wizard to complete the creation of the new container.
Exporting policy types
You can export Policy Type objects so that the definition of the policy types is stored in an XML file that can be imported in a different Active Roles environment. Exporting and then importing Policy Type objects make it easy to distribute custom policies to other environments.
To export a Policy Type object or container
- Right-click the Policy Type object or container, click Export and specify a file to hold the export data.
You can select multiple Policy Objects to export, or you can select a container to export all Policy Type objects and containers held in that container. In either case, the Export operation creates a single XML file that can later be imported to any container under the Policy Types node.
Exporting Policy Type objects creates an XML file representing both the objects and the Script Modules containing the policy scripts for each policy type being exported. During an import, Active Roles creates the Policy Type objects and the Script Modules based on the data found in the XML file. As a result of the import, the policy types are replicated to the new environment and can be used the same way as in the environment from which they were exported.
Importing policy types
You can import the exported Policy Type objects and containers, which will add them to a Policy Type container and allow you to configure and use policies defined by those Policy Type objects. All the data required to deploy the policy types is represented in an XML file. To see an example of the XML document that represents a policy type, export a Policy Type object and view the saved XML file.
To import the exported Policy Type objects and containers
- In the Active Roles console tree, under Configuration/Server Configuration/Policy Types, right-click the Policy Type container in which you want to import the Policy Type objects and containers.
- Click Import Policy Types, and then open the export data file you want to import.
This will create new Policy Type objects and containers in the selected container. In addition, new Script Modules will be created in the Configuration/Script Modules container and associated with the newly created Policy Type objects.