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

Method __init__

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

Source from the content-addressed store, hash-verified

409 display_attributes = ["name", "value"]
410
411 def __init__(self, resource, *args, **kwargs):
412 help_text = (
413 "Load a list of %s from file." % resource.get_plural_display_name().lower()
414 )
415 super(KeyValuePairLoadCommand, self).__init__(
416 resource, "load", help_text, *args, **kwargs
417 )
418
419 self.parser.add_argument(
420 "-c",
421 "--convert",
422 action="store_true",
423 help=(
424 "Convert non-string types (hash, array, boolean,"
425 " int, float) to a JSON string before loading it"
426 " into the datastore."
427 ),
428 )
429 self.parser.add_argument(
430 "file",
431 help=(
432 "JSON/YAML file containing the %s(s) to load"
433 % resource.get_plural_display_name().lower()
434 ),
435 )
436
437 @resource.add_auth_token_to_kwargs_from_cli
438 def run(self, args, **kwargs):

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45

Tested by

no test coverage detected