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

Class PackSearchCommand

st2client/st2client/commands/pack.py:484–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482
483
484class PackSearchCommand(resource.ResourceTableCommand):
485 display_attributes = ["name", "description", "version", "author"]
486 attribute_display_order = ["name", "description", "version", "author"]
487
488 def __init__(self, resource, *args, **kwargs):
489 super(PackSearchCommand, self).__init__(
490 resource,
491 "search",
492 "Search the index for a %s with any attribute \
493 matching the query."
494 % resource.get_display_name().lower(),
495 *args,
496 **kwargs,
497 )
498
499 self.parser.add_argument("query", help="Search query.")
500
501 @add_auth_token_to_kwargs_from_cli
502 def run(self, args, **kwargs):
503 return self.manager.search(args, **kwargs)
504
505
506class PackConfigCommand(resource.ResourceCommand):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected