﻿1 Add

   addは、ベースラインまたはノードを現在のセッションの現在の作業セットに
   追加します。

      ---------------------------------------------------------------------   
    注：ftpタイプのベースラインを追加する前に、setattributesコマンドの       
    hp-passport-tokenパラメーターを追加します。使用できるSPPベースラインのリ  
    ストを表示するには、getbaselinesコマンドを発行します。setattributeについ  
    て詳しくは、???setattributeのヘルプファイルを参照してください。           
                                                                              
    hpsum getbaselines --list hp.com                                          
                                                                              
    HP SUMは、オンラインで使用可能なベースラインのリストを返します。例：      
                                                                              
    Webベースライン情報：                                                     
    1. 名前：HP Service Pack for ProLiant                                     
                    バンドルファイル名：spp.2014.02.0.B                       
                    バージョン：2014.02.0.B                                   
                    リリース日付：2014-04-25                                  
    2. 名前：HP Service Pack for ProLiant                                     
                    バンドルファイル名：spp.2013.09.0.C                       
                    バージョン：2013.09.0.C                                   
                    リリース日付：2014/04/30                                  
      ---------------------------------------------------------------------   

   すべてのノードまたはベースラインのパスワードをリストの先頭に指定できます。

   たとえば、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]

      ---------------------------------------------------------------------   
    注：HP SUMのiCLIモードはノードまたはベースラインを自動的には追加しません。
    対話式CLIモードは、関連するノードを自動的に追加しません。GUIモードを使用  
    して、関連するデバイスを追加します。                                      
      ---------------------------------------------------------------------   

   VCノードを追加する場合は、以下の属性を含めます。
   oa_usernameおよびoa_password。

  1.1 構文

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

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

   add /baselines type=unc "\\UNC_PATH" unc_username=user unc_password=pwd

      ---------------------------------------------------------------------   
    注：ノードと同じコマンドでベースラインを追加しないでください。2つの個別の 
    コマンドを使用します。                                                    
      ---------------------------------------------------------------------   

  1.2 パラメーター

   addコマンドには次のオプションがあります。

   +------------------------------------------------------------------------+
   | パラメーター                           | 説明                          |
   |----------------------------------------+-------------------------------|
   | hpsum                                  | HP SUMスクリプトがこのアクシ  |
   |                                        | ョンを開始します。            |
   |----------------------------------------+-------------------------------|
   |                                        | HP SUMセッションにノードまた  |
   | add                                    | はベースラインを追加するコマ  |
   |                                        | ンド。                        |
   |----------------------------------------+-------------------------------|
   |                                        | 追加操作を実行するオブジェク  |
   |                                        | ト。リスト内の項目は、スペー  |
   |                                        | スで区切る必要があります。す  |
   |                                        | べてのノードを対象に全体でユ  |
   |                                        | ーザーとパスワードを指定でき  |
   |                                        | ます。                        |
   |                                        |                               |
   |                                        | domain_name: localhost        |
   |                                        |                               |
   | --nodes <nodeslist>                    | ip: 127.0.0.1                 |
   |                                        |                               |
   |                                        | ipv6: ::1                     |
   |                                        |                               |
   |                                        | ノードまたはベースラインのい  |
   |                                        | ずれかを追加します。同じコマ  |
   |                                        | ンドで両方を追加しないでくだ  |
   |                                        | さい。                        |
   |                                        |                               |
   |                                        | VCノードを追加する場合は、    |
   |                                        | EnetモジュールのIPアドレスを  |
   |                                        | 使用します。                  |
   |----------------------------------------+-------------------------------|
   |                                        | このパラメーターは、ノードタ  |
   |                                        | イプを定義します。HP SUMは、  |
   |                                        | 次のノードタイプをサポートし  |
   |                                        | ます。                        |
   |                                        |                               |
   |                                        | windows                       |
   |                                        |                               |
   |                                        | linux                         |
   |                                        |                               |
   |                                        | ilo                           |
   |                                        |                               |
   |                                        | virtual_connect - プライマリ  |
   |                                        | EnetモジュールのIPアドレスを  |
   |                                        | 使用します。VCノードには、    |
   |                                        | oa_userおよびoa_passwordが必  |
   |                                        | 要です。                      |
   |                                        |                               |
   | type = <node type>                     | oa                            |
   |                                        |                               |
   |                                        | vmware                        |
   |                                        |                               |
   |                                        | hpux                          |
   |                                        |                               |
   |                                        |                               |
   |                                        |                               |
   |                                        | sas_switch                    |
   |                                        |                               |
   |                                        | fc_switch                     |
   |                                        |                               |
   |                                        | sd2                           |
   |                                        |                               |
   |                                        | moonshot                      |
   |                                        |                               |
   |                                        | unknown                       |
   |----------------------------------------+-------------------------------|
   | user=<user_name>                       | ノードの、このユーザー名の認  |
   |                                        | 証情報。                      |
   | 例：user=john_doe@example.com          |                               |
   |----------------------------------------+-------------------------------|
   | password=<password>                    | ノードのユーザーパスワード認  |
   |                                        | 証情報。これをコマンドライン  |
   | 例：password=userpassword              | で入力しない場合は、パスワー  |
   |                                        | ドを求められます。            |
   |----------------------------------------+-------------------------------|
   | su_user=<super_userID>                 |                               |
   |                                        | スーパーユーザーのユーザー名。|
   | 例：                                   |                               |
   | user=su_john_doe@example.com           |                               |
   |----------------------------------------+-------------------------------|
   | su_password=<super_user_password>      | スーパーユーザーのパスワード。|
   |                                        |                               |
   | 例：password=su_userpassword           |                               |
   |----------------------------------------+-------------------------------|
   |                                        | 認証情報をsudo認証情報として  |
   |                                        | 使用します。                  |
   |                                        |                               |
   | use_sudo                               | 指定される可能性があるオプ    |
   |                                        | ション：                      |
   |                                        |                               |
   |                                        |   o true                      |
   |                                        |                               |
   |                                        |   o false                     |
   |----------------------------------------+-------------------------------|
   |                                        | MoonshotスイッチAのユーザー   |
   |                                        | 名。スイッチBのユーザー名がス |
   |                                        | イッチAと同じ場合、この値が両 |
   |                                        | 方のスイッチに適用されます。  |
   | switch_username=<switch_a_username>    |                               |
   |                                        |    ------------------------   |
   |                                        |  注：setattributesコマンドを  |
   |                                        |  使用して、スイッチBの認証情  |
   |                                        |  報を割り当てることができま   |
   |                                        |  す。                         |
   |                                        |    ------------------------   |
   |----------------------------------------+-------------------------------|
   |                                        | MoonshotスイッチAのパスワー   |
   |                                        | ド。スイッチBのパスワードがス |
   |                                        | イッチAと同じ場合、この値が両 |
   |                                        | 方のスイッチに適用されます。  |
   | switch_password=<switch_a_password>    |                               |
   |                                        |    ------------------------   |
   |                                        |  注：setattributesコマンドを  |
   |                                        |  使用して、スイッチBの認証情  |
   |                                        |  報を割り当てることができま   |
   |                                        |  す。                         |
   |                                        |    ------------------------   |
   |----------------------------------------+-------------------------------|
   | switch_enable=<enable_password>        | Moonshotノードに対して、スイ  |
   |                                        | ッチAを有効にします。         |
   |----------------------------------------+-------------------------------|
   | vcenter_host                           | これらのパラメーターを使用し  |
   |                                        | て、ロックダウンモードの      |
   | vcenter_username                       | VMwareホストとの接続を確立し  |
   |                                        | ます。                        |
   | vcenter_password                       |                               |
   |----------------------------------------+-------------------------------|
   |                                        | 指定される可能性があるオプ    |
   |                                        | ション：                      |
   |                                        |                               |
   | --use_sshkey                           |   o true                      |
   |                                        |                               |
   |                                        |   o false                     |
   |----------------------------------------+-------------------------------|
   |                                        | プライベートキーのアドレスを  |
   | privatekeyfile                         | 入力します。プライベートキー  |
   |                                        | は、PEM形式でなければなりませ |
   |                                        | ん。                          |
   |----------------------------------------+-------------------------------|
   |                                        | （オプション）プライベート    |
   | passphrase                             | キーのパスフレーズを入力しま  |
   |                                        | す。                          |
   |----------------------------------------+-------------------------------|
   |                                        | このパラメーターを使用し、    |
   |                                        | ディレクトリを指定しローカル  |
   | --baselines                            | ベースラインを追加します。    |
   |                                        | FTPまたはHTTPベースラインを追 |
   |                                        | 加する場合は、save_locationパ |
   |                                        | ラメーターを使用します。      |
   |----------------------------------------+-------------------------------|
   | save_location=<working_location>       | ダウンロードするベースライン  |
   |                                        | を保存するディレクトリ。      |
   |----------------------------------------+-------------------------------|
   |                                        | このパラメーターは、ベースラ  |
   |                                        | インタイプを定義します。HP    |
   |                                        | SUMは次のベースラインタイプを |
   |                                        | サポートします。              |
   |                                        |                               |
   |                                        | http                          |
   |                                        |                               |
   |                                        | ftp                           |
   | type                                   |                               |
   |                                        | unc（Windowsのみ）            |
   |                                        |                               |
   |                                        |    ------------------------   |
   |                                        |  注：ローカルホストシステムで |
   |                                        |  UNCディレクトリが開いていな  |
   |                                        |  いことを確認します。         |
   |                                        |    ------------------------   |
   |----------------------------------------+-------------------------------|
   |                                        | UNCディレクトリパスのユーザー |
   | unc_username=<unc_username>            | 名を入力します。（Windowsに対 |
   |                                        | してのみ）有効です。          |
   |----------------------------------------+-------------------------------|
   |                                        | UNCディレクトリパスのパスワー |
   | unc_password=<unc_password>            | ドを入力します。（Windowsに対 |
   |                                        | してのみ）有効です。          |
   |----------------------------------------+-------------------------------|
   |                                        | 追加するバンドルファイルの名  |
   |                                        | 前です。バンドルファイル名の  |
   | bundle                                 | リストを表示するには、        |
   |                                        | getbaselines /listコマンドを  |
   |                                        | 使用してください。例：        |
   |                                        | bundle=spp.2014.04.0.B.       |
   |----------------------------------------+-------------------------------|
   |                                        | （HTTPベースラインのみ）この  |
   |                                        | 属性を使用して、HP SUMがダウ  |
   |                                        | ンロードするコンポーネントを、|
   |                                        | オペレーティングシステムを基  |
   |                                        | 準にフィルタリングできます。  |
   |                                        | 有効なオプションは、次のとお  |
   |                                        | りです。                      |
   | filter_os                              |                               |
   |                                        |   o windows                   |
   |                                        |                               |
   |                                        |   o linux                     |
   |                                        |                               |
   |                                        |   o vmware                    |
   |                                        |                               |
   |                                        |   o hpux                      |
   +------------------------------------------------------------------------+

  1.3 リターンコード

   +------------------------------------------------------------------------+
   | リターンコード         | Windows | Linux | テキスト                    |
   |------------------------+---------+-------+-----------------------------|
   | SUCCESS_NO_REBOOT      | 0       | 0     | The command was successful. |
   |                        |         |       | （コマンドが成功しました。）|
   |------------------------+---------+-------+-----------------------------|
   |                        |         |       | The command completed       |
   |                        |         |       | successfully, but was not   |
   |                        |         |       | required or everything was  |
   | SUCCESS_NOT_REQUIRED   | 3       | 3     | already current.（コマンドは|
   |                        |         |       | 正常に完了しましたが、コマン|
   |                        |         |       | ドが不要であったか、すべてが|
   |                        |         |       | 最新です）                  |
   |                        |         |       |                             |
   |                        |         |       |    ----------------------   |
   |                        |         |       |  注：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 例

    Windowsのサンプルのコマンドライン

   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のサンプルのコマンドライン

   $ ./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

   $ ./hpsum add --nodes 15.212.143.4 type=vmware vcenter_host=15.212.143.112 
   vcenter_username=Administrator vcenter_password=12iso*help
      ---------------------------------------------------------------------   
    注：ノードタイプがLinuxまたはHP-UXの場合は、su_userおよびsu_passwordを使  
    用できます。または、use_sudoを使用できます。                              
                                                                              
    例：                                                                      
                                                                              
    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                                                             
      ---------------------------------------------------------------------   
