Follow-up to "Return BadRequest for invalid Unicode names",
we missed a couple of operations here:
type-key set
quota-class-update
qos-create
Related-Bug: #
1531400
Change-Id: Id966b74dce87acb15ede9cb4c02ae0f74d59b08c
return result
+@handle_db_data_error
@require_admin_context
def quota_class_create(context, class_name, resource, limit):
quota_class_ref = models.QuotaClass()
return result
+@handle_db_data_error
@require_context
def volume_type_extra_specs_update_or_create(context, volume_type_id,
specs):
spec_entry = models.QualityOfServiceSpecs()
spec_entry.update(item)
spec_entry.save(session=session)
+ except db_exc.DBDataError:
+ msg = _('Error writing field to database')
+ LOG.exception(msg)
+ raise exception.Invalid(msg)
except Exception as e:
raise db_exc.DBError(e)
try:
qos_specs_ref = db.qos_specs_create(context, values)
+ except db_exc.DBDataError:
+ msg = _('Error writing field to database')
+ LOG.exception(msg)
+ raise exception.Invalid(msg)
except db_exc.DBError:
LOG.exception(_LE('DB error:'))
raise exception.QoSSpecsCreateFailed(name=name,