サーバの詳細情報を表示します。
/api/v1/srv/info_verbose?srv=srv&vdc=controller-name
サーバの名前
ターゲットの仮想データ センターの名前
同期
GET
srv1 の詳細情報を表示します。
GET http://192.168.123.200/api/v1/srv/info_verbose?srv=srv1&vdc=mygrid
XML
<server> <name>srv1</name> <bw_alloc>350000000</bw_alloc> <bw_free>1650000000</bw_free> <bw_reserved>0</bw_reserved> <bw_total>2000000000</bw_total> <cpu_alloc>0.55</cpu_alloc> <cpu_bogomips>4019</cpu_bogomips> <cpu_free>1.35</cpu_free> <cpu_freq>2009</cpu_freq> <cpu_load>0.10</cpu_load> <cpu_phy_total>2</cpu_phy_total> <cpu_reserved>0.10</cpu_reserved> <cpu_total>2</cpu_total> <cpu_type>AMD Opteron(tm) Processor 246 </cpu_type> <disk_free>1421930467533</disk_free> <disk_reserved>10737418240</disk_reserved> <disk_total>1493697126400</disk_total> <enabled>1</enabled> <ha_role>primary</ha_role> <hvm_support>0</hvm_support> <mem_alloc>738197504</mem_alloc> <mem_free>11534336</mem_free> <mem_reserved>1395654656</mem_reserved> <mem_service>0</mem_service> <mem_total>2145386496</mem_total> <n_disks>1</n_disks> <state>up</state> </server>
JSON
{
"cpu_freq" : "2009",
"cpu_type" : "AMD Opteron(tm) Processor 246 ",
"cpu_bogomips" : "4019",
"state" : "up",
"cpu_total" : 2",
"cpu_alloc" : "0.55",
"mem_alloc" : "738197504",
"hvm_support" : "0",
"enabled" : "1",
"bw_total" : "2000000000",
"cpu_reserved" : "0.10",
"mem_total" : "2145386496",
"name" : "srv1",
"disk_reserved" : "10737418240",
"disk_total" : "1493697126400",
"cpu_phy_total" : "2",
"cpu_free" : "1.35",
"ha_role" : "primary",
"mem_reserved" : "1395654656",
"mem_service" : "0",
"bw_free" : "1650000000",
"disk_free" : "1421930467533",
"bw_reserved" : "0",
"mem_free" : "11534336",
"cpu_load" : "0.38",
"bw_alloc" : "350000000",
"n_disks" : "1"
}
JSON の出力はすべて UTF8 にエンコードされています。 UTF8 デコードを使用して UTF8 にエンコードされた出力をデコードします。
UTF8 にエンコードされた JSON 出力をデコードするシンプルな PHP スクリプトの例を以下に示します。
<?
$json = '{"a": "¥u00e3¥u0081¥u0082" }';
$j = json_decode($json);
echo utf8_decode($j->{'a'});
?>
エンティティ vdc mygrid が見つかりません。WS_API アプリケーションに設定されていない VDC 名が指定されました。
必要な引数(srv)がありません。引数 srv=srv-name が指定されませんでした。
リクエストの処理に失敗しました。サーバ srv の情報を表示できませんでした。存在しません。 リクエストに無効なサーバ名が指定されました。
| Copyright © 2011 CA. All rights reserved. | このトピックについて CA Technologies に電子メールを送信する |