(self, args, **kwargs)
| 341 | |
| 342 | @add_auth_token_to_kwargs_from_cli |
| 343 | def run_and_print(self, args, **kwargs): |
| 344 | instance = super(PackInstallCommand, self).run_and_print(args, **kwargs) |
| 345 | # Hack to get a list of resolved references of installed packs |
| 346 | packs = instance.result["output"]["packs_list"] |
| 347 | |
| 348 | if len(packs) == 1: |
| 349 | pack_instance = self.app.client.managers["Pack"].get_by_ref_or_id( |
| 350 | packs[0], **kwargs |
| 351 | ) |
| 352 | self.print_output( |
| 353 | pack_instance, |
| 354 | table.PropertyValueTable, |
| 355 | attributes=args.attr, |
| 356 | json=args.json, |
| 357 | yaml=args.yaml, |
| 358 | attribute_display_order=self.attribute_display_order, |
| 359 | ) |
| 360 | else: |
| 361 | all_pack_instances = self.app.client.managers["Pack"].get_all(**kwargs) |
| 362 | pack_instances = [] |
| 363 | |
| 364 | for pack in all_pack_instances: |
| 365 | if pack.name in packs or pack.ref in packs: |
| 366 | pack_instances.append(pack) |
| 367 | |
| 368 | self.print_output( |
| 369 | pack_instances, |
| 370 | table.MultiColumnTable, |
| 371 | attributes=args.attr, |
| 372 | widths=args.width, |
| 373 | json=args.json, |
| 374 | yaml=args.yaml, |
| 375 | ) |
| 376 | |
| 377 | warnings = instance.result["output"]["warning_list"] |
| 378 | for warning in warnings: |
| 379 | print(warning) |
| 380 | |
| 381 | |
| 382 | class PackRemoveCommand(PackAsyncCommand): |
nothing calls this directly
no test coverage detected