Agent Build
1. agents(id=None , **query)
Lists agent build.
Parameters:
| Name | Type | Description |
|---|---|---|
| id (optional) | String | user id. Provided to get specific server |
| query(optional) | Dict | queries |
Return value: GuestAgent Object or a list
Return value example:
version : 7.0
architecture : tempest-x86_64-1676793741
url : xxx://xxxx/xxx/xxx
hypervisor : common
md5hash : add6bb58e139be103324d04d82d8f545
os : linux
agent_id : 124
version : 7.0
architecture : tempest-x86_64-573887780
url : xxx://xxxx/xxx/xxx
hypervisor : common
md5hash : add6bb58e139be103324d04d82d8f545
os : linux
agent_id : 139
id : 0d1886b2-bede-4b31-ac0f-71ed5d48b2bb
links : [{u'href': u'http://10.200.43.31:8774/v2/cde9cbf5a7f1401a9389c84ba98bdcf6/servers/0d1886b2-bede-4b31-ac0f-71ed5d48b2bb', u'rel': u'self'}, {u'href': u'http://10.200.43.31:8774/cde9cbf5a7f1401a9389c84ba98bdcf6/servers/0d1886b2-bede-4b31-ac0f-71ed5d48b2bb', u'rel': u'bookmark'}]
name : kevinPythonTest
…
2. create_agent (**attrs)
Create agent build.
Parameters: attrs(Dict)
| Name | Type | Description |
|---|---|---|
| url | String | build url |
| hypervisor | String | hypervisor name |
| md5hash | String | md5hash |
| version | List | version |
| architecture | String | e.g: “x86” |
| os | String | os |
refer to openstack API: http://developer.openstack.org/api-ref/compute
Parameters example:
attr = {'url': 'http://example.com/path/to/resource', 'hypervisor': 'testPythonhy',
'md5hash': 'add6bb58e139be103324d04d82d8f545',
'version': '8.0',
'architecture': 'x86',
'os': 'testPythonos'}
Return value: GuestAgent Object
Return value example:
version : 8.0
architecture : x86
url : http://example.com/path/to/resource
hypervisor : testPythonhy
md5hash : add6bb58e139be103324d04d82d8f545
os : testPythonos
agent_id : 163
3. update_agent(agent, **attr)
Update agent build.
Parameters:
- agent(string): GuestAgent id or Object
- attr(Dict): attributes
Return value: GuestAgent Object
Return value example:
4. delete_agent(agent)
Delete agent build.
Parameters: agent: agent id or Object
Return value: None on success