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

Class PackRegisterCommand

st2client/st2client/commands/pack.py:457–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455
456
457class PackRegisterCommand(PackResourceCommand):
458 def __init__(self, resource, *args, **kwargs):
459 super(PackRegisterCommand, self).__init__(
460 resource,
461 "register",
462 "Register %s(s): sync all file changes with DB."
463 % resource.get_display_name().lower(),
464 *args,
465 **kwargs,
466 )
467
468 self.parser.add_argument(
469 "packs",
470 nargs="*",
471 metavar="pack",
472 help="Name of the %s(s) to register." % resource.get_display_name().lower(),
473 )
474
475 self.parser.add_argument(
476 "--types", nargs="+", help="Types of content to register."
477 )
478
479 @add_auth_token_to_kwargs_from_cli
480 def run(self, args, **kwargs):
481 return self.manager.register(args.packs, args.types, **kwargs)
482
483
484class PackSearchCommand(resource.ResourceTableCommand):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected