diff --git a/octavia/api/v2/controllers/amphora.py b/octavia/api/v2/controllers/amphora.py index f9412e714e..92f8837da9 100644 --- a/octavia/api/v2/controllers/amphora.py +++ b/octavia/api/v2/controllers/amphora.py @@ -51,8 +51,8 @@ class AmphoraController(base.BaseController): db_amp, amp_types.AmphoraResponse) return amp_types.AmphoraRootResponse(amphora=result) - @wsme_pecan.wsexpose(amp_types.AmphoraeRootResponse, wtypes.text, - [wtypes.text], ignore_extra_args=True) + @wsme_pecan.wsexpose(amp_types.AmphoraeRootResponse, [wtypes.text], + ignore_extra_args=True) def get_all(self, fields=None): """Gets all health monitors.""" pcontext = pecan.request.context diff --git a/octavia/api/v2/controllers/l7rule.py b/octavia/api/v2/controllers/l7rule.py index 79b8f1d931..61c501f659 100644 --- a/octavia/api/v2/controllers/l7rule.py +++ b/octavia/api/v2/controllers/l7rule.py @@ -55,8 +55,8 @@ class L7RuleController(base.BaseController): l7rule_types.L7RuleResponse) return l7rule_types.L7RuleRootResponse(rule=result) - @wsme_pecan.wsexpose(l7rule_types.L7RulesRootResponse, wtypes.text, - [wtypes.text], ignore_extra_args=True) + @wsme_pecan.wsexpose(l7rule_types.L7RulesRootResponse, [wtypes.text], + ignore_extra_args=True) def get_all(self, fields=None): """Lists all l7rules of a l7policy.""" pcontext = pecan.request.context diff --git a/octavia/api/v2/controllers/member.py b/octavia/api/v2/controllers/member.py index 6569622c51..3b5a0a1185 100644 --- a/octavia/api/v2/controllers/member.py +++ b/octavia/api/v2/controllers/member.py @@ -56,8 +56,8 @@ class MemberController(base.BaseController): member_types.MemberResponse) return member_types.MemberRootResponse(member=result) - @wsme_pecan.wsexpose(member_types.MembersRootResponse, wtypes.text, - [wtypes.text], ignore_extra_args=True) + @wsme_pecan.wsexpose(member_types.MembersRootResponse, [wtypes.text], + ignore_extra_args=True) def get_all(self, fields=None): """Lists all pool members of a pool.""" pcontext = pecan.request.context diff --git a/octavia/tests/functional/api/v2/test_amphora.py b/octavia/tests/functional/api/v2/test_amphora.py index 79f9729a26..aa8235054d 100644 --- a/octavia/tests/functional/api/v2/test_amphora.py +++ b/octavia/tests/functional/api/v2/test_amphora.py @@ -304,11 +304,11 @@ class TestAmphora(base.BaseAPITest): def test_get_all_fields_filter(self): amps = self.get(self.AMPHORAE_PATH, params={ - 'fields': ['id', 'compute_id']}).json + 'fields': ['id', 'role']}).json for amp in amps['amphorae']: self.assertIn(u'id', amp.keys()) - self.assertIn(u'compute_id', amp.keys()) - self.assertNotIn(u'vrrp_ip', amp.keys()) + self.assertIn(u'role', amp.keys()) + self.assertNotIn(u'ha_port_id', amp.keys()) def test_get_all_filter(self): self._create_additional_amp() diff --git a/octavia/tests/functional/api/v2/test_l7rule.py b/octavia/tests/functional/api/v2/test_l7rule.py index dfc515a56e..8899a8b534 100644 --- a/octavia/tests/functional/api/v2/test_l7rule.py +++ b/octavia/tests/functional/api/v2/test_l7rule.py @@ -305,11 +305,11 @@ class TestL7Rule(base.BaseAPITest): self.set_lb_status(self.lb_id) l7rus = self.get(self.l7rules_path, params={ - 'fields': ['id', 'project_id']}).json + 'fields': ['id', 'compare_type']}).json for l7ru in l7rus['rules']: self.assertIn(u'id', l7ru.keys()) - self.assertIn(u'project_id', l7ru.keys()) - self.assertNotIn(u'description', l7ru.keys()) + self.assertIn(u'compare_type', l7ru.keys()) + self.assertNotIn(u'project_id', l7ru.keys()) def test_get_all_filter(self): ru1 = self.create_l7rule( diff --git a/octavia/tests/functional/api/v2/test_member.py b/octavia/tests/functional/api/v2/test_member.py index f378194a59..dbbc368195 100644 --- a/octavia/tests/functional/api/v2/test_member.py +++ b/octavia/tests/functional/api/v2/test_member.py @@ -296,11 +296,12 @@ class TestMember(base.BaseAPITest): self.set_lb_status(self.lb_id) members = self.get(self.members_path, params={ - 'fields': ['id', 'project_id']}).json + 'fields': ['id', 'address']}).json for member in members['members']: self.assertIn(u'id', member.keys()) - self.assertIn(u'project_id', member.keys()) - self.assertNotIn(u'description', member.keys()) + self.assertIn(u'address', member.keys()) + self.assertNotIn(u'name', member.keys()) + self.assertNotIn(u'monitor_address', member.keys()) def test_get_all_filter(self): mem1 = self.create_member(self.pool_id,