﻿1 Add

   add adds baselines or nodes to the current working set for the current
   session.

      ---------------------------------------------------------------------   
    NOTE: Before you add an ftp type baseline, issue the getbaselines command 
    to view a list of SPP baselines available.                                
                                                                              
    hpsum getbaselines --list hp.com                                          
                                                                              
    HP SUM returns a list of available baselines online, for example:         
                                                                              
    Web Baseline Information:                                                 
    1. Name: HP Service Pack for ProLiant                                     
                    Bundle File Name: spp.2014.02.0.B                         
                    Version: 2014.02.0.B                                      
                    Release Date: 2014-04-25                                  
    2. Name: HP Service Pack for ProLiant                                     
                    Bundle File Name: spp.2013.09.0.C                         
                    Version: 2013.09.0.C                                      
                    Release Date: 2014-04-30                                  
      ---------------------------------------------------------------------   

   You can supply passwords for all the nodes or baselines at the beginning
   of the list.

   For example, hpsum add [--nodes n1 [type=<node_type>] [user=<username>]
   [password=<userpassword>] [su_user=<su_user>]
   [su_password=<suuser_password>] [use_sudo=true]
   [switch_username=<Moonshot_switchA_username>]
   [switch_password=<Moonshot_switchA_password>]
   [switch_enable=<Moonshot_switchA_enable>]

   --baselines b1 [save_location=<directory>] [type=<baseline_type]

      ---------------------------------------------------------------------   
    NOTE: HP SUM does not automatically add nodes or baselines. The           
    interactive CLI mode does not automatically add associated nodes. Use GUI 
    mode to add associated devices.                                           
      ---------------------------------------------------------------------   

   If you add a VC node, include the following attributes: oa_username and
   oa_password.

  1.1 Syntax

   hpsum add --nodes n1 [type=<node_type>] user=<username>
   password=<userpassword>]

   hpsum add --baselines b1 [save_location=<directory>] [type
   <baseline_type>]

      ---------------------------------------------------------------------   
    NOTE: Do not add baselines in the same command as nodes. Use two separate 
    commands.                                                                 
      ---------------------------------------------------------------------   

  1.2 Parameters

   The add command provides the following options:

   +------------------------------------------------------------------------+
   | Parameter                     | Description                            |
   |-------------------------------+----------------------------------------|
   | hpsum                         | The HP SUM script initiates this       |
   |                               | action.                                |
   |-------------------------------+----------------------------------------|
   | add                           | The command to add nodes or baselines  |
   |                               | to the HP SUM session.                 |
   |-------------------------------+----------------------------------------|
   |                               | Object to perform the add operation.   |
   |                               | The items in the list should be        |
   |                               | delimited by spaces. You can specify   |
   |                               | the user and password globally for all |
   |                               | nodes.                                 |
   |                               |                                        |
   |                               | domain_name: localhost                 |
   |                               |                                        |
   | --nodes                       | ip: 127.0.0.1                          |
   |                               |                                        |
   |                               | ipv6: ::1                              |
   |                               |                                        |
   |                               | Add either nodes or baselines. Do not  |
   |                               | add both in the same command.          |
   |                               |                                        |
   |                               | If you are adding a VC node, use the   |
   |                               | IP address of an Enet module.          |
   |-------------------------------+----------------------------------------|
   |                               | This parameter defines the node type.  |
   |                               | HP SUM supports node types:            |
   |                               |                                        |
   |                               | windows                                |
   |                               |                                        |
   |                               | linux                                  |
   |                               |                                        |
   |                               | ilo                                    |
   |                               |                                        |
   |                               | virtual_connect                        |
   |                               |                                        |
   |                               | Use the IP address of a primary Enet   |
   |                               | module. VC nodes require oa_user and   |
   |                               | oa_password                            |
   |                               |                                        |
   | type                          | oa                                     |
   |                               |                                        |
   |                               | vmware                                 |
   |                               |                                        |
   |                               | hpux                                   |
   |                               |                                        |
   |                               | ipdu                                   |
   |                               |                                        |
   |                               | sas_switch                             |
   |                               |                                        |
   |                               | fchba_switch                           |
   |                               |                                        |
   |                               | sd2                                    |
   |                               |                                        |
   |                               | moonshot                               |
   |                               |                                        |
   |                               | unknown                                |
   |-------------------------------+----------------------------------------|
   | user=userstring               | This username credentials for the      |
   |                               | node.                                  |
   |-------------------------------+----------------------------------------|
   |                               | The user password credentials for the  |
   | password=passwordstring       | node. If you do not enter this on the  |
   |                               | command line, HP SUM prompts for the   |
   |                               | password.                              |
   |-------------------------------+----------------------------------------|
   | su_user                       | The username for the sudo user.        |
   |-------------------------------+----------------------------------------|
   | su_password                   | The password for the sudo user.        |
   |-------------------------------+----------------------------------------|
   | use_sudo                      | Use credentials as sudo credentials.   |
   |-------------------------------+----------------------------------------|
   |                               | Username for a Moonshot switch A.      |
   |                               |                                        |
   |                               |    ---------------------------------   |
   | switch_username               |  NOTE: You can assign a switch B       |
   |                               |  credentials using the setattributes   |
   |                               |  command.                              |
   |                               |    ---------------------------------   |
   |-------------------------------+----------------------------------------|
   |                               | Password for a Moonshot switch A.      |
   |                               |                                        |
   |                               |    ---------------------------------   |
   | switch_password               |  NOTE: You can assign a switch B       |
   |                               |  credentials using the setattributes   |
   |                               |  command.                              |
   |                               |    ---------------------------------   |
   |-------------------------------+----------------------------------------|
   | switch_enable                 | Enable two switch for Moonshot nodes.  |
   |-------------------------------+----------------------------------------|
   |                               | Use this parameter to add local        |
   |                               | baselines by specifying the directory. |
   | --baselines                   | If you are adding an FTP or HTTP       |
   |                               | baseline, use the save_location        |
   |                               | parameter.                             |
   |-------------------------------+----------------------------------------|
   | save_location=workinglocation | Directory where you want to save a     |
   |                               | baseline you download.                 |
   |-------------------------------+----------------------------------------|
   |                               | This parameter defines the baseline    |
   |                               | type. HP SUM supports baseline types:  |
   | type                          |                                        |
   |                               | http                                   |
   |                               |                                        |
   |                               | ftp                                    |
   |-------------------------------+----------------------------------------|
   |                               | This is the bundle file name you want  |
   |                               | to add. Use the command getbaselines   |
   | bundle                        | /list to display the list of bundle    |
   |                               | file names. For example,               |
   |                               | bundle=spp.2014.04.0.B.                |
   +------------------------------------------------------------------------+

      ---------------------------------------------------------------------   
    NOTE: HP SUM does not support adding UNC baselines. If you want to use a  
    UNC baseline to inventory or deploy a node in HP SUM iCLI mode, add the   
    UNC baseline in GUI mode and then shutdown GUI mode and continue the work 
    in iCLI mode.                                                             
      ---------------------------------------------------------------------   

  1.3 Return codes

   +------------------------------------------------------------------------+
   | Return Code            | Windows | Linux | Text                        |
   |------------------------+---------+-------+-----------------------------|
   | SUCCESS_NO_REBOOT      | 0       | 0     | The command was successful. |
   |------------------------+---------+-------+-----------------------------|
   |                        |         |       | The command completed       |
   |                        |         |       | successfully, but was not   |
   |                        |         |       | required or everything was  |
   |                        |         |       | already current.            |
   | SUCCESS_NOT_REQUIRED   | 3       | 3     |                             |
   |                        |         |       |    ----------------------   |
   |                        |         |       |  NOTE: The node or baseline |
   |                        |         |       |  already existed.           |
   |                        |         |       |    ----------------------   |
   |------------------------+---------+-------+-----------------------------|
   | 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      | 253   | The command failed. For     |
   |                        |         |       | details, see the logs.      |
   +------------------------------------------------------------------------+

  1.4 Example

    Windows sample command line

   C:\>hpsum add /nodes 10.0.1.15 type=windows

   C:\>hpsum add /baselines type=ftp save_location=c:\temp\pfw
   bundle=spp.2014.02.0.B

   hpsum add /nodes type=vc 15.154.117.94 user=Administrator
   password=12iso*help oa_username=Administrator oa_password=12iso*help

    Linux sample command line

   $ hpsum add --nodes 10.0.1.16 type=linux

   $ hpsum add --baselines "/SPP/" "/tmp/myrepos/"

   $ hpsum add --baselines type=ftp save_location="/tmp/pfw
   bundle=spp.2014.02.0.B

   hpsum add --nodes type=vc 15.154.117.94 user=Administrator
   password=12iso*help oa_username=Administrator oa_password=12iso*help

      ---------------------------------------------------------------------   
    NOTE: If the node type is Linux or HP-UX, you can use su_user and         
    su_password, or use use_sudo.                                             
                                                                              
    For example:                                                              
                                                                              
    hpsum add /nodes 192.168.1.1 type=Linux user=user password=password       
    su_user=user1 su_password=password1                                       
                                                                              
    hpsum add /nodes 192.168.1.1 type=Linux user=user password=password       
    use_sudo=true                                                             
      ---------------------------------------------------------------------   
