Use this object to view details of one or more VDC Virtual Data Centers managed by the 'WS_API'.
|
Method |
Description |
|
Retrieve grid information |
|
|
Retrieve detailed grid information |
|
|
Retrieve grids configured to work with the WS_API |
|
|
Retrieve grid configuration parameter(s) |
|
|
Retrieve grid ACL (or portion of grid ACL) relating to a particular principal |
|
|
Set grid configuration parameter(s) |
|
|
Replace the entire grid ACL |
|
|
Replace that portion of the grid ACL which relates to the owner or a principal |
|
|
Reboot a grid. |
|
|
Shut a grid down. |
|
|
power-cycle a grid. |
Retrieve grid information
/api/v2/vdc/info?vdc=controller-name
Name of the target virtual data center
synchronous
GET
Get information.
GET http://192.168.123.200/api/v2/vdc/info?vdc=mygrid
<grid> <name>mygrid</name> <app_running>2</app_running> <bw_alloc>570000000</bw_alloc> <bw_free>1430000000</bw_free> <bw_reserved>0</bw_reserved> <bw_total>2000000000</bw_total> <controller_uptime>1496456</controller_uptime> <cpu_alloc>1.94</cpu_alloc> <cpu_free>1.96</cpu_free> <cpu_load>0.03</cpu_load> <cpu_reserved>0.00</cpu_reserved> <cpu_total>4.00</cpu_total> <description></description> <disk_free>1148779407545</disk_free> <disk_n>1</disk_n> <disk_reserved>10737418240</disk_reserved> <disk_total>1493697126400</disk_total> <ha_state>checking...</ha_state> <last_failed_srv>srv1</last_failed_srv> <last_srv_failure_time>270003032</last_srv_failure_time> <mem_alloc>2147483648</mem_alloc> <mem_free>679477248<mem_free> <mem_reserved>1431306240</mem_reserved> <mem_service>34603008</mem_service> <mem_total>4292870144</mem_total> <srv_enabled>1</srv_enabled> <srv_running>1</srv_running> <srv_total>1</srv_total> <system_uptime>1496636</system_uptime> <version>2.8.9 hf3561 e3624</version> </grid>
{
"disk_n" : "1",
"cpu_total" : "4.00",
"cpu_alloc" : "1.94",
"last_srv_failure_time" : "1270003032",
"mem_alloc" : "2147483648",
"app_running" : "2",
"srv_running" : "1",
"bw_total" : "2000000000",
"cpu_reserved" : "0.00",
"version" : "2.8.9 hf3561 e3624",
"mem_total" : "4292870144",
"name" : "mygrid",
"disk_reserved" : "10737418240",
"disk_total" : "1493697126400",
"system_uptime" : "1496641",
"srv_enabled" : "1",
"cpu_free" : "1.96",
"description" : "",
"mem_reserved" : "1431306240",
"mem_service" : "34603008",
"controller_uptime" : "1496462",
"bw_free" : "1430000000",
"disk_free" : "1148779407545",
"ha_state" : "checking...",
"srv_total" : "1",
"last_failed_srv" : "srv1",
"bw_reserved" : "0",
"cpu_load" : "0.42",
"mem_free" : "679477248",
"bw_alloc" : "570000000"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the option flag &verbose.
Retrieve detailed grid information
/api/v2/vdc/info_verbose?vdc=controller-name
Name of the target virtual data center
synchronous
GET
Get grid information.
GET http://192.168.123.200/api/v2/vdc/info_verbose?vdc=mygrid
<grid> <name>mygrid</name> <app_running>2</app_running> <bw_alloc>570000000</bw_alloc> <bw_free>1430000000</bw_free> <bw_reserved>0</bw_reserved> <bw_total>2000000000</bw_total> <controller_uptime>1496456</controller_uptime> <cpu_alloc>1.94</cpu_alloc> <cpu_free>1.96</cpu_free> <cpu_load>0.03</cpu_load> <cpu_reserved>0.00</cpu_reserved> <cpu_total>4.00</cpu_total> <description></description> <disk_free>1148779407545</disk_free> <disk_n>1</disk_n> <disk_reserved>10737418240</disk_reserved> <disk_total>1493697126400</disk_total> <ha_state>checking...</ha_state> <last_failed_srv>srv1</last_failed_srv> <last_srv_failure_time>270003032</last_srv_failure_time> <mem_alloc>2147483648</mem_alloc> <mem_free>679477248<mem_free> <mem_reserved>1431306240</mem_reserved> <mem_service>34603008</mem_service> <mem_total>4292870144</mem_total> <srv_enabled>1</srv_enabled> <srv_running>1</srv_running> <srv_total>1</srv_total> <system_uptime>1496636</system_uptime> <version>2.8.9 hf3561 e3624</version> </grid>
{
"disk_n" : "1",
"cpu_total" : "4.00",
"cpu_alloc" : "1.94",
"last_srv_failure_time" : "1270003032",
"mem_alloc" : "2147483648",
"app_running" : "2",
"srv_running" : "1",
"bw_total" : "2000000000",
"cpu_reserved" : "0.00",
"version" : "2.8.9 hf3561 e3624",
"mem_total" : "4292870144",
"name" : "mygrid",
"disk_reserved" : "10737418240",
"disk_total" : "1493697126400",
"system_uptime" : "1496641",
"srv_enabled" : "1",
"cpu_free" : "1.96",
"description" : "",
"mem_reserved" : "1431306240",
"mem_service" : "34603008",
"controller_uptime" : "1496462",
"bw_free" : "1430000000",
"disk_free" : "1148779407545",
"ha_state" : "checking...",
"srv_total" : "1",
"last_failed_srv" : "srv1",
"bw_reserved" : "0",
"cpu_load" : "0.42",
"mem_free" : "679477248",
"bw_alloc" : "570000000"
}
Entity vdc mygrid not found - A VDC name was specified that is configured in the WS_API application.
Retrieve grids configured to work with the WS_API
/api/v2/vdc/list
None
synchronous
GET
List grids.
GET http://192.168.123.200/api/v2/vdc/list
<vdcs> <vdc> <name>mygrid</name> <default>1</default> <host>72.233.72.121</host> <location>Dallas, TX, USA</location> </vdc> </vdcs>
{
"vdc" : [
{
"location" : "Dallas, TX, USA",
"name" : "mygrid",
"default" : 1,
"host" : "72.233.72.121"
}
]
}
Retrieve grid configuration parameter(s)
/api/v2/vdc/get?vdc=controller-name&prop=property-name /api/v2/vdc/get?vdc=controller-name&all
Name of the target virtual data center
synchronous
GET
Get all grid configuration information.
GET http://192.168.123.200/api/v2/vdc/get?vdc=mygrid&all
<configuration> <recovery_password></recovery_password> </configuration>
{
"configuration" : {
"recovery_password" : ""
}
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Set grid configuration parameter(s)
/api/v2/vdc/set?vdc=controller-name&property-name=value
Name of the property to set
Name of the target virtual data center
synchronous
GET
Set or change the recovery_password on grid mygrid
GET http://192.168.123.200/api/v2/vdc/set?vdc=mygrid&recovery_password=test12345
<message>Please reboot the grid controller for the password change to take effect.</message>
{
"message" : "Please reboot the grid controller for the password change to take effect."
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Entity not found - Network HA-related settings may only be modified by a grid maintainer.
Most properties require maintainer access to set.
Display the grid ACL, or display that portion of the grid ACL which relates to a particular principal.
/api/v2/vdc/get_acl?vdc=controller-name
Name of the target virtual data center
synchronous
GET
Example: Display ACL for vdc mygrid
GET http://192.168.123.200/api/v2/vdc/get_acl?vdc=mygrid
{
"acl" : {
"owner" : {
"id" : "a5cb10bc-7291-4a86-84f8-74419fc9ae63"
},
"entries" : [
{
"grid_administrator" : 1,
"id" : "a5cb10bc-7291-4a86-84f8-74419fc9ae63"
},
{
"grid_administrator" : 1,
"id" : "8bc880d9-c86c-4d70-95b7-77438bf7d4d1"
},
{
"app_developer" : 1,
"id" : "4326b4d1-8896-4c92-931a-18a9fd6e0509"
},
{
"app_developer" : 1,
"id" : "afeb0c36-539f-4299-946b-820a0411f3de"
}
]
}
}
<acl>
<entries>
<entry>
<grid_administrator>1</grid_administrator>
<id>a5cb10bc-7291-4a86-84f8-74419fc9ae63</id>
</entry>
<entry>
<grid_administrator>1</grid_administrator>
<id>8bc880d9-c86c-4d70-95b7-77438bf7d4d1</id>
</entry>
<entry>
<app_developer>1</app_developer>
<id>4326b4d1-8896-4c92-931a-18a9fd6e0509</id>
</entry>
<entry>
<app_developer>1</app_developer>
<id>afeb0c36-539f-4299-946b-820a0411f3de</id>
</entry>
</entries>
<owner>
<id>a5cb10bc-7291-4a86-84f8-74419fc9ae63</id>
</owner>
</acl>
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Entity not found - Failed to retrieve application ACL - ACL does not contain principal local user 'test@3tera.com'.
- An invalid principal was specified
This API is available with WS_API_r6-1.0.6-1 and above.
Replace the entire grid ACL.
/api/v2/vdc/put_acl?owner=<owner>&acl=<ACLs>&vdc=controller-name
A URL-encoded owner attribute of the grid ACL to the specified principal
URL-encoded list of principals separated with a slash (/)
Name of the target virtual data center
synchronous
GET
Replace the entire ACL for vdc mygrid with an owner api@3tera.com
GET http://192.168.123.200/api/v2/vdc/put_acl? owner=local%3Auser%3Aapi%403tera.com&acl=&vdc=mygrid
Replace the entire ACL for vdc mygrid with an owner api@3tera.com and principal local:user:api@3tera.com=app_developer
GET http://192.168.123.200/api/v2/vdc/put_acl?owner=local%3Auser%3Aapi%403tera.com&acl=local%3Auser%3Aapi%403tera.com%3Dapp_developer&vdc=mygrid
Replace the entire ACL for vdc mygrid with an owner api@3tera.com and principal local:user:api@3tera.com=app_developer/local:user:test@3tera.com=monitor.
GET http://192.168.123.200/api/v2/vdc/put_acl?owner=local%3Auser%3Aapi%403tera.com&acl=local%3Auser%3Aapi%403tera.com%3Dapp_developer%2Flocal%3Auser%3Atest%403tera.com%3Dmonitor&vdc=mygrid
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (owner)
- Argument owner=owner
Missing required arguments (acl)
- Argument acl=acl missing
Entity not found - Failed to put grid ACL - invalid principal data - principal local user 'test@3tera.com' does not exist.
- An invalid owner or acl was specified
{
"message" : ""
}
<message></message>
This API is available with WS_API_r6-1.0.6-1 and above.
Replace that portion of the grid ACL which relates to the owner or a principal.
/api/v2/vdc/modify_acl?acl=<ACLs>&vdc=controller-name
URL-encoded list of principals separated with a slash (/)
Name of the target virtual data center
synchronous
GET
Replace that portion of the grid ACL which relates to the local user 'api@3tera.com', providing grid_administrator access level permissions to this user
GET http://192.168.123.200/api/v2/vdc/modify_acl?acl=local%3Auser%3Aapi%403tera.com%3Dgrid_administrator&vdc=mygrid
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (acl)
- Argument acl=acl missing
Entity not found - Failed to modify ACL - invalid principal data - principal local user 'test@3tera.com' does not exist.
- An invalid acl was specified
{
"message" : ""
}
<message></message>
This API is available with WS_API_r6-1.0.6-1 and above.
Reboot a grid
/api/v2/vdc/reboot?&vdc=controller-name
Name of the target virtual data center
Reason why the grid is being rebooted.
asynchronous
GET
Reboot grid mygrid.
GET http://aux/api/v2/vdc/reboot?&vdc=mygrid&reason=maintenance
<job>be805915-76b2-48c8-b8a0-b881cca66d10</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66d10"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Shut a grid down
/api/v2/vdc/shutdown?&vdc=controller-name
Name of the virtual data center to shutdown
Reason why the grid is being shutdown.
asynchronous
GET
Shut the grid mygrid down.
GET http://aux/api/v2/vdc/shutdown?&vdc=mygrid&reason=maintenance
<job>be805915-76b2-48c8-b8a0-b881cca66d11</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66d11"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Power cycle a grid
/api/v2/vdc/power_cycle?&vdc=controller-name
Name of the target virtual data center
asynchronous
GET
Power cycle the grid mygrid
GET http://192.168.123.200/api/v2/vdc/power_cycle?vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66d12</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66d12"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Only valid when "Power Control" is enabled.
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|