Example #1
0
 def get_by_filters(cls, context, filters, sort_keys=None, sort_dirs=None,
                    limit=None, marker=None):
     db_migrations = db.migration_get_all_by_filters(
         context, filters, sort_keys=sort_keys, sort_dirs=sort_dirs,
         limit=limit, marker=marker)
     return base.obj_make_list(context, cls(context), objects.Migration,
                               db_migrations)
Example #2
0
 def get_by_filters(self, ctx, filters, limit, marker, **kwargs):
     return db.migration_get_all_by_filters(
         ctx,
         filters,
         limit=limit,
         marker=marker,
         sort_keys=self.sort_ctx.sort_keys,
         sort_dirs=self.sort_ctx.sort_dirs)
Example #3
0
 def get_migration_uuid_for_instance(self, instance_uuid):
     # NOTE(danms): This is too much introspection for a test like this, but
     # we can't see the migration uuid from the API, so we just encapsulate
     # the peek behind the curtains here to keep it out of the tests.
     # TODO(danms): Get the migration uuid from the API once it is exposed
     ctxt = context.get_admin_context()
     migrations = db.migration_get_all_by_filters(
         ctxt, {'instance_uuid': instance_uuid})
     self.assertEqual(
         1, len(migrations),
         'Test expected a single migration but found %i' % len(migrations))
     return migrations[0].uuid
Example #4
0
 def get_migration_uuid_for_instance(self, instance_uuid):
     # NOTE(danms): This is too much introspection for a test like this, but
     # we can't see the migration uuid from the API, so we just encapsulate
     # the peek behind the curtains here to keep it out of the tests.
     # TODO(danms): Get the migration uuid from the API once it is exposed
     ctxt = context.get_admin_context()
     migrations = db.migration_get_all_by_filters(
         ctxt, {'instance_uuid': instance_uuid})
     self.assertEqual(1, len(migrations),
                      'Test expected a single migration, '
                      'but found %i' % len(migrations))
     return migrations[0].uuid
Example #5
0
 def get_by_filters(self, ctx, filters, limit, marker, **kwargs):
     return db.migration_get_all_by_filters(
         ctx, filters, limit=limit, marker=marker,
         sort_keys=self.sort_ctx.sort_keys,
         sort_dirs=self.sort_ctx.sort_dirs)