﻿1 SetAttributes

   setattributes enables you to change the attributes of an HP SUM node or
   session. You can change attributes that are displayed when you use the
   getattributes command. The setattributes command might return an invalid
   parameter notice if the permissions are not correct, or if either the
   parameter is not part of the requested set or if the value is not allowed.

   You can set the following node attributes:

   software, firmware, rewrite, downgrade, action, delay, message, username,
   password, ignore_warnings, on_failed_dependency, and baseline.

   Use this example to assign session attributes in the interactive CLI:

   hpsum setattributes --session <attribute>=<value> (Linux)

   hpsum setattributes /session <attribute>=<value> (Windows)

   +------------------------------------------------------------------------+
   | Session attribute            | Possible value                          |
   |------------------------------+-----------------------------------------|
   | auto_save_session            | [true|false]                            |
   |------------------------------+-----------------------------------------|
   | auto_save_session_time       | <integer>-The time in minutes. The      |
   |                              | default is 15 minutes.                  |
   |------------------------------+-----------------------------------------|
   | engine_mode                  | [debug|release]                         |
   |------------------------------+-----------------------------------------|
   | language                     | [en|ja|cn]                              |
   |------------------------------+-----------------------------------------|
   |                              | [omithost|omitcomponent|force]          |
   |                              |   o omithost-HP SUM skips the host if   |
   |                              |     it discovers a dependency failure.  |
   |                              |     (Default)                           |
   |                              |                                         |
   |                              |   o omitcomponent-HP SUM only skips     |
   | on_failed_dependency         |     components if it discovers          |
   |                              |     dependency failures. Other          |
   |                              |     components on the node are          |
   |                              |     deployed.                           |
   |                              |                                         |
   |                              |   o force-HP SUM forces the components  |
   |                              |     with a failed dependency to deploy. |
   |------------------------------+-----------------------------------------|
   |                              | [never|ifneeded|always]-This defines    |
   | reboot                       | the option for all nodes added in this  |
   |                              | session.                                |
   |------------------------------+-----------------------------------------|
   |                              | <integer>-Number of seconds HP SUM      |
   |                              | waits before rebooting, in the range of |
   | reboot_delay                 | 30-3600. This command requires          |
   |                              | reboot=ifneeded or reboot=always. This  |
   |                              | defines the option for all nodes added  |
   |                              | in this session.                        |
   |------------------------------+-----------------------------------------|
   |                              | <string>-This defines the reboot        |
   | reboot_message               | message used for all nodes added this   |
   |                              | session.                                |
   |------------------------------+-----------------------------------------|
   |                              | [normal|verbose]                        |
   |                              |   o normal-The default amount of        |
   |                              |     information provided by HP SUM      |
   | verbosity                    |     about a deployment.                 |
   |                              |                                         |
   |                              |   o verbose-Provides more details about |
   |                              |     a deployment, if information is     |
   |                              |     available.                          |
   |------------------------------+-----------------------------------------|
   |                              | [true|false]                            |
   | verbose                      |                                         |
   |                              | hpsum setattributes /nodes verbose=true |
   |------------------------------+-----------------------------------------|
   |                              | [directory_path] - Directory path where |
   | report_dir                   | you want HP SUM to save reports. For    |
   |                              | example: C:\hpsum_reports\.             |
   |------------------------------+-----------------------------------------|
   | use_proxy_script             | [true|false]                            |
   |------------------------------+-----------------------------------------|
   | proxy_url                    | <string> - Proxy server URL.            |
   |------------------------------+-----------------------------------------|
   | proxy_ftp_port               | <string> - Proxy server FTP port.       |
   |------------------------------+-----------------------------------------|
   | proxy_script                 | <string> - Full path for the proxy      |
   |                              | script.                                 |
   |------------------------------+-----------------------------------------|
   | proxy_username               | <string> - Username for the proxy       |
   |                              | server.                                 |
   |------------------------------+-----------------------------------------|
   | proxy_password               | <string> - User's password for the      |
   |                              | proxy server.                           |
   |------------------------------+-----------------------------------------|
   | open_firewall                | [yes|no]                                |
   |------------------------------+-----------------------------------------|
   |                              | An optional parameter that allows you   |
   | report_dir                   | to specify a directory where HP SUM     |
   |                              | saves reports.                          |
   |------------------------------+-----------------------------------------|
   |                              | Use a valid HP Passport Credentials API |
   | hp-passport-token=[token id] | Token Authentication key to access      |
   |                              | baseline bundles available on hp.com.   |
   +------------------------------------------------------------------------+

   +------------------------------------------------------------------------+
   | Node-specific |                                                        |
   | attributes    | Potential attributes                                   |
   |---------------+--------------------------------------------------------|
   |               | [true|false]                                           |
   |               |                                                        |
   |               | If you set this attribute as true, enter the following |
   |               | settings:                                              |
   |               |                                                        |
   |               |   o vcenter_host -IP address for the VMware            |
   | VMware nodes  |     vCenter node.                                      |
   |               |                                                        |
   | Use_vCenter   |   o vcenter_username                                   |
   |               |                                                        |
   |               |     -Username for the VMware vCenter node.             |
   |               |                                                        |
   |               |   o vcenter_password                                   |
   |               |                                                        |
   |               |     -Password for the user connecting to the VMware    |
   |               |     vCenter node.                                      |
   |---------------+--------------------------------------------------------|
   |               | Potential options:                                     |
   |               |                                                        |
   |               |   o true                                               |
   |               |                                                        |
   |               |   o false                                              |
   | Linux nodes   |                                                        |
   |               | Other attributes:                                      |
   | --use_sshkey  |                                                        |
   |               |   o privatekeyfile -Enter the address for the private  |
   |               |     key. The private key must be in PEM format.        |
   |               |                                                        |
   |               |   o passphrase - (Optional) Enter the passphrase for   |
   |               |     the private key.                                   |
   |---------------+--------------------------------------------------------|
   | software      | [true|false]-This defines the option for all nodes     |
   |               | added in this session.                                 |
   |---------------+--------------------------------------------------------|
   | firmware      | [true|false]-This defines the option for all nodes     |
   |               | added in this session.                                 |
   |---------------+--------------------------------------------------------|
   | rewrite       | [true|false]-This defines the option for all nodes     |
   |               | added in this session.                                 |
   |---------------+--------------------------------------------------------|
   | rewrite       | [true|false]-This defines the option for all nodes     |
   |               | added in this session.                                 |
   +------------------------------------------------------------------------+

   +------------------------------------------------------------------------+
   | Superdome 2/X-specific |                                               |
   | attributes             | Potential attributes                          |
   |------------------------+-----------------------------------------------|
   | update_type            | [ALL/COMPLEX/PARTITIONS]-This value tells HP  |
   |                        | SUM what to Superdome 2/X nodes to update.    |
   |------------------------+-----------------------------------------------|
   | device_list            | [devicelist]-This value tells HP SUM which    |
   |                        | Superdome 2/X nodes you want to update.       |
   |------------------------+-----------------------------------------------|
   |                        | [rebootlist]-This value tells HP SUM which    |
   | reboot_list            | Superdome 2/X nodes to reboot after           |
   |                        | deployment.                                   |
   +------------------------------------------------------------------------+

   You can set the following Moonshot-specific attributes for switch B if
   those credentials differ from switch A:

   +------------------------------------------------------------------------+
   | Moonshot-specific |                                                    |
   | attributes        | Potential attributes                               |
   |-------------------+----------------------------------------------------|
   | switch_username   | [username]-User name for the Moonshot A switch.    |
   |-------------------+----------------------------------------------------|
   | switch_password   | [password]-Password for the Moonshot A switch.     |
   |-------------------+----------------------------------------------------|
   | switch_enable     | [enable_password]-Enablement password for the      |
   |                   | Moonshot A switch.                                 |
   |-------------------+----------------------------------------------------|
   | switchb_username  | [username]-User name for the Moonshot B switch.    |
   |-------------------+----------------------------------------------------|
   | switchb_password  | [password]-Password for the Moonshot B switch.     |
   |-------------------+----------------------------------------------------|
   | switchb_enable    | [enable_password]-Enablement password for the      |
   |                   | Moonshot B switch.                                 |
   +------------------------------------------------------------------------+

   The following table shows the combinations for downgrade and rewrite
   attributes:

   +------------------------------------------------------------------------+
   | GUI selection deploys | interactive CLI mode command example           |
   |-----------------------+------------------------------------------------|
   |                       | hpsum setattributes /nodes localhost           |
   | Software only         | rewrite=false downgrade=false firmware=false   |
   |                       | software=true                                  |
   |-----------------------+------------------------------------------------|
   |                       | hpsum setattributes /nodes localhost           |
   | Firmware only         | rewrite=false downgrade=false firmware=true    |
   |                       | software=false                                 |
   |-----------------------+------------------------------------------------|
   |                       | hpsum setattributes /nodes localhost           |
   | Firmware and software | rewrite=false downgrade=false firmware=true    |
   |                       | software=true                                  |
   |-----------------------+------------------------------------------------|
   |                       | hpsum setattributes /nodes localhost           |
   | Downgrade software    | rewrite=false downgrade=true firmware=false    |
   |                       | software=true                                  |
   |-----------------------+------------------------------------------------|
   |                       | hpsum setattributes /nodes localhost           |
   | Downgrade firmware    | rewrite=false downgrade=true firmware=true     |
   |                       | software=false                                 |
   |-----------------------+------------------------------------------------|
   |                       | hpsum setattributes /nodes localhost           |
   | Downgrade both        | rewrite=false downgrade=true firmware=true     |
   |                       | software=true                                  |
   |-----------------------+------------------------------------------------|
   |                       | hpsum setattributes /nodes localhost           |
   | Rewrite software      | rewrite=true downgrade=false firmware=false    |
   |                       | software=true                                  |
   |-----------------------+------------------------------------------------|
   |                       | hpsum setattributes /nodes localhost           |
   | Rewrite firmware      | rewrite=true downgrade=false firmware=true     |
   |                       | software=false                                 |
   |-----------------------+------------------------------------------------|
   |                       | hpsum setattributes /nodes localhost           |
   | Rewrite both          | rewrite=true downgrade=false firmware=true     |
   |                       | software=true                                  |
   |-----------------------+------------------------------------------------|
   | Rewrite and downgrade | hpsum setattributes /nodes localhost           |
   | software              | rewrite=true downgrade=true firmware=false     |
   |                       | software=true                                  |
   |-----------------------+------------------------------------------------|
   | Rewrite and downgrade | hpsum setattributes /nodes localhost           |
   | firmware              | rewrite=true downgrade=true firmware=true      |
   |                       | software=false                                 |
   |-----------------------+------------------------------------------------|
   | Rewrite and downgrade | hpsum setattributes /nodes localhost           |
   | both                  | rewrite=true downgrade=true firmware=true      |
   |                       | software=true                                  |
   +------------------------------------------------------------------------+

  1.1 Syntax

   hpsum setattributes --nodes [<nodelist>] attribute1=value1
   attribute2=value2

   hpsum setattributes --session attribute1=value1

  1.2 Parameters

   The setattributes command provides the following options:

   +------------------------------------------------------------------------+
   | Parameter                 | Description                                |
   |---------------------------+--------------------------------------------|
   | hpsum                     | The HP SUM script initiates this action.   |
   |---------------------------+--------------------------------------------|
   | setattributes             | The command to set attributes pending HP   |
   |                           | SUM operations.                            |
   |---------------------------+--------------------------------------------|
   | --nodes [<nodelist>]      | Specify the nodes and attributes that you  |
   | attribute=value           | want to apply to nodes.                    |
   |---------------------------+--------------------------------------------|
   | --session attribute=value | Specify the session attribute you want to  |
   |                           | apply. Session attributes are global.      |
   +------------------------------------------------------------------------+

  1.3 Return codes

   +------------------------------------------------------------------------+
   | Return Code            | Windows | Linux | Text                        |
   |------------------------+---------+-------+-----------------------------|
   | SUCCESS_NO_REBOOT      | 0       | 0     | The command was successful. |
   |------------------------+---------+-------+-----------------------------|
   | FAILURE_GENERAL        | -1      | 255   | A general failure occurred. |
   |                        |         |       | For details, see the logs.  |
   |------------------------+---------+-------+-----------------------------|
   |                        |         |       | A bad input parameter was   |
   | FAILURE_BAD_PARM       | -2      | 254   | encountered. For details,   |
   |                        |         |       | see the logs.               |
   |------------------------+---------+-------+-----------------------------|
   | FAILURE_COMMAND_FAILED | -4      | 252   | The command failed. For     |
   |                        |         |       | details, see the logs.      |
   +------------------------------------------------------------------------+

  1.4 Example

    Windows sample command line

   C:\> hpsum setattributes /nodes 16.1.1.105 forcefirmware=true
   forcesoftware=true rewrite=true downgrade=true

   C:\> hpsum setattributes /nodes 16.1.1.117 update_type=all

   C:\> hpsum setattributes /session open_firewall=yes

   C:\> hpsum setattributes /nodes 15.212.143.4 use_vcenter=true 
   vcenter_host=10.0.0.1 vcenter_username=test vcenter_password=12iso*help

   Linux/HP-UX sample command line

   $ ./hpsum setattributes --nodes 16.1.1.105 forcefirmware=true
   forcesoftware=true rewrite=true downgrade=true

   $ ./hpsum setattributes --nodes 16.1.1.117 update_type=all

   $ ./hpsum setattributes --nodes 15.212.143.4 use_vcenter=true vcenter_host=10.0.0.1 vcenter_username=test vcenter_password=12iso*help

   $ ./hpsum setattributes -session open_firewall=yes
