summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorivan-zhu <bozhu@linux.vnet.ibm.com>2012-11-21 15:37:52 +0800
committerivan-zhu <bozhu@linux.vnet.ibm.com>2012-12-05 16:39:48 +0800
commit82042ac2766b892d561836cd312656940522734a (patch)
tree12077309bc04865833199eb0c6de10479c389e6b /doc
parent255692feea3eee12bfc763f75fc8f3dabdbe9ba5 (diff)
downloadnova-82042ac2766b892d561836cd312656940522734a.tar.gz
nova-82042ac2766b892d561836cd312656940522734a.tar.xz
nova-82042ac2766b892d561836cd312656940522734a.zip
Add agent build API support for list/create/delete/modify agent build
This adds an extension that provides REST API for list/create/delete/ modify agent build. The interface is accessed via GET /v2/{tenant_id}/os-agents PUT /v2/{tenant_id}/os-agents/id POST /v2/{tenant_id}/os-agents DELETE /v2/{tenant_id}/os-agents And this patch also create tests to get agent build API Samples. DocImpact Implements one workitem of blueprint apis-for-nova-manage The agent is talking about guest agent.The host can use this for things like accessing files on the disk, configuring networking, or running other applications/scripts in the guest while it is running. Typically this uses some hypervisor-specific transport to avoid being dependent on a working network configuration. Xen, VMware, and VirtualBox have guest agents,although the Xen driver is the only one with an implementation for managing them in openstack. KVM doesn't really have a concept of a guest agent (although one could be written). You can find the design of agent update in this link: http://wiki.openstack.org/AgentUpdate and find the code in nova.virt.xenapi.vmops.VMOps._boot_new_instance. In this design We need update agent in guest from host, so we need some interfaces to update the agent info in host. You can find more information about the design of the GuestAgent in the following link: http://wiki.openstack.org/GuestAgent http://wiki.openstack.org/GuestAgentXenStoreCommunication DocImpact Change-Id: I5830388a894efce5b13680fc6916e0cd81a16624
Diffstat (limited to 'doc')
-rw-r--r--doc/api_samples/all_extensions/extensions-get-resp.json8
-rw-r--r--doc/api_samples/all_extensions/extensions-get-resp.xml3
-rw-r--r--doc/api_samples/os-agents/agent-post-req.json10
-rw-r--r--doc/api_samples/os-agents/agent-post-req.xml9
-rw-r--r--doc/api_samples/os-agents/agent-post-resp.json11
-rw-r--r--doc/api_samples/os-agents/agent-post-resp.xml10
-rw-r--r--doc/api_samples/os-agents/agent-update-put-req.json7
-rw-r--r--doc/api_samples/os-agents/agent-update-put-req.xml6
-rw-r--r--doc/api_samples/os-agents/agent-update-put-resp.json8
-rw-r--r--doc/api_samples/os-agents/agent-update-put-resp.xml7
-rw-r--r--doc/api_samples/os-agents/agents-get-resp.json13
-rw-r--r--doc/api_samples/os-agents/agents-get-resp.xml4
12 files changed, 96 insertions, 0 deletions
diff --git a/doc/api_samples/all_extensions/extensions-get-resp.json b/doc/api_samples/all_extensions/extensions-get-resp.json
index 399d937a7..cf3d66a76 100644
--- a/doc/api_samples/all_extensions/extensions-get-resp.json
+++ b/doc/api_samples/all_extensions/extensions-get-resp.json
@@ -65,6 +65,14 @@
"updated": "2011-09-20T00:00:00+00:00"
},
{
+ "alias": "os-agents",
+ "description": "Agents support",
+ "links": [],
+ "name": "Agents",
+ "namespace": "http://docs.openstack.org/compute/ext/agents/api/v2",
+ "updated": "2012-10-28T00:00:00-00:00"
+ },
+ {
"alias": "os-aggregates",
"description": "Admin-only aggregate administration",
"links": [],
diff --git a/doc/api_samples/all_extensions/extensions-get-resp.xml b/doc/api_samples/all_extensions/extensions-get-resp.xml
index e4d3b8cc3..44816c09c 100644
--- a/doc/api_samples/all_extensions/extensions-get-resp.xml
+++ b/doc/api_samples/all_extensions/extensions-get-resp.xml
@@ -28,6 +28,9 @@
resetNetwork, injectNetworkInfo, lock, unlock, createBackup
</description>
</extension>
+ <extension alias="os-agents" updated="2012-10-28T00:00:00-00:00" namespace="http://docs.openstack.org/compute/ext/agents/api/v2" name="Agents">
+ <description>Agents support</description>
+ </extension>
<extension alias="os-aggregates" updated="2012-01-12T00:00:00+00:00" namespace="http://docs.openstack.org/compute/ext/aggregates/api/v1.1" name="Aggregates">
<description>Admin-only aggregate administration</description>
</extension>
diff --git a/doc/api_samples/os-agents/agent-post-req.json b/doc/api_samples/os-agents/agent-post-req.json
new file mode 100644
index 000000000..217993b17
--- /dev/null
+++ b/doc/api_samples/os-agents/agent-post-req.json
@@ -0,0 +1,10 @@
+{
+ "agent": {
+ "hypervisor": "hypervisor",
+ "os": "os",
+ "architecture": "x86",
+ "version": "8.0",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "url": "xxxxxxxxxxxx"
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/os-agents/agent-post-req.xml b/doc/api_samples/os-agents/agent-post-req.xml
new file mode 100644
index 000000000..be93e97ce
--- /dev/null
+++ b/doc/api_samples/os-agents/agent-post-req.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<agent>
+ <hypervisor>hypervisor</hypervisor>
+ <os>os</os>
+ <architecture>x86</architecture>
+ <version>8.0</version>
+ <md5hash>add6bb58e139be103324d04d82d8f545</md5hash>
+ <url>xxxxxxxxxxxx</url>
+</agent> \ No newline at end of file
diff --git a/doc/api_samples/os-agents/agent-post-resp.json b/doc/api_samples/os-agents/agent-post-resp.json
new file mode 100644
index 000000000..418d11f50
--- /dev/null
+++ b/doc/api_samples/os-agents/agent-post-resp.json
@@ -0,0 +1,11 @@
+{
+ "agent": {
+ "agent_id": "1",
+ "architecture": "x86",
+ "hypervisor": "hypervisor",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "os": "os",
+ "url": "xxxxxxxxxxxx",
+ "version": "8.0"
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/os-agents/agent-post-resp.xml b/doc/api_samples/os-agents/agent-post-resp.xml
new file mode 100644
index 000000000..79f62b7fb
--- /dev/null
+++ b/doc/api_samples/os-agents/agent-post-resp.xml
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<agent>
+ <url>xxxxxxxxxxxx</url>
+ <hypervisor>hypervisor</hypervisor>
+ <md5hash>add6bb58e139be103324d04d82d8f545</md5hash>
+ <version>8.0</version>
+ <architecture>x86</architecture>
+ <os>os</os>
+ <agent_id>1</agent_id>
+</agent> \ No newline at end of file
diff --git a/doc/api_samples/os-agents/agent-update-put-req.json b/doc/api_samples/os-agents/agent-update-put-req.json
new file mode 100644
index 000000000..e4eaf5352
--- /dev/null
+++ b/doc/api_samples/os-agents/agent-update-put-req.json
@@ -0,0 +1,7 @@
+{
+ "para": {
+ "url": "xxx://xxxx/xxx/xxx",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "version": "7.0"
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/os-agents/agent-update-put-req.xml b/doc/api_samples/os-agents/agent-update-put-req.xml
new file mode 100644
index 000000000..f759880c1
--- /dev/null
+++ b/doc/api_samples/os-agents/agent-update-put-req.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<para>
+ <version>7.0</version>
+ <url>xxx://xxxx/xxx/xxx</url>
+ <md5hash>add6bb58e139be103324d04d82d8f545</md5hash>
+</para> \ No newline at end of file
diff --git a/doc/api_samples/os-agents/agent-update-put-resp.json b/doc/api_samples/os-agents/agent-update-put-resp.json
new file mode 100644
index 000000000..6b67222c8
--- /dev/null
+++ b/doc/api_samples/os-agents/agent-update-put-resp.json
@@ -0,0 +1,8 @@
+{
+ "agent": {
+ "agent_id": "1",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "url": "xxx://xxxx/xxx/xxx",
+ "version": "7.0"
+ }
+} \ No newline at end of file
diff --git a/doc/api_samples/os-agents/agent-update-put-resp.xml b/doc/api_samples/os-agents/agent-update-put-resp.xml
new file mode 100644
index 000000000..badf2750e
--- /dev/null
+++ b/doc/api_samples/os-agents/agent-update-put-resp.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<agent>
+ <url>xxx://xxxx/xxx/xxx</url>
+ <version>7.0</version>
+ <agent_id>1</agent_id>
+ <md5hash>add6bb58e139be103324d04d82d8f545</md5hash>
+</agent> \ No newline at end of file
diff --git a/doc/api_samples/os-agents/agents-get-resp.json b/doc/api_samples/os-agents/agents-get-resp.json
new file mode 100644
index 000000000..36eac4ced
--- /dev/null
+++ b/doc/api_samples/os-agents/agents-get-resp.json
@@ -0,0 +1,13 @@
+{
+ "agents": [
+ {
+ "agent_id": "1",
+ "architecture": "x86",
+ "hypervisor": "hypervisor",
+ "md5hash": "add6bb58e139be103324d04d82d8f545",
+ "os": "os",
+ "url": "xxxxxxxxxxxx",
+ "version": "8.0"
+ }
+ ]
+} \ No newline at end of file
diff --git a/doc/api_samples/os-agents/agents-get-resp.xml b/doc/api_samples/os-agents/agents-get-resp.xml
new file mode 100644
index 000000000..4194f62c9
--- /dev/null
+++ b/doc/api_samples/os-agents/agents-get-resp.xml
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<agents>
+ <agent url="xxxxxxxxxxxx" hypervisor="hypervisor" md5hash="add6bb58e139be103324d04d82d8f545" version="8.0" architecture="x86" os="os" agent_id="1"/>
+</agents> \ No newline at end of file