Develop > Command-Line Interfaces > opr-assign Command-Line Interface

opr-assign Command-Line Interface

The opr-assign command-line interface enables you to create, update, list, delete, disable and enable management template and aspect (automatic) assignments. You can create assignments for the latest version of an aspect or management template, or you can create an assignment for a specific aspect or management template version. Additionally, you can create automatic assignment rules by specifying the view name and management template or aspect ID.

Location

<OMi_HOME>/opr/bin/opr-assign.[bat|sh]

Synopsis

opr-assign -help|-version|<CONNECTION_INFO>|<operation>

Options

Usage

Use opr-assign, opr-config-tool and opr-template together for an end-to-end CLI policy management workflow. For details, see Policy Management CLI workflows.

Restrictions

Non-admin users also need the following file permissions to operate this command-line tool:

File Windows Permissions Linux Permissions
<OMi_HOME>/conf/TopazInfra.ini read r
<OMi_HOME>/log/opr-clis.log full control rw

<OMi_HOME>/log/opr-pgctl.log

Note: This file is not available on gateway server systems.
full control rw
<OMi_HOME>/conf/encryption.properties read r
<OMi_HOME>/conf/seed.properties read r

Examples

  • List all assignments:

    opr-assign -list_assignment

  • List all auto assignment rules:

    opr-assign -list_auto_assignment_rule

  • Create an assignment for an aspect version for a specific CI:

    opr-assign -create_assignment_by_aspect_version -id <Aspect Version ID> -ci_id <CI ID>

  • Delete a specific assignment:

    opr-assign -delete_assignment -id <Assignment ID>