def update(self, req, vol_type_id, id, body):
        self._check_body(body)
        context = req.environ['nova.context']
        if not id in body:
            expl = _('Request body and URI mismatch')
            raise exc.HTTPBadRequest(explanation=expl)
        if len(body) > 1:
            expl = _('Request body contains too many items')
            raise exc.HTTPBadRequest(explanation=expl)
        try:
            db.api.volume_type_extra_specs_update_or_create(context,
                                                            vol_type_id,
                                                            body)
        except quota.QuotaError as error:
            self._handle_quota_error(error)

        return body
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/openstack/contrib/volumetypes.py/VolumeTypeExtraSpecsController.update/original