-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathos-agents.inc
175 lines (115 loc) · 3.46 KB
/
os-agents.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
.. -*- rst -*
==========================
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
applications or scripts in the guest while the agent is running. This
hypervisor-specific extension is currently only for the Xen driver. Use of
guest agents is possible only if the underlying service provider uses
the Xen driver.
.. warning::
These APIs only works with the Xen virt driver, which was deprecated in the
20.0.0 (Train) release.
They were removed in the 22.0.0 (Victoria) release.
List Agent Builds
=================
.. rest_method:: GET /os-agents
Lists agent builds.
Normal response codes: 200
Error response codes: unauthorized(401), forbidden(403), gone(410)
Request
-------
.. rest_parameters:: parameters.yaml
- hypervisor: hypervisor_query
Response
--------
.. rest_parameters:: parameters.yaml
- agents: agents
- agent_id: agent_id
- architecture: architecture
- hypervisor: hypervisor_type
- md5hash: md5hash
- os: os
- url: url
- version: version
**Example List Agent Builds: JSON response**
.. literalinclude:: ../../doc/api_samples/os-agents/agents-get-resp.json
:language: javascript
Create Agent Build
==================
.. rest_method:: POST /os-agents
Creates an agent build.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
conflict(409), gone(410)
Request
-------
.. rest_parameters:: parameters.yaml
- agent: agent
- hypervisor: hypervisor_type
- os: os
- architecture: architecture
- version: version
- md5hash: md5hash
- url: url
**Example Create Agent Build: JSON request**
.. literalinclude:: ../../doc/api_samples/os-agents/agent-post-req.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- agent: agent
- agent_id: agent_id
- architecture: architecture
- hypervisor: hypervisor_type
- md5hash: md5hash
- os: os
- url: url
- version: version
**Example Create Agent Build: JSON response**
.. literalinclude:: ../../doc/api_samples/os-agents/agent-post-resp.json
:language: javascript
Update Agent Build
==================
.. rest_method:: PUT /os-agents/{agent_build_id}
Updates an agent build.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), gone(410)
Request
-------
.. rest_parameters:: parameters.yaml
- agent_build_id: agent_build_id
- para: para
- url: url
- md5hash: md5hash
- version: version
**Example Update Agent Build: JSON request**
.. literalinclude:: ../../doc/api_samples/os-agents/agent-update-put-req.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- agent: agent
- agent_id: agent_id_str
- md5hash: md5hash
- url: url
- version: version
**Example Update Agent Build: JSON response**
.. literalinclude:: ../../doc/api_samples/os-agents/agent-update-put-resp.json
:language: javascript
Delete Agent Build
==================
.. rest_method:: DELETE /os-agents/{agent_build_id}
Deletes an existing agent build.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
itemNotFound(404), gone(410)
Request
-------
.. rest_parameters:: parameters.yaml
- agent_build_id: agent_build_id
Response
--------
There is no body content for the response of a successful DELETE query