HP 449298-001 manual Scriptable output format

Page 38

UserName : alice

Privileges : storage

FullName : Alice Candle

ContactInfo : alice.candle@hp.com

Enabled : false

Scriptable output format

Scriptable output format allows scripts to invoke CLI commands and receive command responses that can be easily parsed by the scripts. This capability is provided by two options that are available: - output=script1 and -output=script2. These options are described in more detail below. To display output with no headers or labels, use no-headers as an additional output option value.

IMPORTANT: If the delimiter is present within the data, then the entire value is surrounded by double quotes.

Script1 Output Format

The script1 output format can be used to format the output using a name-value pair format, using an equal sign as the delimiter. All text on the left side of the equal sign designates the "name" of a property, and the text on the right side of the equal sign designates the "value" of the property. If "no-headers" is provided as an additional option value, only the values are displayed. Each property is displayed on a separate line.

Script2 Output Format

The script2 output format can be used to format all instance data in a single line, using a semi-colon as the delimiter for the data. The first line contains the property names. This format is consistent with a "table view" of the data, where the first line is represented by a list of column labels, while the remaining lines provide the actual data being displayed. Each line represents a single instance of data. For example, in the case of showing users, each line provides all data corresponding to a single user instance.

The following examples provide some common scenarios for using the script output format options.

Example 1: Scriptable output format displaying all enclosures

->show enclosure -output=script1 ID=enc0

Name=Enclosure1

Import Status=Imported

Serial Number=USE0000BK2

Part Number=403321-021

Asset Tag=OA ASSET 453

Example 2: Scriptable output format displaying user "Administrator" information

->show user Administrator -output=script1

User Name=Administrator

Privileges=domain,server,network,storage

Full Name=

Contact Info=

Enabled=true

Command line 38

Image 38
Contents HP Virtual Connect Manager Command Line Interface User Guide Audience assumptions Contents Technical support Virtual Connect overview Command line overviewIntroduction Parameters Command line syntaxSubcommand managed element parameters options properties OptionsCLI command execution modes PropertiesRemote access to the Virtual Connect Manager Managed elements Command lineSubcommands Devicebay DomainSupported actions delete, help, set, show Enclosure Enet-connection Supported actions add, help, remove, setAddressType Network=SomeNetwork2 PXE=enabledAddressType=Factory-Default EthernetMACExternal-manager Fabric Fc-connection Support actions help, show, update FirmwareIgmp InterconnectLdap Ldap-group Supported actions add, help, remove, set, showMac-cache Network Profile Add profile MyNewProfile Add profile MyNewProfile2 -NoDefaultEnetConnAdd profile MyNewProfile2 -NoDefaultFcConn Assign profileSupported actions help, poweroff, poweron, reboot, show ServerPoweroff server enc0 Poweroff server enc02Poweroff server enc02 -Force Poweroff server enc02 -ForceOnTimeoutStackinglink Uplinkport StatusSystemlog Speed=Auto10Mb100Mb1GbDisabled Set uplinkportSet uplinkport PortID Network=NetworkName Set uplinkport enc012 Network=MyNetwork Speed=1GbUplinkset User Set user bill Password=HGtwf7272562 Set user steve Password=fgY87hHlSet user steve Password Remove user steveVersion Help subsystemVcm Command line Output format Interactive user output formatBrad Domain Brad Mills Brad.mills@hp.com True Server Scriptable output format Command line Ssh 192.168.0.120 login as Administrator password Configuring the Virtual Connect domain using the CLIBasic configuration Ssh 192.168.0.120 login as AdministratorConfiguring local users Domain setupSetting the domain name Importing an enclosureRemove user bob Add user bob password=fhkjdhfk privileges=domain,networkSet user bob fullname=Bob J Smith enabled=false Remove userConfiguring MAC Address ranges Network setupConfiguring Ldap authentication support for users Assigned MAC addresses Creating a shared uplink port set Creating an enet-networkAdding uplink ports to an enet-network Adding uplink ports to a shared uplink port set Fibre Channel setupConfiguring WWN address ranges Creating a network that uses a shared uplink port setDisplaying FC fabrics Server Profile setupModifying FC fabric properties Set fabric name=MyNewName portspeed=4GbConfiguring the Virtual Connect domain using the CLI Adding enet-network connections to a profile Configuring Igmp settingsCreating server profiles Adding FC fabric connections to a server profileCommon management operations Configuring MAC cache failover settingsSet mac-cache enabled=true refresh=10 Logging out of the CLIResetting the Virtual Connect Manager Reset vcm Reset vcm -failoverVirtual Connect Manager not found at this IP address HP contact information Technical supportBefore you contact HP Acronyms and abbreviations IgmpPXE Index Index