各サーバで実行されているコンポーネントをリスト表示します
/api/v1/srv/list_map?vdc=controller-name
ターゲットの仮想データ センターの名前
同期
GET
各 srv1 上で実行されているコンポーネントのリストを表示します。
GET http://192.168.123.200/api/v1/srv/list_map?vdc=mygrid
XML
<server> <name>srv1</name> <bw_alloc>720000000</bw_alloc> <bw_free>1280000000</bw_free> <component controller></component controller> <component WS_API.main.api_srv> <bw>250000000</bw> <cpu>0.40</cpu> <mem>536870912</mem> <mem_service>0</mem_service> <state>running</state> </component WS_API.main.api_srv> . . . <cpu_alloc>1.69</cpu_alloc> <cpu_free>2.21</cpu_free> <enabled>1</enabled> <mem_alloc>1610612736</mem_alloc> <mem_free>1246756864</mem_free> <role>primary</role> <state>up</state> </server>
JSON
{
"state" : "up",
"cpu_alloc" : "1.69",
"mem_alloc" : "1610612736",
"enabled" : "1",
"component controller" : {},
"name" : "srv1",
"component WS_API.main.api_srv" : {
"bw" : "250000000",
"cpu" : "0.40",
"mem" : "536870912",
"state" : "running",
"mem_service" : "0"
},
.
.
.
"cpu_free" : "2.21",
"bw_free" : "1280000000",
"mem_free" : "1246756864",
"role" : "primary",
"bw_alloc" : "720000000"
}
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 名が指定されました。
| Copyright © 2011 CA. All rights reserved. | このトピックについて CA Technologies に電子メールを送信する |