(self, resource, *args, **kwargs)
| 441 | help_string = None |
| 442 | |
| 443 | def __init__(self, resource, *args, **kwargs): |
| 444 | super(ResourceGetCommand, self).__init__( |
| 445 | resource, |
| 446 | "get", |
| 447 | self.help_string |
| 448 | or "Get individual %s." % resource.get_display_name().lower(), |
| 449 | *args, |
| 450 | **kwargs, |
| 451 | ) |
| 452 | |
| 453 | argument = self.pk_argument_name |
| 454 | metavar = self._get_metavar_for_argument(argument=self.pk_argument_name) |
| 455 | help = self._get_help_for_argument( |
| 456 | resource=resource, argument=self.pk_argument_name |
| 457 | ) |
| 458 | |
| 459 | self.parser.add_argument(argument, metavar=metavar, nargs="+", help=help) |
| 460 | self.parser.add_argument( |
| 461 | "-a", |
| 462 | "--attr", |
| 463 | nargs="+", |
| 464 | default=self.display_attributes, |
| 465 | help=( |
| 466 | "List of attributes to include in the " |
| 467 | 'output. "all" or unspecified will ' |
| 468 | "return all attributes." |
| 469 | ), |
| 470 | ) |
| 471 | |
| 472 | @add_auth_token_to_kwargs_from_cli |
| 473 | def run(self, args, **kwargs): |
nothing calls this directly
no test coverage detected