def delete_keys(context, qos_specs_id, keys):
 if (qos_specs_id is None):
  msg = _('id cannot be None')
  raise exception.InvalidQoSSpecs(reason=msg)
 qos_spec = objects.QualityOfServiceSpecs.get_by_id(context, qos_specs_id)
 try:
  for key in keys:
   try:
    del qos_spec.specs[key]
   except KeyError:
    raise exception.QoSSpecsKeyNotFound(specs_key=key, specs_id=qos_specs_id)
 finally:
  qos_spec.save()

def delete_keys ( context , qos_specs_id , keys ) : if ( qos_specs_id is None ) : msg = _ ( 'id cannot be None' ) raise exception . InvalidQoSSpecs ( reason = msg ) qos_spec = objects . QualityOfServiceSpecs . get_by_id ( context , qos_specs_id ) try : for key in keys : try : del qos_spec . specs [ key ] except KeyError : raise exception . QoSSpecsKeyNotFound ( specs_key = key , specs_id = qos_specs_id ) finally : qos_spec . save ( )
marks specified key of target qos specs as deleted .