'Update encryption specs for a given volume type.'

def update(self, req, type_id, id, body=None):

    context = req.environ['cinder.context']
    authorize(context)
    self.assert_valid_body(body, 'encryption')
    if (len(body) > 1):
        expl = _('Request    body    contains    too    many    items.')
        raise webob.exc.HTTPBadRequest(explanation=expl)
    self._check_type(context, type_id)
    if self._encrypted_type_in_use(context, type_id):
        expl = _('Cannot    update    encryption    specs.    Volume    type    in    use.')
        raise webob.exc.HTTPBadRequest(explanation=expl)
    encryption_specs = body['encryption']
    self._check_encryption_input(encryption_specs, create=False)
    db.volume_type_encryption_update(context, type_id, encryption_specs)
    notifier_info = dict(type_id=type_id, id=id)
    notifier = rpc.get_notifier('volumeTypeEncryption')
    notifier.info(context, 'volume_type_encryption.update', notifier_info)
    return body
