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

Method __init__

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

Source from the content-addressed store, hash-verified

553 pk_argument_name = "name_or_id"
554
555 def __init__(self, resource, *args, **kwargs):
556 super(ResourceUpdateCommand, self).__init__(
557 resource,
558 "update",
559 "Updating an existing %s." % resource.get_display_name().lower(),
560 *args,
561 **kwargs,
562 )
563
564 argument = self.pk_argument_name
565 metavar = self._get_metavar_for_argument(argument=self.pk_argument_name)
566 help = self._get_help_for_argument(
567 resource=resource, argument=self.pk_argument_name
568 )
569
570 self.parser.add_argument(argument, metavar=metavar, help=help)
571 self.parser.add_argument(
572 "file",
573 help=(
574 "JSON/YAML file containing the %s to update."
575 % resource.get_display_name().lower()
576 ),
577 )
578
579 @add_auth_token_to_kwargs_from_cli
580 def run(self, args, **kwargs):

Callers

nothing calls this directly

Calls 4

get_display_nameMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected