Merge "Remove methods argument from vloume/v2/fakes.py"
This commit is contained in:
commit
3f2ed7d19f
@ -361,13 +361,11 @@ class FakeAvailabilityZone(object):
|
|||||||
"""Fake one or more volume availability zones (AZs)."""
|
"""Fake one or more volume availability zones (AZs)."""
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_one_availability_zone(attrs={}, methods={}):
|
def create_one_availability_zone(attrs={}):
|
||||||
"""Create a fake AZ.
|
"""Create a fake AZ.
|
||||||
|
|
||||||
:param Dictionary attrs:
|
:param Dictionary attrs:
|
||||||
A dictionary with all attributes
|
A dictionary with all attributes
|
||||||
:param Dictionary methods:
|
|
||||||
A dictionary with all methods
|
|
||||||
:return:
|
:return:
|
||||||
A FakeResource object with zoneName, zoneState, etc.
|
A FakeResource object with zoneName, zoneState, etc.
|
||||||
"""
|
"""
|
||||||
@ -382,18 +380,15 @@ class FakeAvailabilityZone(object):
|
|||||||
|
|
||||||
availability_zone = fakes.FakeResource(
|
availability_zone = fakes.FakeResource(
|
||||||
info=copy.deepcopy(availability_zone),
|
info=copy.deepcopy(availability_zone),
|
||||||
methods=methods,
|
|
||||||
loaded=True)
|
loaded=True)
|
||||||
return availability_zone
|
return availability_zone
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_availability_zones(attrs={}, methods={}, count=2):
|
def create_availability_zones(attrs={}, count=2):
|
||||||
"""Create multiple fake AZs.
|
"""Create multiple fake AZs.
|
||||||
|
|
||||||
:param Dictionary attrs:
|
:param Dictionary attrs:
|
||||||
A dictionary with all attributes
|
A dictionary with all attributes
|
||||||
:param Dictionary methods:
|
|
||||||
A dictionary with all methods
|
|
||||||
:param int count:
|
:param int count:
|
||||||
The number of AZs to fake
|
The number of AZs to fake
|
||||||
:return:
|
:return:
|
||||||
@ -402,8 +397,7 @@ class FakeAvailabilityZone(object):
|
|||||||
availability_zones = []
|
availability_zones = []
|
||||||
for i in range(0, count):
|
for i in range(0, count):
|
||||||
availability_zone = \
|
availability_zone = \
|
||||||
FakeAvailabilityZone.create_one_availability_zone(
|
FakeAvailabilityZone.create_one_availability_zone(attrs)
|
||||||
attrs, methods)
|
|
||||||
availability_zones.append(availability_zone)
|
availability_zones.append(availability_zone)
|
||||||
|
|
||||||
return availability_zones
|
return availability_zones
|
||||||
|
Loading…
Reference in New Issue
Block a user