def print_links(self, sys_id, ticket, data): mdl.println("Created '{}' with sysId '{}' in Service Now. \n".format( ticket, sys_id)) mdl.print_hr() mdl.print_header3("__Links__") url = get_deep_link_url(self.sn_client.service_now_url, self.table_name, sys_id) mdl.print_url("Record Form View", url)
def process(self): data, status = self.process_poll() ticket = data['number'] add_code_compliance_record(table_name=self.table_name, task_reporting_api=self.task_reporting_api, task=self.task, service_now_server=self.task_vars['servicenowServer'], service_now_user=self.task_vars['username'], data=data, url=get_deep_link_url(self.sn_client.service_now_url, self.table_name, data['sys_id'])) return status, ticket, data
def process(self): self.process_record() data = self.sn_client.get_record(self.table_name, self.task_vars['sysId']) self.print_links(self.task_vars['sysId'], data['number'], data) add_code_compliance_record(table_name=self.table_name, task_reporting_api=self.task_reporting_api, task=self.task, service_now_server=self.task_vars['servicenowServer'], service_now_user=self.task_vars['username'], data=data, url=get_deep_link_url(self.sn_client.service_now_url, self.table_name, self.task_vars['sysId'])) return data, data['number']
def process(self): response = self.process_record() sys_id = response['target_sys_id'] data = self.sn_client.get_record(self.table_name, sys_id) self.print_links(sys_id, data['number'], data) logger.info('create rtask : add_code_compliance_record') add_code_compliance_record( table_name=self.table_name, task_reporting_api=self.task_reporting_api, task=self.task, service_now_server=self.task_vars['servicenowServer'], service_now_user=self.task_vars['username'], data=data, url=get_deep_link_url(self.sn_client.service_now_url, self.table_name, sys_id)) return sys_id, data['number'], data
def print_links(self, sys_id, ticket, data): mdl.println("Updated task with number '{}' in Service Now. \n".format(data['number'])) mdl.print_hr() mdl.print_header3("__Links__") url = get_deep_link_url(self.sn_client.service_now_url, self.table_name, sys_id) mdl.print_url("Record Form View", url)