File: //opt/OV/man/man1/ovpolicy.1
.\"Generated by nroff_template.wdt (12-Sep-06). Do NOT edit this output file. Instead, edit the source FM+SGML file.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH ovpolicy "" "" ""
.ds )H Hewlett-Packard Company
.ds ]L
.ds ]W June 2007
.SH NAME
ovpolicy - installs, manages, and removes both local and remote policies.
.SH "SYNOPSIS"
.PP
ovpolicy -help
.PP
ovpolicy -version
.PP
ovpolicy -install [-host <hostname> [-targetid [<\fIid\fR>]...] {-enabled|-disabled} -chkvers -add-category [<\fIcat1\fR>]... {-remove-category [<\fIcat\fR>]... |-remove-all-categories} -force-cat -add-attribute [<\fIname\fR> <\fIvalue\fR>]... -remove-attribute [<\fIname\fR> <\fIvalue\fR>]...| -remove-all-attributes -force-attr -set-owner <\fIowner\fR> -force-owner -no-notify] {-file [<\fIfile\fR>]...|-dir [<\fIdir\fR>]...} [-ovrg <\fIov_res_group\fR>]
.PP
ovpolicy -remove [-no-notify -host <\fIhostname\fR> [-targetid [<\fIid\fR>]...] [-ovrg <\fIov_res_group\fR>] <\fISELECTION\fR>
.PP
ovpolicy [-enable |-disable] [-no-notify -host <\fIhostname\fR> [-targetid [<\fIid\fR>]...] [-ovrg <\fIov_res_group\fR>] <\fISELECTION\fR>
.PP
ovpolicy [-addcategory |-removecategory] <\fIcat\fR>... [-no-notify -host <\fIhostname\fR> [-targetid [<\fIid\fR>] [-ovrg <\fIov_res_group\fR>]] <\fISELECTION\fR>
.PP
ovpolicy -removeallcategories [<\fIcat\fR>]... [-no-notify -host <\fIhostname\fR> [-targetid [<\fIid\fR>]...] [-ovrg <\fIov_res_group\fR>]] <\fISELECTION\fR>
.PP
ovpolicy [-addattribute |-removeattribute] <\fIname\fR> <\fIvalue\fR>... [-no-notify -host <\fIhostname\fR> [-targetid [<\fIid\fR>]...][-ovrg <\fIov_res_group\fR>]] <\fISELECTION\fR>
.PP
ovpolicy -removeallattributes [-no-notify -host <\fIhostname\fR> [-targetid [<\fIid\fR>]...][-ovrg <\fIov_res_group\fR>]] <\fISELECTION\fR>
.PP
ovpolicy [-setowner | -removeowner <\fIowner\fR>] [-no-notify -host <\fIhostname\fR> [-targetid [<\fIid\fR>]...][-ovrg <\fIov_res_group\fR>]] <\fISELECTION\fR>
.PP
ovpolicy -notify [-host <\fIhostname\fR> [-targetid [<\fIid\fR>]...][-ovrg <\fIov_res_group\fR>]]
.PP
ovpolicy -list [-level <0|1|2|3|4> -host <\fIhostname\fR> [-targetid [<\fIid\fR>]...][-ovrg <\fIov_res_group\fR>]]
.SH "DESCRIPTION"
.LP
ovpolicy installs, 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. Policies can be deployed to managed systems, providing consistent, automated administration across the network. Policies can be grouped 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.
.LP
You use ovpolicy to, among other functions, install, remove, enable, and disable local policies. For information about the parameters supported by the ovpolicy command, see "Parameters": for information about parameter options, see "Options".
.Sh "Parameters"
.LP
ovpolicy recognizes the following parameters:
.TP
-install
Installs one or more policies using a single policy file specified with -file or multiple policy files specified with -dir.
.TP
-remove
Removes one or more policies.
.TP
-enable
Enables one or more policies.
.TP
-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.
.TP
-addcategory
Adds all category strings to the policy. You can add multiple categories using a blank-separated list.
.TP
-removecategory
Removes the specified category strings from the policy. You can remove multiple categories using a blank-separated list.
.TP
-removeallcategories
Deletes \fIall\fR categories.
.TP
-addattribute
Adds a category attribute to the policy. You can add multiple attribute names using a blank-separated list.
.TP
-removeattribute
Removes category attribute from the policy. You can remove multiple attribute names using a blank-separated list.
.TP
-removeallattributes
Deletes \fIall\fR category attributes.
.TP
-setowner
Sets the owner of a policy.
.TP
-removeowner
Removes the owner of a policy.
.TP
-list
Lists the installed policies.
.TP
-notify
Triggers any notifications to the OpenView control service, if there are any outstanding or suppressed notifications from previous policy operations.
.TP
-version
Displays the version number of the command.
.TP
-h | -help
Displays the help information.
.Sh "Options"
.LP
You can use the following options with the allowed ovpolicy command parameters:
.TP
-add-attribute
Add an attribute \fI<name>\fR with the value defined in \fI<value>\fR to the specified installed policy.
.TP
-add-category \fI<cat1>\fR [\fI<cat2> ... <catN>\fR]
Adds all category strings to the policy. This is a blank-separated list.
.TP
-chkvers
Check and compares the version of the already installed policy and the policy you want to install. If -chkvers is used, the new policy is not installed if the current installed version is the same or higher. If -chkvers is not used, the new policy overwrites the current policy with the same policy_id, regardless of the version number. -chkvers does not overwrite the categories, owner, or status of a current policy. To overwrite the categories, owner, and status associated with a policy owner, use -forcecat, and -forceowner respectively.
.TP
-dir <\fIdirname>\fR
If you specify a directory name, all policy files from that directory are used. A line is printed to stdout for each successfully installed policy.
.TP
-enabled|-disabled
If either -enabled or -disabled is used, the new policy acquires the status that is defined in the policy header. If neither -enabled nor -displayed is used, 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. So, if the new policy is already installed on the target system, the new version assumes the status of the installed version.
.TP
-file \fI<filename>\fR
Specifies a policy file name to be used. A line is printed to stdout for the successfully installed policy.
.TP
-force-attr
Allows 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.
.TP
-force-cat
Allows 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.
.TP
-force-owner
Overwrites the policy owner regardless of the settings for the installed policy.
.TP
-host <\fIhostname\fR> [-targetid <\fIids\fR>]
This option specifies the hostname of the managed node. If no hostname is specified, the local host is assumed. -targetid specifies one or more target IDs.
.TP
-level
Specifies the type of information to be returned with the -list parameter, as follows:
.RS 5
.TP
0
Policy type, policy name, status, policy version. This is the default setting.
.TP
1
Policy type, policy name, status, policy version, policy_ID.
.TP
2
Policy type, policy name, status, policy version, policy_ID, category.
.TP
3
Policy type, policy name, status, policy version, policy_ID, category, owner.
.TP
4
Policy type, policy name, status, policy version, policy_ID, category, owner, attributes.
.RS -5
.TP
-no-notify
When -no-notify is used, ovpolicy does not trigger any notifications.
.TP
-remove-category \fI<cat1>\fR [\fI<cat2> ... <catN>\fR]
Removes the specified category strings from the policy. Using the -remove-category option with an empty string deletes \fIall\fR categories. This is a blank-separated list.
.TP
-remove-all-categories
Removes the specified category strings from the policy.
.TP
-remove-attribute
Remove the category attribute \fI<name>\fR with the value defined in \fI<value>\fR from the specified installed policy.
.TP
-remove-all-attributes
Allows you to remove \fIall\fR 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.
.TP
-set-owner <\fIowner\fR>
Sets the owner of a policy. -set-owner with an empty string deletes the owner.
.TP
-ovrg <\fIovrg_res_group\fR>
Sets the name of the OpenView resource group.
.LP
The \fI<SELECTION>\fR option is one of the following:
.LP
<\fISELECTION\fR>-all|-owner <\fIowner\fR>|-owner <\fIowner\fR> -polname <\fIname\fR>|-polid <\fIuuid\fR> |-polname <[\fItype\fR:]\fIname\fR>|-poltype <\fItypename\fR>|-category <\fIcategory>\fR |-attribute <\fIname\fR> [value]
.TP
-all
All installed policies.
.TP
-owner \fI<owner>\fR
The policy owner \fI<owner>\fR
.TP
-owner \fI<owner> -polname <\fR\fIname>\fR
The policy owner \fI<owner>\fR and the policy name -owner \fI<\fR\fIname>\fR
.TP
-polid \fI<id>\fR
The ID of the policy.
.TP
-polname [\fI<policy_type_name>\fR:]<\fIpolicy name>\fR
The name of the policy. If \fIpolicy_type_name\fR is used, the section applies to all policies of the specified type.
.TP
-poltype \fI<policy_type_name>\fR
The name of the type of policy.
.TP
-category \fI<category_name>\fR
The name of the category to be used.
.TP
-attribute \fI<name>\fR \fI<value>\fR
The name of the policy attribute and value to be used.
.Sh "Return Codes"
.LP
ovpolicy recognizes the following return codes:
.TP
0
All steps were successful.
.TP
1
One or more steps were not successful.
.SH "AUTHOR"
.LP
ovpolicy was developed by Hewlett-Packard Company.
.SH "EXAMPLES"
.LP
The following examples show you how to use the ovpolicy command:
.TP 3
\(bu
To list all policies on a node.
ovpolicy -list
.TP
\(bu
To disable the HP-UX syslog policy.
ovpolicy -disable -polname "HPUX ovsyslog"
.TP
\(bu
To enable all trap policies.
ovpolicy -enable -poltype ovsnmptrap
.TP
\(bu
To install all policies located in the current working directory.
ovpolicy -install -dir *
.TP
\(bu
To install all policies located in the /tmp/sap_policies directory with a status of disabled.
ovpolicy -install -disable -dir /tmp/sap_policies
.TP
\(bu
To reinstall all policies located in the /tmp/xyz directory, independent of the former owner.
ovpolicy -install -forceowner -dir /tmp/xyz
.TP
\(bu
To remove all policies from the local host.
ovpolicy -remove -all
.TP
\(bu
To remove all installed policies that are owned by the management server
ovpolicy -remove -owner mgtsvr
.LP