

@staticmethod
def create_one_availability_zone(attrs=None):
    'Create a fake AZ.\n\n        :param Dictionary attrs:\n            A dictionary with all attributes\n        :return:\n            A FakeResource object with zoneName, zoneState, etc.\n        '
    attrs = (attrs or {
        
    })
    host_name = uuid.uuid4().hex
    service_name = uuid.uuid4().hex
    service_updated_at = uuid.uuid4().hex
    availability_zone = {
        'zoneName': uuid.uuid4().hex,
        'zoneState': {
            'available': True,
        },
        'hosts': {
            host_name: {
                service_name: {
                    'available': True,
                    'active': True,
                    'updated_at': service_updated_at,
                },
            },
        },
    }
    availability_zone.update(attrs)
    availability_zone = fakes.FakeResource(info=copy.deepcopy(availability_zone), loaded=True)
    return availability_zone

dataset/ETHPy150Open dtroyer/python-openstackclient/openstackclient/tests/compute/v2/fakes.py FakeAvailabilityZone.create_one_availability_zone/original