Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def run_and_print(self, args, **kwargs):
instances, count = self.run(args, **kwargs)
if args.json or args.yaml:
self.print_output(
reversed(instances),
table.MultiColumnTable,
attributes=args.attr,
widths=args.width,
json=args.json,
yaml=args.yaml,
attribute_transform_functions=self.attribute_transform_functions,
)
else:
self.print_output(
instances, table.MultiColumnTable, attributes=args.attr, widths=args.width
)
if args.last and count and count > args.last:
table.SingleRowTable.note_box(self.resource_name, args.last)
def run_and_print(self, args, **kwargs):
instances = self.run(args, **kwargs)
self.print_output(
instances,
table.MultiColumnTable,
attributes=args.attr,
widths=args.width,
json=args.json,
yaml=args.yaml,
)
instance.url = instance.parameters['url']
instances = sorted(instances, key=lambda k: k.url)
if args.json or args.yaml:
self.print_output(
instances,
table.MultiColumnTable,
attributes=args.attr,
widths=args.width,
json=args.json,
yaml=args.yaml,
)
else:
self.print_output(
instances, table.MultiColumnTable, attributes=args.attr, widths=args.width
)
def run_and_print(self, args, **kwargs):
instances, count = self.run(args, **kwargs)
if args.json or args.yaml:
self.print_output(
reversed(instances),
table.MultiColumnTable,
attributes=args.attr,
widths=args.width,
json=args.json,
yaml=args.yaml,
attribute_transform_functions=self.attribute_transform_functions,
)
else:
self.print_output(
instances,
table.MultiColumnTable,
attributes=args.attr,
widths=args.width,
attribute_transform_functions=self.attribute_transform_functions,
)
if args.last and count and count > args.last:
table.SingleRowTable.note_box(self.resource_name, args.last)
def run_and_print(self, args, **kwargs):
instances = self.run(args, **kwargs)
for instance in instances:
instance.url = instance.parameters['url']
instances = sorted(instances, key=lambda k: k.url)
if args.json or args.yaml:
self.print_output(
instances,
table.MultiColumnTable,
attributes=args.attr,
widths=args.width,
json=args.json,
yaml=args.yaml,
)
else:
self.print_output(
instances, table.MultiColumnTable, attributes=args.attr, widths=args.width
)
def run_and_print(self, args, **kwargs):
instances, count = self.run(args, **kwargs)
if args.json or args.yaml:
self.print_output(
reversed(instances),
table.MultiColumnTable,
attributes=args.attr,
widths=args.width,
json=args.json,
yaml=args.yaml,
attribute_transform_functions=self.attribute_transform_functions,
)
else:
self.print_output(
reversed(instances),
table.MultiColumnTable,
attributes=args.attr,
widths=args.width,
attribute_transform_functions=self.attribute_transform_functions,
)
if args.last and count and count > args.last:
table.SingleRowTable.note_box(self.resource_name, args.last)
if task_result:
instance.result_task = tasks[-1].get('name', 'unknown')
options['attributes'].insert(status_index + 1, 'result_task')
options['attributes'].insert(status_index + 2, 'result')
instance.result = task_result
# Otherwise include the result of the workflow execution.
else:
if 'result' not in options['attributes']:
options['attributes'].append('result')
# print root task
self.print_output(instance, formatter, **options)
# print child tasks
if child_instances:
self.print_output(child_instances, table.MultiColumnTable,
attributes=['id', 'status', 'task', 'action', 'start_timestamp'],
widths=args.width, json=args.json,
yaml=args.yaml,
attribute_transform_functions=self.attribute_transform_functions)
def run_and_print(self, args, **kwargs):
instances = self.run(args, **kwargs)
self.print_output(
instances,
table.MultiColumnTable,
attributes=args.attr,
widths=args.width,
json=args.json,
yaml=args.yaml,
)
def run_and_print(self, args, **kwargs):
instances, count = self.run(args, **kwargs)
self.print_output(
reversed(instances),
table.MultiColumnTable,
attributes=args.attr,
widths=args.width,
json=args.json,
yaml=args.yaml,
)
if args.last and count and count > args.last:
table.SingleRowTable.note_box(self.resource_name, args.last)
def run_and_print(self, args, **kwargs):
instances, count = self.run(args, **kwargs)
if args.json or args.yaml:
self.print_output(
instances,
table.MultiColumnTable,
attributes=args.attr,
widths=args.width,
json=args.json,
yaml=args.yaml,
)
else:
self.print_output(
instances, table.MultiColumnTable, attributes=args.attr, widths=args.width
)
if args.last and count and count > args.last:
table.SingleRowTable.note_box(self.resource_name, args.last)