def update_response(self, resp_name, response): params = ResponseParameters(respName=response.theName, respRisk=response.theRisk, tags=response.theTags, cProps=response.theEnvironmentProperties, rType=response.theResponseType) try: respId = self.db_proxy.getDimensionId(resp_name, 'response') params.setId(respId) self.db_proxy.updateResponse(params) except DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex) except ARMException as ex: self.close() raise ARMHTTPError(ex)
def update_response(self, resp_name, response): found_response = self.get_response_by_name(resp_name) params = ResponseParameters(respName=response.theName, respRisk=response.theRisk, tags=response.theTags, cProps=response.theEnvironmentProperties, rType=response.theResponseType) params.setId(found_response.theId) try: self.db_proxy.updateResponse(params) except DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex) except ARMException as ex: self.close() raise ARMHTTPError(ex)
def update_response(self, resp_name, response): found_response = self.get_response_by_name(resp_name) params = ResponseParameters( respName=response.theName, respRisk=response.theRisk, tags=response.theTags, cProps=response.theEnvironmentProperties, rType=response.theResponseType ) params.setId(found_response.theId) try: self.db_proxy.updateResponse(params) except DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex) except ARMException as ex: self.close() raise ARMHTTPError(ex)
def update_response(self, resp_name, response): params = ResponseParameters( respName=response.theName, respRisk=response.theRisk, tags=response.theTags, cProps=response.theEnvironmentProperties, rType=response.theResponseType ) try: respId = self.db_proxy.getDimensionId(resp_name,'response') params.setId(respId) self.db_proxy.updateResponse(params) except ObjectNotFound as ex: self.close() raise ObjectNotFoundHTTPError('The provided response name') except DatabaseProxyException as ex: self.close() raise ARMHTTPError(ex) except ARMException as ex: self.close() raise ARMHTTPError(ex)