From aa5ff67e3fa2b9497218e9bdd4ac3fdf432e007c Mon Sep 17 00:00:00 2001 From: Huanxuan Ao Date: Sat, 7 May 2016 16:15:53 +0800 Subject: Implement "address scope list" command This patch add a command that supports listing address scopes Change-Id: Id14757011560cacf28011ba51841a8e23b824f33 Partial-Bug: #1566269 --- openstackclient/tests/network/v2/fakes.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'openstackclient/tests/network/v2/fakes.py') diff --git a/openstackclient/tests/network/v2/fakes.py b/openstackclient/tests/network/v2/fakes.py index 5fd7ea3b..413ec7d2 100644 --- a/openstackclient/tests/network/v2/fakes.py +++ b/openstackclient/tests/network/v2/fakes.py @@ -107,6 +107,24 @@ class FakeAddressScope(object): return address_scope + @staticmethod + def create_address_scopes(attrs=None, count=2): + """Create multiple fake address scopes. + + :param Dictionary attrs: + A dictionary with all attributes + :param int count: + The number of address scopes to fake + :return: + A list of FakeResource objects faking the address scopes + """ + address_scopes = [] + for i in range(0, count): + address_scopes.append( + FakeAddressScope.create_one_address_scope(attrs)) + + return address_scopes + class FakeAvailabilityZone(object): """Fake one or more network availability zones (AZs).""" -- cgit v1.2.1