Merge "Don't show deleted objects in v2 API"
This commit is contained in:
commit
8fdcb88dee
@ -76,7 +76,7 @@ class HealthMonitorController(base.BaseController):
|
|||||||
else:
|
else:
|
||||||
project_id = {'project_id': context.project_id}
|
project_id = {'project_id': context.project_id}
|
||||||
db_hm = self.repositories.health_monitor.get_all(
|
db_hm = self.repositories.health_monitor.get_all(
|
||||||
context.session, **project_id)
|
context.session, show_deleted=False, **project_id)
|
||||||
result = self._convert_db_to_type(
|
result = self._convert_db_to_type(
|
||||||
db_hm, [hm_types.HealthMonitorResponse])
|
db_hm, [hm_types.HealthMonitorResponse])
|
||||||
return hm_types.HealthMonitorsRootResponse(healthmonitors=result)
|
return hm_types.HealthMonitorsRootResponse(healthmonitors=result)
|
||||||
|
@ -63,7 +63,7 @@ class L7PolicyController(base.BaseController):
|
|||||||
else:
|
else:
|
||||||
project_id = {'project_id': context.project_id}
|
project_id = {'project_id': context.project_id}
|
||||||
db_l7policies = self.repositories.l7policy.get_all(
|
db_l7policies = self.repositories.l7policy.get_all(
|
||||||
context.session, **project_id)
|
context.session, show_deleted=False, **project_id)
|
||||||
result = self._convert_db_to_type(db_l7policies,
|
result = self._convert_db_to_type(db_l7policies,
|
||||||
[l7policy_types.L7PolicyResponse])
|
[l7policy_types.L7PolicyResponse])
|
||||||
return l7policy_types.L7PoliciesRootResponse(l7policies=result)
|
return l7policy_types.L7PoliciesRootResponse(l7policies=result)
|
||||||
|
@ -54,7 +54,7 @@ class L7RuleController(base.BaseController):
|
|||||||
"""Lists all l7rules of a l7policy."""
|
"""Lists all l7rules of a l7policy."""
|
||||||
context = pecan.request.context.get('octavia_context')
|
context = pecan.request.context.get('octavia_context')
|
||||||
db_l7rules = self.repositories.l7rule.get_all(
|
db_l7rules = self.repositories.l7rule.get_all(
|
||||||
context.session, l7policy_id=self.l7policy_id)
|
context.session, show_deleted=False, l7policy_id=self.l7policy_id)
|
||||||
result = self._convert_db_to_type(db_l7rules,
|
result = self._convert_db_to_type(db_l7rules,
|
||||||
[l7rule_types.L7RuleResponse])
|
[l7rule_types.L7RuleResponse])
|
||||||
return l7rule_types.L7RulesRootResponse(rules=result)
|
return l7rule_types.L7RulesRootResponse(rules=result)
|
||||||
|
@ -75,7 +75,7 @@ class ListenersController(base.BaseController):
|
|||||||
else:
|
else:
|
||||||
project_id = {'project_id': context.project_id}
|
project_id = {'project_id': context.project_id}
|
||||||
db_listeners = self.repositories.listener.get_all(
|
db_listeners = self.repositories.listener.get_all(
|
||||||
context.session, **project_id)
|
context.session, show_deleted=False, **project_id)
|
||||||
result = self._convert_db_to_type(db_listeners,
|
result = self._convert_db_to_type(db_listeners,
|
||||||
[listener_types.ListenerResponse])
|
[listener_types.ListenerResponse])
|
||||||
return listener_types.ListenersRootResponse(listeners=result)
|
return listener_types.ListenersRootResponse(listeners=result)
|
||||||
|
@ -64,7 +64,7 @@ class LoadBalancersController(base.BaseController):
|
|||||||
else:
|
else:
|
||||||
project_id = {'project_id': context.project_id}
|
project_id = {'project_id': context.project_id}
|
||||||
load_balancers = self.repositories.load_balancer.get_all(
|
load_balancers = self.repositories.load_balancer.get_all(
|
||||||
context.session, **project_id)
|
context.session, show_deleted=False, **project_id)
|
||||||
result = self._convert_db_to_type(load_balancers,
|
result = self._convert_db_to_type(load_balancers,
|
||||||
[lb_types.LoadBalancerResponse])
|
[lb_types.LoadBalancerResponse])
|
||||||
return lb_types.LoadBalancersRootResponse(loadbalancers=result)
|
return lb_types.LoadBalancersRootResponse(loadbalancers=result)
|
||||||
|
@ -55,7 +55,7 @@ class MembersController(base.BaseController):
|
|||||||
"""Lists all pool members of a pool."""
|
"""Lists all pool members of a pool."""
|
||||||
context = pecan.request.context.get('octavia_context')
|
context = pecan.request.context.get('octavia_context')
|
||||||
db_members = self.repositories.member.get_all(
|
db_members = self.repositories.member.get_all(
|
||||||
context.session, pool_id=self.pool_id)
|
context.session, show_deleted=False, pool_id=self.pool_id)
|
||||||
result = self._convert_db_to_type(
|
result = self._convert_db_to_type(
|
||||||
db_members, [member_types.MemberResponse])
|
db_members, [member_types.MemberResponse])
|
||||||
return member_types.MembersRootResponse(members=result)
|
return member_types.MembersRootResponse(members=result)
|
||||||
|
@ -63,7 +63,7 @@ class PoolsController(base.BaseController):
|
|||||||
else:
|
else:
|
||||||
project_id = {'project_id': context.project_id}
|
project_id = {'project_id': context.project_id}
|
||||||
db_pools = self.repositories.pool.get_all(
|
db_pools = self.repositories.pool.get_all(
|
||||||
context.session, **project_id)
|
context.session, show_deleted=False, **project_id)
|
||||||
result = self._convert_db_to_type(db_pools, [pool_types.PoolResponse])
|
result = self._convert_db_to_type(db_pools, [pool_types.PoolResponse])
|
||||||
return pool_types.PoolsRootResponse(pools=result)
|
return pool_types.PoolsRootResponse(pools=result)
|
||||||
|
|
||||||
|
@ -109,7 +109,12 @@ class BaseRepository(object):
|
|||||||
:param filters: Filters to decide which entities should be retrieved.
|
:param filters: Filters to decide which entities should be retrieved.
|
||||||
:returns: [octavia.common.data_model]
|
:returns: [octavia.common.data_model]
|
||||||
"""
|
"""
|
||||||
model_list = session.query(self.model_class).filter_by(**filters).all()
|
deleted = filters.pop('show_deleted', True)
|
||||||
|
model_list = session.query(self.model_class).filter_by(**filters)
|
||||||
|
if not deleted:
|
||||||
|
model_list = model_list.filter(
|
||||||
|
self.model_class.provisioning_status != consts.DELETED)
|
||||||
|
model_list = model_list.all()
|
||||||
data_model_list = [model.to_data_model() for model in model_list]
|
data_model_list = [model.to_data_model() for model in model_list]
|
||||||
return data_model_list
|
return data_model_list
|
||||||
|
|
||||||
@ -1143,8 +1148,13 @@ class L7PolicyRepository(BaseRepository):
|
|||||||
listener.load_balancer_id, listener.project_id)
|
listener.load_balancer_id, listener.project_id)
|
||||||
|
|
||||||
def get_all(self, session, **filters):
|
def get_all(self, session, **filters):
|
||||||
l7policy_list = session.query(self.model_class).filter_by(
|
deleted = filters.pop('show_deleted', True)
|
||||||
**filters).order_by(self.model_class.position).all()
|
l7policy_list = session.query(self.model_class).filter_by(**filters)
|
||||||
|
if not deleted:
|
||||||
|
l7policy_list = l7policy_list.filter(
|
||||||
|
self.model_class.provisioning_status != consts.DELETED)
|
||||||
|
|
||||||
|
l7policy_list = l7policy_list.order_by(self.model_class.position).all()
|
||||||
data_model_list = [p.to_data_model() for p in l7policy_list]
|
data_model_list = [p.to_data_model() for p in l7policy_list]
|
||||||
return data_model_list
|
return data_model_list
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ class BaseAPITest(base_db_test.OctaviaDBTestBase):
|
|||||||
|
|
||||||
def _set_lb_and_children_statuses(self, lb_id, prov_status, op_status,
|
def _set_lb_and_children_statuses(self, lb_id, prov_status, op_status,
|
||||||
autodetect=True):
|
autodetect=True):
|
||||||
self.lb_repo.update(db_api.get_session(), lb_id,
|
self.set_object_status(self.lb_repo, lb_id,
|
||||||
provisioning_status=prov_status,
|
provisioning_status=prov_status,
|
||||||
operating_status=op_status)
|
operating_status=op_status)
|
||||||
lb_listeners = self.listener_repo.get_all(db_api.get_session(),
|
lb_listeners = self.listener_repo.get_all(db_api.get_session(),
|
||||||
@ -264,7 +264,7 @@ class BaseAPITest(base_db_test.OctaviaDBTestBase):
|
|||||||
listener_prov = constants.DELETED
|
listener_prov = constants.DELETED
|
||||||
else:
|
else:
|
||||||
listener_prov = prov_status
|
listener_prov = prov_status
|
||||||
self.listener_repo.update(db_api.get_session(), listener.id,
|
self.set_object_status(self.listener_repo, listener.id,
|
||||||
provisioning_status=listener_prov,
|
provisioning_status=listener_prov,
|
||||||
operating_status=op_status)
|
operating_status=op_status)
|
||||||
lb_l7policies = self.l7policy_repo.get_all(db_api.get_session(),
|
lb_l7policies = self.l7policy_repo.get_all(db_api.get_session(),
|
||||||
@ -275,7 +275,7 @@ class BaseAPITest(base_db_test.OctaviaDBTestBase):
|
|||||||
l7policy_prov = constants.DELETED
|
l7policy_prov = constants.DELETED
|
||||||
else:
|
else:
|
||||||
l7policy_prov = prov_status
|
l7policy_prov = prov_status
|
||||||
self.l7policy_repo.update(db_api.get_session(), l7policy.id,
|
self.set_object_status(self.l7policy_repo, l7policy.id,
|
||||||
provisioning_status=l7policy_prov,
|
provisioning_status=l7policy_prov,
|
||||||
operating_status=op_status)
|
operating_status=op_status)
|
||||||
l7rules = self.l7rule_repo.get_all(db_api.get_session(),
|
l7rules = self.l7rule_repo.get_all(db_api.get_session(),
|
||||||
@ -286,7 +286,7 @@ class BaseAPITest(base_db_test.OctaviaDBTestBase):
|
|||||||
l7rule_prov = constants.DELETED
|
l7rule_prov = constants.DELETED
|
||||||
else:
|
else:
|
||||||
l7rule_prov = prov_status
|
l7rule_prov = prov_status
|
||||||
self.l7rule_repo.update(db_api.get_session(), l7rule.id,
|
self.set_object_status(self.l7rule_repo, l7rule.id,
|
||||||
provisioning_status=l7rule_prov,
|
provisioning_status=l7rule_prov,
|
||||||
operating_status=op_status)
|
operating_status=op_status)
|
||||||
lb_pools = self.pool_repo.get_all(db_api.get_session(),
|
lb_pools = self.pool_repo.get_all(db_api.get_session(),
|
||||||
@ -297,7 +297,7 @@ class BaseAPITest(base_db_test.OctaviaDBTestBase):
|
|||||||
pool_prov = constants.DELETED
|
pool_prov = constants.DELETED
|
||||||
else:
|
else:
|
||||||
pool_prov = prov_status
|
pool_prov = prov_status
|
||||||
self.pool_repo.update(db_api.get_session(), pool.id,
|
self.set_object_status(self.pool_repo, pool.id,
|
||||||
provisioning_status=pool_prov,
|
provisioning_status=pool_prov,
|
||||||
operating_status=op_status)
|
operating_status=op_status)
|
||||||
for member in pool.members:
|
for member in pool.members:
|
||||||
@ -306,7 +306,7 @@ class BaseAPITest(base_db_test.OctaviaDBTestBase):
|
|||||||
member_prov = constants.DELETED
|
member_prov = constants.DELETED
|
||||||
else:
|
else:
|
||||||
member_prov = prov_status
|
member_prov = prov_status
|
||||||
self.member_repo.update(db_api.get_session(), member.id,
|
self.set_object_status(self.member_repo, member.id,
|
||||||
provisioning_status=member_prov,
|
provisioning_status=member_prov,
|
||||||
operating_status=op_status)
|
operating_status=op_status)
|
||||||
if pool.health_monitor:
|
if pool.health_monitor:
|
||||||
@ -315,7 +315,7 @@ class BaseAPITest(base_db_test.OctaviaDBTestBase):
|
|||||||
hm_prov = constants.DELETED
|
hm_prov = constants.DELETED
|
||||||
else:
|
else:
|
||||||
hm_prov = prov_status
|
hm_prov = prov_status
|
||||||
self.health_monitor_repo.update(db_api.get_session(),
|
self.set_object_status(self.health_monitor_repo,
|
||||||
pool.health_monitor.id,
|
pool.health_monitor.id,
|
||||||
provisioning_status=hm_prov,
|
provisioning_status=hm_prov,
|
||||||
operating_status=op_status)
|
operating_status=op_status)
|
||||||
@ -335,6 +335,13 @@ class BaseAPITest(base_db_test.OctaviaDBTestBase):
|
|||||||
autodetect=not explicit_status)
|
autodetect=not explicit_status)
|
||||||
return self.get(self.LB_PATH.format(lb_id=lb_id)).json
|
return self.get(self.LB_PATH.format(lb_id=lb_id)).json
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def set_object_status(repo, id_, provisioning_status=constants.ACTIVE,
|
||||||
|
operating_status=constants.ONLINE):
|
||||||
|
repo.update(db_api.get_session(), id_,
|
||||||
|
provisioning_status=provisioning_status,
|
||||||
|
operating_status=operating_status)
|
||||||
|
|
||||||
def assert_final_lb_statuses(self, lb_id, delete=False):
|
def assert_final_lb_statuses(self, lb_id, delete=False):
|
||||||
expected_prov_status = constants.ACTIVE
|
expected_prov_status = constants.ACTIVE
|
||||||
expected_op_status = constants.ONLINE
|
expected_op_status = constants.ONLINE
|
||||||
|
@ -60,6 +60,20 @@ class TestHealthMonitor(base.BaseAPITest):
|
|||||||
response.pop('updated_at')
|
response.pop('updated_at')
|
||||||
self.assertEqual(api_hm, response)
|
self.assertEqual(api_hm, response)
|
||||||
|
|
||||||
|
def test_get_hides_deleted(self):
|
||||||
|
api_hm = self.create_health_monitor(
|
||||||
|
self.pool_id, constants.HEALTH_MONITOR_HTTP,
|
||||||
|
1, 1, 1, 1).get(self.root_tag)
|
||||||
|
|
||||||
|
response = self.get(self.HMS_PATH)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 1)
|
||||||
|
self.set_object_status(self.health_monitor_repo, api_hm.get('id'),
|
||||||
|
provisioning_status=constants.DELETED)
|
||||||
|
response = self.get(self.HMS_PATH)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 0)
|
||||||
|
|
||||||
def test_bad_get(self):
|
def test_bad_get(self):
|
||||||
self.get(self.HM_PATH.format(
|
self.get(self.HM_PATH.format(
|
||||||
healthmonitor_id=uuidutils.generate_uuid()), status=404)
|
healthmonitor_id=uuidutils.generate_uuid()), status=404)
|
||||||
|
@ -51,6 +51,20 @@ class TestL7Policy(base.BaseAPITest):
|
|||||||
l7policy_id=api_l7policy.get('id'))).json.get(self.root_tag)
|
l7policy_id=api_l7policy.get('id'))).json.get(self.root_tag)
|
||||||
self.assertEqual(api_l7policy, response)
|
self.assertEqual(api_l7policy, response)
|
||||||
|
|
||||||
|
def test_get_hides_deleted(self):
|
||||||
|
api_l7policy = self.create_l7policy(
|
||||||
|
self.listener_id,
|
||||||
|
constants.L7POLICY_ACTION_REJECT).get(self.root_tag)
|
||||||
|
|
||||||
|
response = self.get(self.L7POLICIES_PATH)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 1)
|
||||||
|
self.set_object_status(self.l7policy_repo, api_l7policy.get('id'),
|
||||||
|
provisioning_status=constants.DELETED)
|
||||||
|
response = self.get(self.L7POLICIES_PATH)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 0)
|
||||||
|
|
||||||
def test_bad_get(self):
|
def test_bad_get(self):
|
||||||
self.get(self.L7POLICY_PATH.format(
|
self.get(self.L7POLICY_PATH.format(
|
||||||
l7policy_id=uuidutils.generate_uuid()), status=404)
|
l7policy_id=uuidutils.generate_uuid()), status=404)
|
||||||
|
@ -50,6 +50,21 @@ class TestL7Rule(base.BaseAPITest):
|
|||||||
l7rule_id=l7rule.get('id'))).json.get(self.root_tag)
|
l7rule_id=l7rule.get('id'))).json.get(self.root_tag)
|
||||||
self.assertEqual(l7rule, response)
|
self.assertEqual(l7rule, response)
|
||||||
|
|
||||||
|
def test_get_hides_deleted(self):
|
||||||
|
api_l7rule = self.create_l7rule(
|
||||||
|
self.l7policy_id, constants.L7RULE_TYPE_PATH,
|
||||||
|
constants.L7RULE_COMPARE_TYPE_STARTS_WITH,
|
||||||
|
'/api').get(self.root_tag)
|
||||||
|
|
||||||
|
response = self.get(self.l7rules_path)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 1)
|
||||||
|
self.set_object_status(self.l7rule_repo, api_l7rule.get('id'),
|
||||||
|
provisioning_status=constants.DELETED)
|
||||||
|
response = self.get(self.l7rules_path)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 0)
|
||||||
|
|
||||||
def test_get_bad_parent_policy(self):
|
def test_get_bad_parent_policy(self):
|
||||||
bad_path = (self.L7RULES_PATH.format(
|
bad_path = (self.L7RULES_PATH.format(
|
||||||
lb_id=self.lb_id, listener_id=self.listener_id,
|
lb_id=self.lb_id, listener_id=self.listener_id,
|
||||||
|
@ -138,17 +138,24 @@ class TestListener(base.BaseAPITest):
|
|||||||
|
|
||||||
def test_get(self):
|
def test_get(self):
|
||||||
listener = self.create_listener(
|
listener = self.create_listener(
|
||||||
constants.PROTOCOL_HTTP, 80, self.lb_id)
|
constants.PROTOCOL_HTTP, 80, self.lb_id).get(self.root_tag)
|
||||||
listener_path = self.listener_path
|
response = self.get(self.listener_path.format(
|
||||||
response = self.get(listener_path.format(
|
listener_id=listener['id']))
|
||||||
listener_id=listener['listener']['id']))
|
api_listener = response.json.get(self.root_tag)
|
||||||
api_lb = response.json['listener']
|
self.assertEqual(listener, api_listener)
|
||||||
expected = {'name': None, 'description': None, 'admin_state_up': True,
|
|
||||||
'operating_status': constants.OFFLINE,
|
def test_get_hides_deleted(self):
|
||||||
'provisioning_status': constants.PENDING_CREATE,
|
api_listener = self.create_listener(
|
||||||
'connection_limit': None}
|
constants.PROTOCOL_HTTP, 80, self.lb_id).get(self.root_tag)
|
||||||
listener.update(expected)
|
|
||||||
self.assertEqual(listener['listener'], api_lb)
|
response = self.get(self.LISTENERS_PATH)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 1)
|
||||||
|
self.set_object_status(self.listener_repo, api_listener.get('id'),
|
||||||
|
provisioning_status=constants.DELETED)
|
||||||
|
response = self.get(self.LISTENERS_PATH)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 0)
|
||||||
|
|
||||||
def test_get_bad_listener_id(self):
|
def test_get_bad_listener_id(self):
|
||||||
listener_path = self.listener_path
|
listener_path = self.listener_path
|
||||||
|
@ -344,6 +344,19 @@ class TestLoadBalancer(base.BaseAPITest):
|
|||||||
self.assertEqual(network.id, response.get('vip_network_id'))
|
self.assertEqual(network.id, response.get('vip_network_id'))
|
||||||
self.assertEqual(port.id, response.get('vip_port_id'))
|
self.assertEqual(port.id, response.get('vip_port_id'))
|
||||||
|
|
||||||
|
def test_get_hides_deleted(self):
|
||||||
|
api_lb = self.create_load_balancer(
|
||||||
|
uuidutils.generate_uuid()).get(self.root_tag)
|
||||||
|
|
||||||
|
response = self.get(self.LBS_PATH)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 1)
|
||||||
|
self.set_object_status(self.lb_repo, api_lb.get('id'),
|
||||||
|
provisioning_status=constants.DELETED)
|
||||||
|
response = self.get(self.LBS_PATH)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 0)
|
||||||
|
|
||||||
def test_get_bad_lb_id(self):
|
def test_get_bad_lb_id(self):
|
||||||
path = self.LB_PATH.format(lb_id='SEAN-CONNERY')
|
path = self.LB_PATH.format(lb_id='SEAN-CONNERY')
|
||||||
self.get(path, status=404)
|
self.get(path, status=404)
|
||||||
|
@ -64,6 +64,19 @@ class TestMember(base.BaseAPITest):
|
|||||||
self.assertEqual(api_member, response)
|
self.assertEqual(api_member, response)
|
||||||
self.assertEqual(api_member.get('name'), '')
|
self.assertEqual(api_member.get('name'), '')
|
||||||
|
|
||||||
|
def test_get_hides_deleted(self):
|
||||||
|
api_member = self.create_member(
|
||||||
|
self.pool_id, '10.0.0.1', 80).get(self.root_tag)
|
||||||
|
|
||||||
|
response = self.get(self.members_path)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 1)
|
||||||
|
self.set_object_status(self.member_repo, api_member.get('id'),
|
||||||
|
provisioning_status=constants.DELETED)
|
||||||
|
response = self.get(self.members_path)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 0)
|
||||||
|
|
||||||
def test_bad_get(self):
|
def test_bad_get(self):
|
||||||
self.get(self.member_path.format(member_id=uuidutils.generate_uuid()),
|
self.get(self.member_path.format(member_id=uuidutils.generate_uuid()),
|
||||||
status=404)
|
status=404)
|
||||||
|
@ -61,6 +61,22 @@ class TestPool(base.BaseAPITest):
|
|||||||
response.pop('updated_at')
|
response.pop('updated_at')
|
||||||
self.assertEqual(api_pool, response)
|
self.assertEqual(api_pool, response)
|
||||||
|
|
||||||
|
def test_get_hides_deleted(self):
|
||||||
|
api_pool = self.create_pool(
|
||||||
|
self.lb_id,
|
||||||
|
constants.PROTOCOL_HTTP,
|
||||||
|
constants.LB_ALGORITHM_ROUND_ROBIN,
|
||||||
|
listener_id=self.listener_id).get(self.root_tag)
|
||||||
|
|
||||||
|
response = self.get(self.POOLS_PATH)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 1)
|
||||||
|
self.set_object_status(self.pool_repo, api_pool.get('id'),
|
||||||
|
provisioning_status=constants.DELETED)
|
||||||
|
response = self.get(self.POOLS_PATH)
|
||||||
|
objects = response.json.get(self.root_tag_list)
|
||||||
|
self.assertEqual(len(objects), 0)
|
||||||
|
|
||||||
def test_bad_get(self):
|
def test_bad_get(self):
|
||||||
self.get(self.POOL_PATH.format(pool_id=uuidutils.generate_uuid()),
|
self.get(self.POOL_PATH.format(pool_id=uuidutils.generate_uuid()),
|
||||||
status=404)
|
status=404)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user