Exemple #1
0
    def destroy(self, context=None):
        """Delete the Registry from the DB.

        :param context: Security context. NOTE: This should only
                        be used internally by the indirection_api.
                        Unfortunately, RPC requires context as the first
                        argument, even though we don't use it.
                        A context should be set when instantiating the
                        object, e.g.: Registry(context)
        """
        dbapi.destroy_registry(context, self.uuid)
        self.obj_reset_changes()
Exemple #2
0
    def destroy(self, context=None):
        """Delete the Registry from the DB.

        :param context: Security context. NOTE: This should only
                        be used internally by the indirection_api.
                        Unfortunately, RPC requires context as the first
                        argument, even though we don't use it.
                        A context should be set when instantiating the
                        object, e.g.: Registry(context)
        """
        dbapi.destroy_registry(context, self.uuid)
        self.obj_reset_changes()
Exemple #3
0
 def test_destroy_registry_by_uuid(self):
     registry = utils.create_test_registry(context=self.context)
     dbapi.destroy_registry(self.context, registry.uuid)
     self.assertRaises(exception.RegistryNotFound,
                       dbapi.get_registry_by_uuid,
                       self.context, registry.uuid)
Exemple #4
0
 def test_destroy_registry_by_uuid(self):
     registry = utils.create_test_registry(context=self.context)
     dbapi.destroy_registry(self.context, registry.uuid)
     self.assertRaises(exception.RegistryNotFound,
                       dbapi.get_registry_by_uuid,
                       self.context, registry.uuid)