HP Operations Manager for Windows

ovpolicy


NAME

ovpolicy

- manage and remove local and remote policies.

SYNOPSIS

ovpolicy -help 
ovpolicy -version 
Note NOTE:
HPOM for Windows does not support the manual installation of policies.
ovpolicy -remove [-no-notify -host <hostname> [-targetid [<id>]...] [-ovrg <ov_res_group>] <SELECTION> 
ovpolicy [-enable |-disable] [-no-notify -host <hostname> [-targetid [<id>]...] [-ovrg <ov_res_group>] <SELECTION> 
ovpolicy [-addcategory |-removecategory] <cat>... [-no-notify -host <hostname> [-targetid [<id>] [-ovrg <ov_res_group>]] <SELECTION> 
ovpolicy -removeallcategories [<cat>]... [-no-notify -host <hostname> [-targetid [<id>]...] [-ovrg <ov_res_group>]] <SELECTION> 
ovpolicy [-addattribute |-removeattribute] <name> <value>... [-no-notify -host <hostname> [-targetid [<id>]...][-ovrg <ov_res_group>]] <SELECTION> 
ovpolicy -removeallattributes [-no-notify -host <hostname> [-targetid [<id>]...][-ovrg <ov_res_group>]] <SELECTION> 
ovpolicy [-setowner | -removeowner <owner>] [-no-notify -host <hostname> [-targetid [<id>]...][-ovrg <ov_res_group>]] <SELECTION> 
ovpolicy -notify [-host <hostname> [-targetid [<id>]...][-ovrg <ov_res_group>]] 
ovpolicy -list [-level <0|1|2|3|4> -host <hostname> [-targetid [<id>]...][-ovrg <ov_res_group>]] 

DESCRIPTION

ovpolicy manages and removes local and remote policies. A policy is a set of one or more specifications rules and other information that help automate network, system, service, and process management. You can deploy policies to managed systems, providing consistent, automated administration across the network. You can group policies into categories (for example, to assign policies to a special policy group for simple enable and disable actions). Each category can have one or more policies. Policies can also have one or more attributes, an attribute being a name-value pair.

You can use ovpolicy to remove, enable, and disable local policies, as well as perform other functions. For information about the parameters supported by the ovpolicy command, see "Parameters." For information about parameter options, see "Options."

Parameters

ovpolicy recognizes the following parameters:

-remove
Removes one or more policies.

-enable
Enables one or more policies.

-disable
Disables one or more policies. Note that the -disable option only disables a policy, it does not remove a policy from the file system.

-addcategory
Adds all category strings to the policy. You can add multiple categories using a blank-separated list.

-removecategory
Removes the specified category strings from the policy. You can remove multiple categories using a blank-separated list.

-removeallcategories
Deletes all categories.

-addattribute
Adds a category attribute to the policy. You can add multiple attribute names using a blank-separated list.

-removeattribute
Removes category attribute from the policy. You can remove multiple attribute names using a blank-separated list.

-removeallattributes
Deletes all category attributes.

-setowner
Sets the owner of a policy.

-removeowner
Removes the owner of a policy.

-list
Lists the installed policies.

-notify
Triggers any notifications to the HP Operations control service, if there are any outstanding or suppressed notifications from previous policy operations.

-version
Displays the version number of the command.

-h | -help
Displays the help information.

Options

You can use the following options with the allowed ovpolicy command parameters:

-add-attribute
Adds an attribute <name> with the value defined in <value> to the specified installed policy.

-add-category <cat1> [<cat2> ... <catN>]
Adds all category strings to the policy. This is a blank-separated list.

-enabled|-disabled
If you use -enabled or -disabled, the new policy acquires the status that is defined in the policy header. If you do not use -enabled or -displayed, the new policy acquires the status of the currently installed policy (if any).

Note that this option overwrites the status defined in the policy-header installation file. If the new policy is already installed on the target system, the new version assumes the status of the installed version.

-file <filename>
Specifies a policy file name to be used. A line is printed to stdout for the successfully installed policy.

-force-attr
Enables you to remove category attributes that are set on a current installed policy. By default, the attributes from current installed policies are used. If there is no current installed policy, the attributes set in the header file of the new policy are used.

-force-cat
Enables you to remove categories that are set on a current installed policy. By default, the categories from current installed policies are used. If there is no current installed policy, the categories set in the header file of the new policy are used.

-force-owner
Overwrites the policy owner regardless of the settings for the installed policy.

-host <hostname> [-targetid <ids>]
Specifies the hostname of the managed node. If no hostname is specified, the local host is assumed. -targetid specifies one or more target IDs.

-level
Specifies the type of information to be returned with the -list parameter, as follows:
0
Policy type, policy name, status, policy version. This is the default setting.

1
Policy type, policy name, status, policy version, policy_ID.

2
Policy type, policy name, status, policy version, policy_ID, category.

3
Policy type, policy name, status, policy version, policy_ID, category, owner.

4
Policy type, policy name, status, policy version, policy_ID, category, owner, attributes.
-no-notify
If you use -no-notify, ovpolicy does not trigger any notifications.

-remove-category <cat1> [<cat2> ... <catN>]
Removes the specified category strings from the policy. Using the -remove-category option with an empty string deletes all categories. This is a blank-separated list.

-remove-all-categories
Removes the specified category strings from the policy.

-remove-attribute
Remove the category attribute <name> with the value defined in <value> from the specified installed policy.

-remove-all-attributes
Allows you to remove all category attributes that are set on a current installed policy. If there is no current installed policy, the attributes set in the header file of the new policy are used.

-set-owner <owner>
Sets the owner of a policy. Using -set-owner with an empty string deletes the owner.

-ovrg <ovrg_res_group>
Sets the name of the HPOM Resource Group.

The <SELECTION> option is one of the following:

<SELECTION>-all|-owner <owner>|-owner <owner> -polname <name>|-polid <uuid> |-polname <[type:]name>|-poltype <typename>|-category <category> |-attribute <name> [value]

-all
All installed policies.

-owner <owner>
Policy owner <owner>.

-owner <owner> -polname <name>.
Policy owner <owner> and the policy name -owner <name>.

-polid <id>
ID of the policy.

-polname [<policy_type_name>:]<policy name>
Name of the policy. If you use policy_type_name, the section applies to all policies of the specified type.

-poltype <policy_type_name>
Name of the type of policy.

-category <category_name>
Name of the category to be used.

-attribute <name> <value>
Name of the policy attribute and value to be used.

Return Codes

ovpolicy recognizes the following return codes:

0
All steps were successful.

1
One or more steps were not successful.

AUTHOR

ovpolicy was developed by Hewlett-Packard Company.

EXAMPLES

The following examples show you how to use the ovpolicy command: