Fix doc for service list
If a service is enabled, the "disabled_reason" field in response
for /v2/.{tenant_id}./os-services/detail is null, however, currently
it's specified as "" in the doc, thus may be confusing to users.
This patch change the template and doc, it should not cause issue to
existing applications.
Change-Id: Ia71ec4c97a355bcc1a7b63e6107db77f80a5d843
Close-bug: 1328382
This commit is contained in:
committed by
yunhong-jiang
parent
0ca98979da
commit
df60f2cd33
@@ -25,7 +25,7 @@
|
|||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"updated_at": "2012-09-19T06:55:34.000000",
|
"updated_at": "2012-09-19T06:55:34.000000",
|
||||||
"zone": "internal",
|
"zone": "internal",
|
||||||
"disabled_reason": ""
|
"disabled_reason": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"binary": "nova-compute",
|
"binary": "nova-compute",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<services>
|
<services>
|
||||||
<service status="disabled" binary="nova-scheduler" zone="internal" state="up" host="host1" updated_at="2012-10-29 13:42:02" disabled_reason="test1"/>
|
<service status="disabled" binary="nova-scheduler" zone="internal" state="up" host="host1" updated_at="2012-10-29 13:42:02" disabled_reason="test1"/>
|
||||||
<service status="disabled" binary="nova-compute" zone="nova" state="up" host="host1" updated_at="2012-10-29 13:42:05" disabled_reason="test2"/>
|
<service status="disabled" binary="nova-compute" zone="nova" state="up" host="host1" updated_at="2012-10-29 13:42:05" disabled_reason="test2"/>
|
||||||
<service status="enabled" binary="nova-scheduler" zone="internal" state="down" host="host2" updated_at="2012-09-19 06:55:34" disabled_reason=""/>
|
<service status="enabled" binary="nova-scheduler" zone="internal" state="down" host="host2" updated_at="2012-09-19 06:55:34" disabled_reason="None"/>
|
||||||
<service status="disabled" binary="nova-compute" zone="nova" state="down" host="host2" updated_at="2012-09-18 08:03:38" disabled_reason="test4"/>
|
<service status="disabled" binary="nova-compute" zone="nova" state="down" host="host2" updated_at="2012-09-18 08:03:38" disabled_reason="test4"/>
|
||||||
</services>
|
</services>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"binary": "nova-scheduler",
|
"binary": "nova-scheduler",
|
||||||
"disabled_reason": "",
|
"disabled_reason": null,
|
||||||
"host": "host2",
|
"host": "host2",
|
||||||
"state": "down",
|
"state": "down",
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ fake_services_list = [
|
|||||||
topic='scheduler',
|
topic='scheduler',
|
||||||
updated_at=datetime.datetime(2012, 9, 19, 6, 55, 34),
|
updated_at=datetime.datetime(2012, 9, 19, 6, 55, 34),
|
||||||
created_at=datetime.datetime(2012, 9, 18, 2, 46, 28),
|
created_at=datetime.datetime(2012, 9, 18, 2, 46, 28),
|
||||||
disabled_reason=''),
|
disabled_reason=None),
|
||||||
dict(test_service.fake_service,
|
dict(test_service.fake_service,
|
||||||
binary='nova-compute',
|
binary='nova-compute',
|
||||||
host='host2',
|
host='host2',
|
||||||
@@ -278,7 +278,7 @@ class ServicesTest(test.TestCase):
|
|||||||
'status': 'enabled',
|
'status': 'enabled',
|
||||||
'state': 'down',
|
'state': 'down',
|
||||||
'updated_at': datetime.datetime(2012, 9, 19, 6, 55, 34),
|
'updated_at': datetime.datetime(2012, 9, 19, 6, 55, 34),
|
||||||
'disabled_reason': ''},
|
'disabled_reason': None},
|
||||||
{'binary': 'nova-compute',
|
{'binary': 'nova-compute',
|
||||||
'host': 'host2',
|
'host': 'host2',
|
||||||
'zone': 'nova',
|
'zone': 'nova',
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ fake_services_list = [
|
|||||||
topic='scheduler',
|
topic='scheduler',
|
||||||
updated_at=datetime.datetime(2012, 9, 19, 6, 55, 34),
|
updated_at=datetime.datetime(2012, 9, 19, 6, 55, 34),
|
||||||
created_at=datetime.datetime(2012, 9, 18, 2, 46, 28),
|
created_at=datetime.datetime(2012, 9, 18, 2, 46, 28),
|
||||||
disabled_reason=''),
|
disabled_reason=None),
|
||||||
dict(test_service.fake_service,
|
dict(test_service.fake_service,
|
||||||
binary='nova-compute',
|
binary='nova-compute',
|
||||||
host='host2',
|
host='host2',
|
||||||
@@ -194,7 +194,7 @@ class ServicesTest(test.TestCase):
|
|||||||
'status': 'enabled',
|
'status': 'enabled',
|
||||||
'state': 'down',
|
'state': 'down',
|
||||||
'updated_at': datetime.datetime(2012, 9, 19, 6, 55, 34),
|
'updated_at': datetime.datetime(2012, 9, 19, 6, 55, 34),
|
||||||
'disabled_reason': ''},
|
'disabled_reason': None},
|
||||||
{'binary': 'nova-compute',
|
{'binary': 'nova-compute',
|
||||||
'host': 'host2',
|
'host': 'host2',
|
||||||
'id': 4,
|
'id': 4,
|
||||||
@@ -437,7 +437,7 @@ class ServicesCellsTest(test.TestCase):
|
|||||||
'state': 'down',
|
'state': 'down',
|
||||||
'updated_at': datetime.datetime(2012, 9, 19, 6, 55, 34,
|
'updated_at': datetime.datetime(2012, 9, 19, 6, 55, 34,
|
||||||
tzinfo=utc),
|
tzinfo=utc),
|
||||||
'disabled_reason': ''},
|
'disabled_reason': None},
|
||||||
{'id': 'cell1@4',
|
{'id': 'cell1@4',
|
||||||
'binary': 'nova-compute',
|
'binary': 'nova-compute',
|
||||||
'host': 'host2',
|
'host': 'host2',
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
{
|
{
|
||||||
"binary": "nova-scheduler",
|
"binary": "nova-scheduler",
|
||||||
"host": "host2",
|
"host": "host2",
|
||||||
"disabled_reason": "",
|
"disabled_reason": null,
|
||||||
"state": "down",
|
"state": "down",
|
||||||
"status": "enabled",
|
"status": "enabled",
|
||||||
"updated_at": "%(strtime)s",
|
"updated_at": "%(strtime)s",
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
<services>
|
<services>
|
||||||
<service status="disabled" binary="nova-scheduler" zone="internal" state="up" updated_at="%(xmltime)s" host="host1" disabled_reason="test1"/>
|
<service status="disabled" binary="nova-scheduler" zone="internal" state="up" updated_at="%(xmltime)s" host="host1" disabled_reason="test1"/>
|
||||||
<service status="disabled" binary="nova-compute" zone="nova" state="up" updated_at="%(xmltime)s" host="host1" disabled_reason="test2"/>
|
<service status="disabled" binary="nova-compute" zone="nova" state="up" updated_at="%(xmltime)s" host="host1" disabled_reason="test2"/>
|
||||||
<service status="enabled" binary="nova-scheduler" zone="internal" state="down" updated_at="%(xmltime)s" host="host2" disabled_reason=""/>
|
<service status="enabled" binary="nova-scheduler" zone="internal" state="down" updated_at="%(xmltime)s" host="host2" disabled_reason="None"/>
|
||||||
<service status="disabled" binary="nova-compute" zone="nova" state="down" updated_at="%(xmltime)s" host="host2" disabled_reason="test4"/>
|
<service status="disabled" binary="nova-compute" zone="nova" state="down" updated_at="%(xmltime)s" host="host2" disabled_reason="test4"/>
|
||||||
</services>
|
</services>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"binary": "nova-scheduler",
|
"binary": "nova-scheduler",
|
||||||
"disabled_reason": "",
|
"disabled_reason": null,
|
||||||
"host": "host2",
|
"host": "host2",
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"state": "down",
|
"state": "down",
|
||||||
|
|||||||
Reference in New Issue
Block a user