

@staticmethod
def create_one_aggregate(attrs=None):
    'Create a fake aggregate.\n\n        :param Dictionary attrs:\n            A dictionary with all attributes\n        :return:\n            A FakeResource object, with id and other attributes\n        '
    attrs = (attrs or {
        
    })
    aggregate_info = {
        'name': ('aggregate-name-' + uuid.uuid4().hex),
        'availability_zone': 'ag_zone',
        'hosts': [],
        'id': ('aggregate-id-' + uuid.uuid4().hex),
        'metadata': {
            'availability_zone': 'ag_zone',
        },
    }
    aggregate_info.update(attrs)
    aggregate = fakes.FakeResource(info=copy.deepcopy(aggregate_info), loaded=True)
    return aggregate

dataset/ETHPy150Open dtroyer/python-openstackclient/openstackclient/tests/compute/v2/fakes.py FakeAggregate.create_one_aggregate/original