def db_null_instance_uuid_scan(delete=False):
 engine = get_engine()
 meta = sqlalchemy.MetaData(bind=engine)
 meta.reflect(engine)
 processed = {}
 for table in reversed(meta.sorted_tables):
  if (table.name not in ('fixed_ips', 'shadow_fixed_ips')):
   processed[table.name] = _process_null_records(table, 'instance_uuid', check_fkeys=True, delete=delete)
 for table_name in ('instances', 'shadow_instances'):
  table = db_utils.get_table(engine, table_name)
  processed[table.name] = _process_null_records(table, 'uuid', check_fkeys=False, delete=delete)
 return processed

def db_null_instance_uuid_scan ( delete = False ) : engine = get_engine ( ) meta = sqlalchemy . MetaData ( bind = engine ) meta . reflect ( engine ) processed = { } for table in reversed ( meta . sorted_tables ) : if ( table . name not in ( 'fixed_ips' , 'shadow_fixed_ips' ) ) : processed [ table . name ] = _process_null_records ( table , 'instance_uuid' , check_fkeys = True , delete = delete ) for table_name in ( 'instances' , 'shadow_instances' ) : table = db_utils . get_table ( engine , table_name ) processed [ table . name ] = _process_null_records ( table , 'uuid' , check_fkeys = False , delete = delete ) return processed
utility for scanning the database to look for null instance uuid rows .