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

Method run

st2client/st2client/commands/keyvalue.py:284–305  ·  view source on GitHub ↗
(self, args, **kwargs)

Source from the content-addressed store, hash-verified

282
283 @resource.add_auth_token_to_kwargs_from_cli
284 def run(self, args, **kwargs):
285 instance = KeyValuePair()
286 instance.id = args.name # TODO: refactor and get rid of id
287 instance.name = args.name
288 instance.scope = args.scope
289 instance.user = args.user
290
291 if not args.value:
292 instance.value = input("Please insert value for key: ")
293 else:
294 instance.value = args.value
295
296 if args.secret:
297 instance.secret = args.secret
298
299 if args.encrypted:
300 instance.encrypted = args.encrypted
301
302 if args.ttl:
303 instance.ttl = args.ttl
304
305 return self.manager.update(instance, **kwargs)
306
307 def run_and_print(self, args, **kwargs):
308 instance = self.run(args, **kwargs)

Callers 1

run_and_printMethod · 0.95

Calls 2

KeyValuePairClass · 0.90
updateMethod · 0.45

Tested by

no test coverage detected