Keyword enumeration and setting: oaminfo

oaminfo displays and sets keyword information for NMS OAM managed objects. Use oaminfo to perform the following tasks:

Usage

oaminfo [options]

where options are:

Option

Description

-n name

Specifies the name of managed object.

-b boardno

Specifies the board number. Can be used instead of -n option. Default = 0.

-k keyword

Specifies the keyword name. If unspecified, shows all keywords.

-f field

Specifies the desired field within keyword name keyword.

-i index

Specifies the array index of keyword. Default = all.

-v value

Sets value of keyword to value.

-q

Shows keyword qualifiers.

-s text

Displays all keyword names containing specified text.

-h

Displays usage information and terminate.

-@ host

Performs specified operations on a resource host host. If the host is not specified, the operations are performed on the host where the utility was initialized.


Featured functions

oamBoardLookupByNumber, oamCloseObject, oamGetKeyword, oamGetQualifier, oamOpenObject, oamSetKeyword

Description

This demonstration program performs keyword enumeration on one keyword in a managed object, or on all keywords in a managed object if no keyword is specified. It can also search for text in keywords and set keyword values.

Retrieving keyword information

To retrieve a list of all keyword names and settings in a managed object, specify the object with the -n option, as shown in this example:

oaminfo -n "Supervisor"

oaminfo returns information similar to the following:

ExtendedManagementComponents[0] = HotSwap.emc
ExtendedManagementComponents[1] = clkmgr.emc
Products[0] = CG_6000C_QUAD
Products[1] = QX 2000/100-4L
Products[2] = QX 2000/200-4L
Products[3] = QX 2000/80-1L
Products[4] = QX 2000/80-4L
BoardPlugins[0] = cg6kpi.bpi
BoardPlugins[1] = qx2kpi.bpi
Boards[0] = MyBoard 0
Boards[1] = MyBoard 1
Name = Supervisor
AutoStartEnabled = No
AutoStopEnabled = No

For board managed objects, specify the managed object either by its name with the -n option or by its board number with the -b option:

oaminfo -b 0

The object name for the NMS OAM Supervisor is Supervisor. The object name for a plug-in or EMC is its file name (for example, hotswap.emc).

To retrieve the setting of a particular keyword name in a managed object, specify the managed object, and then the keyword with the -k option:

oaminfo -n "Supervisor" -k AutoStartEnabled

oaminfo returns information similar to the following:

AutoStartEnabled = No

To retrieve EEPROM keyword information, use the -k option and specify the full path of the requested keyword. For example:

oaminfo -k Eeprom.NumTrunk

To retrieve the settings of all keywords in an array, specify the array keyword name with the -k option:

oaminfo -n "Supervisor" -k Boards

oaminfo returns information similar to the following:

Boards[0] = MyBoard 0
Boards[1] = MyBoard 1

To retrieve the settings of a specific keyword within an array, also specify the keyword's index with the -i option:

oaminfo -n "Supervisor" -k Boards -i 1

oaminfo returns information similar to the following:

Boards[1] = MyBoard 1

To retrieve the qualifiers for the keywords you specify, use the -q option:

oaminfo -n "Supervisor" -k Boards -q

oaminfo returns information similar to the following:

Boards[0] = MyBoard 0
STRING Type
Read-only
Description: Board name

Boards[1] = MyBoard 1
STRING Type
Read-only
Description: Board name

Searching for keyword names

oaminfo can perform simple searches for keyword names containing certain characters. To do so, specify the characters using the -s option, as shown:

oaminfo -n "Supervisor" -s Auto

oaminfo returns information similar to the following:

AutoStartEnabled = Yes
AutoStopEnabled = Yes

You can combine the search function with other functions. For example:

oaminfo -n "Supervisor" -s Auto -q

This command line returns:

AutoStartEnabled = No
        STRING Type
        Read-Write
        Description: enables automatic start of boards
        There are 2 possible values:
                Yes
                No

AutoStopEnabled = No
        STRING Type
        Read-Write
        Description: enables automatic stop of boards
        There are 2 possible values:
                Yes
                 No

Setting keyword information

To set the value of a read and write keyword, specify the keyword using the -k option and the value using the -v option, as shown:

oaminfo -n "Supervisor" -k AutoStart -v Yes

oaminfo returns information similar to the following:

Currently AutoStartEnabled = No
Now AutoStartEnabled = Yes

Working with a remote server

To display or set keyword values for an NMS OAM managed object on a remote host, use the -@ command line option followed by the host name. For example, the following command displays a list of all keyword names and settings in the Supervisor managed object on remote host MyHost1:

oaminfo -n "Supervisor" -@ MyHost1