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

Method __init__

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

Source from the content-addressed store, hash-verified

617 pk_argument_name = "name_or_id"
618
619 def __init__(self, resource, *args, **kwargs):
620 super(ResourceEnableCommand, self).__init__(
621 resource,
622 "enable",
623 "Enable an existing %s." % resource.get_display_name().lower(),
624 *args,
625 **kwargs,
626 )
627
628 argument = self.pk_argument_name
629 metavar = self._get_metavar_for_argument(argument=self.pk_argument_name)
630 help = self._get_help_for_argument(
631 resource=resource, argument=self.pk_argument_name
632 )
633
634 self.parser.add_argument(argument, metavar=metavar, help=help)
635
636 @add_auth_token_to_kwargs_from_cli
637 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