

def _check_267(self, engine, data):
    fixed_ips = oslodbutils.get_table(engine, 'fixed_ips')
    self.assertTrue(fixed_ips.c.instance_uuid.nullable)
    fixed_ip = fixed_ips.select((fixed_ips.c.id == 1)).execute().first()
    self.assertIsNone(fixed_ip.instance_uuid)
    instances = oslodbutils.get_table(engine, 'instances')
    self.assertFalse(instances.c.uuid.nullable)
    inspector = reflection.Inspector.from_engine(engine)
    constraints = inspector.get_unique_constraints('instances')
    constraint_names = [constraint['name'] for constraint in constraints]
    self.assertIn('uniq_instances0uuid', constraint_names)
    instance = instances.select((instances.c.id == 1)).execute().first()
    self.assertIsNotNone(instance)
    volumes = oslodbutils.get_table(engine, 'volumes')
    self.assertTrue(volumes.c.instance_uuid.nullable)
    volume = fixed_ips.select((volumes.c.id == '9c3c317e-24db-4d57-9a6f-96e6d477c1da')).execute().first()
    self.assertIsNone(volume.instance_uuid)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/db/test_migrations.py NovaMigrationsCheckers._check_267/original