前のトピック: vol オブジェクト次のトピック: info メソッド(vol オブジェクト)


list メソッド(vol オブジェクト)
説明

アプリケーション内のボリュームのリストを取得します。

構文
/api/v2/vol/list?app=application&vdc=controller-name 
引数
app

アプリケーションの名前

vdc

ターゲットの仮想データ センターの名前

トランザクション タイプ

同期

リクエスト タイプ

GET

test のボリュームのリストを取得します。

GET http://192.168.123.200/api/v2/vol/list?app=test&vdc=mygrid 
サンプル出力
XML:

<volumes>
  <volume>
    <comment></comment>
    <filesystem>ext3</filesystem>
    <mount_state>in_use</mount_state>
    <n_mirrors>2</n_mirrors>
    <name>WS_API_r271:code</name>
    <scope_name>WS_API_r271</scope_name>
    <scope_type>application</scope_type>
    <server>srv1,srv2</server>
    <size>54525952</size>
    <state>ok</state>
    <store>local</store>
    <uuid>fc746912-cc65-4e9c-9327-14c66b1741c7</uuid>
  </volume>
   
   
   
  <volume>
    <comment></comment>
    <filesystem>ext3</filesystem>
    <mount_state>available</mount_state>
    <n_mirrors>2</n_mirrors>
    <name>WS_API_r271:mon</name>
    <scope_name>WS_API_r271</scope_name>
    <scope_type>application</scope_type>
    <server>srv1,srv2</server>
    <size>53477376</size>
    <state>ok</state>
    <store>local</store>
    <uuid>f4fd637c-4aa8-4111-be31-55d28a1e275d</uuid>
  </volume>
</volumes>

JSON:
{
   "volume" : [
      {
         "store" : "local",
         "scope_type" : "application",
         "name" : "WS_API_r271:code",
         "scope_name" : "WS_API_r271",
         "mount_state" : "in_use",
         "uuid" : "fc746912-cc65-4e9c-9327-14c66b1741c7",
         "size" : "54525952",
         "state" : "ok",
         "comment" : "",
         "filesystem" : "ext3",
         "n_mirrors" : "2",
         "server" : "srv1,srv2"
      },
       
       
       
      {
         "store" : "local",
         "scope_type" : "application",
         "name" : "WS_API_r271:mon",
         "scope_name" : "WS_API_r271",
         "mount_state" : "available",
         "uuid" : "f4fd637c-4aa8-4111-be31-55d28a1e275d",
         "size" : "53477376",
         "state" : "ok",
         "comment" : "",
         "filesystem" : "ext3",
         "n_mirrors" : "2",
         "server" : "srv1,srv2"
      }
   ]
}

HTTP エラー コード
404

エンティティ vdc mygrid が見つかりません。WS_API アプリケーションに設定されていない VDC 名が指定されました。

400.1

アプリケーション test がありません。 リクエストに無効なアプリケーションが指定されています。