def delete_correlation(self, correlation): """Deletes a correlation. """ check_resource_type(correlation, CORRELATION_PATH, message="A correlation id is needed.") correlation_id = get_correlation_id(correlation) if correlation_id: return self._delete("%s%s" % (self.url, correlation_id))
def update_correlation(self, correlation, changes): """Updates a correlation. """ check_resource_type(correlation, CORRELATION_PATH, message="A correlation id is needed.") correlation_id = get_correlation_id(correlation) if correlation_id: body = json.dumps(changes) return self._update("%s%s" % (self.url, correlation_id), body)
def get_correlation(self, correlation, query_string=''): """Retrieves a correlation. The correlation parameter should be a string containing the correlation id or the dict returned by create_correlation. As correlation is an evolving object that is processed until it reaches the FINISHED or FAULTY state, the function will return a dict that encloses the correlation values and state info available at the time it is called. """ check_resource_type(correlation, CORRELATION_PATH, message="A correlation id is needed.") correlation_id = get_correlation_id(correlation) if correlation_id: return self._get("%s%s" % (self.url, correlation_id), query_string=query_string)