Merge "Add service id to information provided by API"
This commit is contained in:
commit
f16c113006
@ -29,6 +29,9 @@ class ServicesAdminTest(base.BaseSharesAdminTest):
|
|||||||
self.assertIn(int(resp["status"]), test.HTTP_SUCCESS)
|
self.assertIn(int(resp["status"]), test.HTTP_SUCCESS)
|
||||||
self.assertNotEqual(0, len(services))
|
self.assertNotEqual(0, len(services))
|
||||||
|
|
||||||
|
for service in services:
|
||||||
|
self.assertIsNotNone(service['id'])
|
||||||
|
|
||||||
@test.attr(type=["gate", "smoke", ])
|
@test.attr(type=["gate", "smoke", ])
|
||||||
def test_get_services_by_host_name(self):
|
def test_get_services_by_host_name(self):
|
||||||
host = self.services[0]["host"]
|
host = self.services[0]["host"]
|
||||||
|
@ -64,6 +64,7 @@ class ServiceController(object):
|
|||||||
services = []
|
services = []
|
||||||
for service in all_services:
|
for service in all_services:
|
||||||
service = {
|
service = {
|
||||||
|
'id': service['id'],
|
||||||
'binary': service['binary'],
|
'binary': service['binary'],
|
||||||
'host': service['host'],
|
'host': service['host'],
|
||||||
'zone': service['availability_zone'],
|
'zone': service['availability_zone'],
|
||||||
|
@ -68,6 +68,7 @@ fake_services_list = [
|
|||||||
|
|
||||||
fake_response_service_list = {'services': [
|
fake_response_service_list = {'services': [
|
||||||
{
|
{
|
||||||
|
'id': 1,
|
||||||
'binary': 'manila-scheduler',
|
'binary': 'manila-scheduler',
|
||||||
'host': 'host1',
|
'host': 'host1',
|
||||||
'zone': 'manila1',
|
'zone': 'manila1',
|
||||||
@ -75,6 +76,7 @@ fake_response_service_list = {'services': [
|
|||||||
'updated_at': datetime.datetime(2012, 10, 29, 13, 42, 2),
|
'updated_at': datetime.datetime(2012, 10, 29, 13, 42, 2),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
'id': 2,
|
||||||
'binary': 'manila-share',
|
'binary': 'manila-share',
|
||||||
'host': 'host1',
|
'host': 'host1',
|
||||||
'zone': 'manila1',
|
'zone': 'manila1',
|
||||||
@ -83,6 +85,7 @@ fake_response_service_list = {'services': [
|
|||||||
'updated_at': datetime.datetime(2012, 10, 29, 13, 42, 5),
|
'updated_at': datetime.datetime(2012, 10, 29, 13, 42, 5),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
'id': 3,
|
||||||
'binary': 'manila-scheduler',
|
'binary': 'manila-scheduler',
|
||||||
'host': 'host2',
|
'host': 'host2',
|
||||||
'zone': 'manila2',
|
'zone': 'manila2',
|
||||||
@ -91,6 +94,7 @@ fake_response_service_list = {'services': [
|
|||||||
'updated_at': datetime.datetime(2012, 9, 19, 6, 55, 34),
|
'updated_at': datetime.datetime(2012, 9, 19, 6, 55, 34),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
'id': 4,
|
||||||
'binary': 'manila-share',
|
'binary': 'manila-share',
|
||||||
'host': 'host2',
|
'host': 'host2',
|
||||||
'zone': 'manila2',
|
'zone': 'manila2',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user