def destroy(contxt, id): if contxt is None: contxt = context.get_admin_context() id = utils.int_from_str(id) try: db.destroy_storage_pool_usage(contxt, id) except db_exc.DBError as e: LOG.exception(_("DB Error on deleting Pool Usages %s" % e)) raise exception.StoragePoolUsageFailure()
def delete_pool_usage(self, context, poolusage_id): return db.destroy_storage_pool_usage(context, poolusage_id)