Name

nnmmanagementmode.ovpl — Change the NNM management mode of one or more nodes or interfaces.

SYNOPSIS

nnmmanagementmode.ovpl -node.name <nodename> -mode <mode>

nnmmanagementmode.ovpl -t <object type> -f <csv_filename>

nnmmanagementmode.ovpl -t <object type> -s <csv_line>

nnmmanagementmode.ovpl -t <object type> -f <uuid_file> -mode <MODE_SPEC> [-format <format>] [-fields <fields>]

DESCRIPTION

nnmmanagementmode.ovpl allows the system administrator to set the management mode of a node or interface in the NNM database.

Parameters

nnmmanagementmode.ovpl recognizes the following options. Any unrecognized options are reported by a usage message.

-h

Prints the usage statement.

-node.name <nodename>

The name of a node to change management mode on.

-mode <mode>

The desired management mode to set. Valid values are MANAGED, NOTMANAGED, or OUTOFSERVICE for nodes and INHERITED, NOTMANAGED or OUTOFSERVICE for interfaces

-mode <MODE_SPEC>

When using the input uuid file to perform a batch change the mode argument accepts two styles. The first is a simple mode with values of MANAGED, NOTMANAGED, or OUTOFSERVICE (INHERITED, NOTMANAGED or OUTOFSERVICE for interfaces). The second style consists of a current and new mode in the form CURRENT:NEW where CURRENT and NEW have the same values of MANAGED, NOTMANAGED, or OUTOFSERVICE. In the second form the tool will only update objects that have the supplied current value and skip any that have a different value.

-t <object type>

Supply the object type to set the management mode on. Valid values are "node" or "interface".

-f <csv_filename>

Supply the CSV file name (with path, e.g. /opt/tmp/mynodes.csv) from where you want to set the management mode. If the file contains incorrect entries (too many/few columns, incorrect mode) the command will report these but will not execute any of the entries.

-b <batch_size>

If the input comes from a file, the command will process all entries and send the request to the server in chunks specified by this option. The default is 1000 entries at a time.

-s <csv_line>

Supply a single CSV formatted line. Eliminates the need to create a file for a simple change.

-format (csv|list|text|xml)

Changes the output format when tabular data is being presented.

-fields <comma_separated_fields>

Selects the output fields when tabular data is being presented.

-jndiHost <hostname>

The server jndi host; the default is localhost.

-jndiPort <port>

The server jndi port; the default is auto-detected.

-u <username>

Supply the NNMi administrator username to run the script. This script requires the NNMi administrator username unless you use an nnm.properties file. See the nnm.properties.4 reference page for more information.

-p <password>

Supply the NNMi administrator password to run the script. This script requires the NNMi administrator password unless you use an nnm.properties file. See the nnm.properties.4 reference page for more information.

Batch changing management modes

To perform a batch change of management modes the following command may be used. Input to this command is from a file containing the UUIDs of the objects to update and the mode supplied on the command line. All objects listed in the file will be processed according to the supplied mode.

nnmmanagementmode.ovpl -t <type> -f <filepath> -mode <MODE_SPEC>

In this mode the command output will consist of a table of the input UUIDs and the result code for that object. The result codes are:

  • UPDATED - The object has been updated to the new mode.

  • NOT_FOUND - No object with the specified UUID was found in the system.

  • SKIPPED - The object did not match the current mode filter.

  • NO_CHANGE - The object already has the requested mode.

  • ACCESS_DENIED - The user does not have permission to change the management mode for the object.

For example if the neighbors.txt file contains a list of interface UUIDs each on a single line then the following command would change each of those interfaces to the OUTOFSERVICE mode only if it was currently INHERITED. Interfaces in the UNMANAGED mode would be left unchanged.

nnmmanagementmode.ovpl -t interface -f neighbors.txt -mode INHERITED:OUTOFSERVICE

+--------------------------------------+---------+
| UUID                                 | State   |
+--------------------------------------+---------+
| 6f988a0f-c759-42d0-8e99-f3adce84fdd7 | UPDATED |
| 4dd87c33-9d0d-4713-b484-68c964ede6a6 | UPDATED |
| bc0af80f-d729-40d6-bb2f-ad8bd68e2deb | SKIPPED |
| bed3fff5-2385-4b09-9e3a-2572caaa624d | UPDATED |
| bd0723c0-6c53-47b1-ac13-41ecab16994e | UPDATED |
+--------------------------------------+---------+

Syntax of Comma Separated File for node management mode

The CSV file you supply must have the following syntax for setting management mode on nodes.

Empty lines are ignored.

Lines that begin with the # character are ignored.

All columns are mandatory

  • Column 1(A) : Node DNS|IP Address

    Specify the DNS name of the node OR the IP address. The search algorithm is as follows:

    • find a node that has a matching management ip address
    • find a node that has a matching ip address in the default domain
    • find a node that has a matching host name
    • find a node that has a matching name

  • Column 2(B) : Management mode

    The mode to set the node to. Valid values are "MANAGED", "NOTMANAGED", or "OUTOFSERVICE"

Example lines:

192.168.1.1,OUTOFSERVICE

my.fqdn.com, MANAGED

Syntax of Comma Separated File for interface management mode

The CSV file you supply must have the following syntax for setting management mode on interfaces.

Empty lines are ignored.

Lines that begin with the # character are ignored.

All columns are mandatory

  • Column 1(A) : Node DNS|IP Address

    Specify the DNS name of the node OR the IP address. The search algorithm is the same as specified above.

  • Column 2(B) : Interface id

    Interface Id Specify the identifier of the interface on the node specified in the previous field. The search algorithm is as follows:

    • ifIndex
    • ifName
    • ifAlias
    • ifDescription

  • Column 3(C) : Mode

    The management mode to set the interface to. Valid entries are "INHERITED", "NOTMANAGED", or "OUTOFSERVICE"

Example lines:

192.168.1.1,1,OUTOFSERVICE

my.fqdn.com, myAlias, MANAGED

RETURN VALUE

nnmmanagementmode.ovpl exits with the status 0 (zero) if no errors were encountered, 1 otherwise.

AUTHOR

nnmmanagementmode.ovpl was developed by Hewlett Packard Enterprise.

EXTERNAL INFLUENCES

Environmental Variables

Return to Reference Pages Index