| 482 | |
| 483 | |
| 484 | class 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 | |
| 506 | class PackConfigCommand(resource.ResourceCommand): |