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

Method run

st2client/st2client/commands/inquiry.py:156–170  ·  view source on GitHub ↗
(self, args, **kwargs)

Source from the content-addressed store, hash-verified

154
155 @resource.add_auth_token_to_kwargs_from_cli
156 def run(self, args, **kwargs):
157 instance = Inquiry()
158 instance.id = args.id
159 inquiry = self.get_resource_by_id(id=args.id, **kwargs)
160 if args.response:
161 instance.response = json.loads(args.response)
162 else:
163 response = InteractiveForm(
164 inquiry.schema.get("properties")
165 ).initiate_dialog()
166 instance.response = response
167
168 return self.manager.respond(
169 inquiry_id=instance.id, inquiry_response=instance.response, **kwargs
170 )
171
172 def run_and_print(self, args, **kwargs):
173 instance = self.run(args, **kwargs)

Callers 1

run_and_printMethod · 0.95

Calls 6

InquiryClass · 0.90
InteractiveFormClass · 0.90
get_resource_by_idMethod · 0.80
initiate_dialogMethod · 0.80
respondMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected