def put_clip_metadata(self): """ Given the clip metadata, generate a HTTP PUT request to the Cameras Service. """ endpoint = '/clips' response = utils.put_request(config.CAM_SERVICES_URL, endpoint, self.metadata)
def change_name(self, new_name): data = {"name": new_name} change_name_response = utils.put_request("domains/{0}/records/{1}".format(self.domain_name, self.id)) if not change_name_response.ok: raise Exception("Failed to change name of domain record! See error message: {0}" .format(change_name_response.json()["message"]))
def change_name(self, new_name): data = {"name": new_name} change_name_response = utils.put_request("images/{0}".format(self.id), data, self.authentication_token) if not change_name_response.ok: raise Exception("Request to change image name failed! See error message: {0}".format(change_name_response.json()["message"])) self.name = new_name
def change_name(self, new_name): new_name_dict = {"name": new_name} change_name_response = utils.put_request("account/keys/{0}".format(self.id), new_name_dict, self.authentication_token) if change_name_response.ok: self.name = new_name else: raise Exception("Request to change key name failed! See error message: {0}".format(change_name_response.json()["message"]))
def update_execution_status(execution, status): if execution is not None: req = { "status": utils.STATUSES[status], "issueId": execution["issueId"], "projectId": execution["projectId"], "cycleId": execution["cycleId"], "versionId": execution["versionId"], } resp = utils.put_request( utils.ZapiCalls.PUT_EXECUTION + "/%s/execute" % execution["id"], json.dumps(req)) logging.info("Test-case %s is now in status %s. Labels are: %s" % (execution["issueKey"], status, execution["labels"])) return resp