From ba71b8d9abc4b292c57b03b85006395211c383bd Mon Sep 17 00:00:00 2001 From: Takashi NATSUME Date: Mon, 27 Jun 2016 21:23:57 +0900 Subject: [PATCH] api-ref: Example verification for os-agents.inc Currently only 'xen' is supported for the 'hypervisor' parameter. So examples are changed to 'xen' instead of 'hypervisor'. Change-Id: Ibd40dcfd3801c7a4165e299a1232ea46f2f17cf4 Implements: blueprint api-ref-in-rst --- api-ref/source/os-agents.inc | 1 - doc/api_samples/os-agents/agent-post-req.json | 2 +- doc/api_samples/os-agents/agent-post-resp.json | 2 +- doc/api_samples/os-agents/agents-get-resp.json | 2 +- .../api_samples/os-agents/agent-post-resp.json.tpl | 2 +- .../api_samples/os-agents/agents-get-resp.json.tpl | 2 +- nova/tests/functional/api_sample_tests/test_agents.py | 4 ++-- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/api-ref/source/os-agents.inc b/api-ref/source/os-agents.inc index eb66d81ffe67..0410656030df 100644 --- a/api-ref/source/os-agents.inc +++ b/api-ref/source/os-agents.inc @@ -1,5 +1,4 @@ .. -*- rst -*- -.. needs:example_verification .. needs:body_verification ========================== diff --git a/doc/api_samples/os-agents/agent-post-req.json b/doc/api_samples/os-agents/agent-post-req.json index 1913498547ca..580d44b65c96 100644 --- a/doc/api_samples/os-agents/agent-post-req.json +++ b/doc/api_samples/os-agents/agent-post-req.json @@ -1,6 +1,6 @@ { "agent": { - "hypervisor": "hypervisor", + "hypervisor": "xen", "os": "os", "architecture": "x86", "version": "8.0", diff --git a/doc/api_samples/os-agents/agent-post-resp.json b/doc/api_samples/os-agents/agent-post-resp.json index 24ddede90b45..644c4c73d35a 100644 --- a/doc/api_samples/os-agents/agent-post-resp.json +++ b/doc/api_samples/os-agents/agent-post-resp.json @@ -2,7 +2,7 @@ "agent": { "agent_id": 1, "architecture": "x86", - "hypervisor": "hypervisor", + "hypervisor": "xen", "md5hash": "add6bb58e139be103324d04d82d8f545", "os": "os", "url": "http://example.com/path/to/resource", diff --git a/doc/api_samples/os-agents/agents-get-resp.json b/doc/api_samples/os-agents/agents-get-resp.json index 92e14e1dc51f..6f31e256b058 100644 --- a/doc/api_samples/os-agents/agents-get-resp.json +++ b/doc/api_samples/os-agents/agents-get-resp.json @@ -3,7 +3,7 @@ { "agent_id": 1, "architecture": "x86", - "hypervisor": "hypervisor", + "hypervisor": "xen", "md5hash": "add6bb58e139be103324d04d82d8f545", "os": "os", "url": "http://example.com/path/to/resource", diff --git a/nova/tests/functional/api_sample_tests/api_samples/os-agents/agent-post-resp.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/os-agents/agent-post-resp.json.tpl index 24ddede90b45..644c4c73d35a 100644 --- a/nova/tests/functional/api_sample_tests/api_samples/os-agents/agent-post-resp.json.tpl +++ b/nova/tests/functional/api_sample_tests/api_samples/os-agents/agent-post-resp.json.tpl @@ -2,7 +2,7 @@ "agent": { "agent_id": 1, "architecture": "x86", - "hypervisor": "hypervisor", + "hypervisor": "xen", "md5hash": "add6bb58e139be103324d04d82d8f545", "os": "os", "url": "http://example.com/path/to/resource", diff --git a/nova/tests/functional/api_sample_tests/api_samples/os-agents/agents-get-resp.json.tpl b/nova/tests/functional/api_sample_tests/api_samples/os-agents/agents-get-resp.json.tpl index 92e14e1dc51f..6f31e256b058 100644 --- a/nova/tests/functional/api_sample_tests/api_samples/os-agents/agents-get-resp.json.tpl +++ b/nova/tests/functional/api_sample_tests/api_samples/os-agents/agents-get-resp.json.tpl @@ -3,7 +3,7 @@ { "agent_id": 1, "architecture": "x86", - "hypervisor": "hypervisor", + "hypervisor": "xen", "md5hash": "add6bb58e139be103324d04d82d8f545", "os": "os", "url": "http://example.com/path/to/resource", diff --git a/nova/tests/functional/api_sample_tests/test_agents.py b/nova/tests/functional/api_sample_tests/test_agents.py index e22205d57068..346b67913b81 100644 --- a/nova/tests/functional/api_sample_tests/test_agents.py +++ b/nova/tests/functional/api_sample_tests/test_agents.py @@ -25,7 +25,7 @@ class AgentsJsonTest(api_sample_base.ApiSampleTestBaseV21): super(AgentsJsonTest, self).setUp() fake_agents_list = [{'url': 'http://example.com/path/to/resource', - 'hypervisor': 'hypervisor', + 'hypervisor': 'xen', 'architecture': 'x86', 'os': 'os', 'version': '8.0', @@ -62,7 +62,7 @@ class AgentsJsonTest(api_sample_base.ApiSampleTestBaseV21): def test_agent_create(self): # Creates a new agent build. project = {'url': 'http://example.com/path/to/resource', - 'hypervisor': 'hypervisor', + 'hypervisor': 'xen', 'architecture': 'x86', 'os': 'os', 'version': '8.0',