

def create_network(self, body):
    n = body.get('network')
    ret = {
        'status': 'ACTIVE',
        'subnets': [],
        'name': n.get('name'),
        'admin_state_up': self.get('admin_state_up', True),
        'tenant_id': 'fake_tenant',
        'id': str(uuid.uuid4()),
    }
    if ('port_security_enabled' in n):
        ret['port_security_enabled'] = n['port_security_enabled']
    self._fake_networks[ret['id']] = ret
    return {
        'network': ret,
    }

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/api/openstack/compute/test_neutron_security_groups.py MockClient.create_network/VarMisuse@48/68 `n`->`self`