MCPcopy Create free account
hub / github.com/StackStorm/st2 / run

Method run

st2client/st2client/commands/trace.py:229–245  ·  view source on GitHub ↗
(self, args, **kwargs)

Source from the content-addressed store, hash-verified

227
228 @resource.add_auth_token_to_kwargs_from_cli
229 def run(self, args, **kwargs):
230 # Filtering options
231 if args.trace_tag:
232 kwargs["trace_tag"] = args.trace_tag
233 if args.trigger_instance:
234 kwargs["trigger_instance"] = args.trigger_instance
235 if args.execution:
236 kwargs["execution"] = args.execution
237 if args.rule:
238 kwargs["rule"] = args.rule
239
240 if args.sort_order:
241 if args.sort_order in ["asc", "ascending"]:
242 kwargs["sort_asc"] = True
243 elif args.sort_order in ["desc", "descending"]:
244 kwargs["sort_desc"] = True
245 return self.manager.query_with_count(limit=args.last, **kwargs)
246
247 def run_and_print(self, args, **kwargs):
248 instances, count = self.run(args, **kwargs)

Callers 1

run_and_printMethod · 0.95

Calls 1

query_with_countMethod · 0.80

Tested by

no test coverage detected