def _validate_registration(self, req):
        params = self._parse_storlet_params(req.headers)
        try:
            if self.container == self.storlet_container:
                self.logger.debug('updating object in storlet container. '
                                  'Sanity check')
                self.gateway_class.validate_storlet_registration(
                    params, self.obj)
            else:
                self.logger.debug('updating object in storlet dependency. '
                                  'Sanity check')
                self.gateway_class.validate_dependency_registration(
                    params, self.obj)
        except __HOLE__ as e:
            self.logger.exception('Bad parameter')
            raise HTTPBadRequest(e.message)
dataset/ETHPy150Open openstack/storlets/Engine/swift/storlet_middleware/storlet_handler.py/StorletProxyHandler._validate_registration