Пример #1
0
 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)
Пример #2
0
    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
Пример #3
0
    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']
Пример #4
0
    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
Пример #5
0
 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)