2016-07-07 13:45:31 +08:00
|
|
|
.. -*- rst -*
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
==========================
|
|
|
|
Guest agents (os-agents)
|
|
|
|
==========================
|
|
|
|
|
|
|
|
Creates, lists, updates, and deletes guest agent builds. Use guest
|
|
|
|
agents to access files on the disk, configure networking, or run other
|
2016-07-07 13:45:31 +08:00
|
|
|
applications or scripts in the guest while the agent is running. This
|
|
|
|
hypervisor-specific extension is currently only for the Xen driver. Use of
|
2016-04-12 09:03:46 -04:00
|
|
|
guest agents is possible only if the underlying service provider uses
|
|
|
|
the Xen driver.
|
|
|
|
|
|
|
|
List Agent Builds
|
|
|
|
=================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /os-agents
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Lists agent builds.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-05-06 13:43:31 -04:00
|
|
|
Error response codes: unauthorized(401), forbidden(403)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-06 14:14:28 -04:00
|
|
|
- hypervisor: hypervisor_query
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-06-06 14:14:28 -04:00
|
|
|
|
|
|
|
Response
|
|
|
|
--------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- agents: agents
|
2016-04-12 09:03:46 -04:00
|
|
|
- agent_id: agent_id
|
|
|
|
- architecture: architecture
|
2016-04-20 11:20:05 -04:00
|
|
|
- hypervisor: hypervisor_type
|
2016-04-12 09:03:46 -04:00
|
|
|
- md5hash: md5hash
|
2016-05-06 13:43:31 -04:00
|
|
|
- os: os
|
2016-06-06 14:14:28 -04:00
|
|
|
- url: url
|
2016-04-12 09:03:46 -04:00
|
|
|
- version: version
|
|
|
|
|
2016-04-19 17:52:18 +09:00
|
|
|
**Example List Agent Builds: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-19 19:32:48 +09:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-agents/agents-get-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
2016-05-06 13:43:31 -04:00
|
|
|
Create Agent Build
|
2016-04-12 09:03:46 -04:00
|
|
|
==================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: POST /os-agents
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-06 13:43:31 -04:00
|
|
|
Creates an agent build.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-19 19:32:48 +09:00
|
|
|
Normal response codes: 200
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-06 13:43:31 -04:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403), conflict(409)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-06 14:14:28 -04:00
|
|
|
- agent: agent
|
2016-05-06 13:43:31 -04:00
|
|
|
- hypervisor: hypervisor_type
|
|
|
|
- os: os
|
2016-06-06 14:14:28 -04:00
|
|
|
- architecture: architecture
|
2016-05-06 13:43:31 -04:00
|
|
|
- version: version
|
2016-06-06 14:14:28 -04:00
|
|
|
- md5hash: md5hash
|
|
|
|
- url: url
|
2016-05-06 13:43:31 -04:00
|
|
|
|
|
|
|
**Example Create Agent Build: JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-agents/agent-post-req.json
|
|
|
|
:language: javascript
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-06 13:43:31 -04:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-06 14:14:28 -04:00
|
|
|
- agent: agent
|
|
|
|
- agent_id: agent_id
|
2016-05-06 13:43:31 -04:00
|
|
|
- architecture: architecture
|
2016-06-06 14:14:28 -04:00
|
|
|
- hypervisor: hypervisor_type
|
|
|
|
- md5hash: md5hash
|
2016-05-06 13:43:31 -04:00
|
|
|
- os: os
|
|
|
|
- url: url
|
|
|
|
- version: version
|
|
|
|
|
|
|
|
**Example Create Agent Build: JSON response**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/os-agents/agent-post-resp.json
|
|
|
|
:language: javascript
|
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
Update Agent Build
|
|
|
|
==================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: PUT /os-agents/{agent_build_id}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Updates an agent build.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-05-06 13:43:31 -04:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
- agent_build_id: agent_build_id
|
2016-06-06 14:14:28 -04:00
|
|
|
- para: para
|
2016-04-12 09:03:46 -04:00
|
|
|
- url: url
|
|
|
|
- md5hash: md5hash
|
|
|
|
- version: version
|
|
|
|
|
|
|
|
**Example Update Agent Build: JSON request**
|
|
|
|
|
2016-04-19 19:32:48 +09:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-agents/agent-update-put-req.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-06 14:14:28 -04:00
|
|
|
- agent: agent
|
2016-04-19 21:02:15 +08:00
|
|
|
- agent_id: agent_id_str
|
2016-04-12 09:03:46 -04:00
|
|
|
- md5hash: md5hash
|
2016-06-06 14:14:28 -04:00
|
|
|
- url: url
|
2016-04-12 09:03:46 -04:00
|
|
|
- version: version
|
|
|
|
|
2016-04-19 17:52:18 +09:00
|
|
|
**Example Update Agent Build: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-19 19:32:48 +09:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-agents/agent-update-put-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
2016-05-06 13:43:31 -04:00
|
|
|
|
|
|
|
Delete Agent Build
|
|
|
|
==================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: DELETE /os-agents/{agent_build_id}
|
2016-05-06 13:43:31 -04:00
|
|
|
|
|
|
|
Deletes an existing agent build.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404)
|
|
|
|
|
|
|
|
Request
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-05-06 13:43:31 -04:00
|
|
|
- agent_build_id: agent_build_id
|
|
|
|
|
|
|
|
Response
|
|
|
|
--------
|
|
|
|
|
2016-06-06 14:14:28 -04:00
|
|
|
There is no body content for the response of a successful DELETE query
|