(self, resource, *args, **kwargs)
| 138 | attribute_display_order = ROLE_ASSIGNMENT_ATTRIBUTE_DISPLAY_ORDER |
| 139 | |
| 140 | def __init__(self, resource, *args, **kwargs): |
| 141 | super(RoleAssignmentListCommand, self).__init__( |
| 142 | resource, |
| 143 | "list", |
| 144 | "Get the list of the %s." % resource.get_plural_display_name().lower(), |
| 145 | *args, |
| 146 | **kwargs, |
| 147 | ) |
| 148 | |
| 149 | # Filter options |
| 150 | self.parser.add_argument("-r", "--role", help="Role to filter on.") |
| 151 | self.parser.add_argument("-u", "--user", help="User to filter on.") |
| 152 | self.parser.add_argument("-s", "--source", help="Source to filter on.") |
| 153 | self.parser.add_argument( |
| 154 | "--remote", |
| 155 | action="store_true", |
| 156 | help="Only display remote role assignments.", |
| 157 | ) |
| 158 | |
| 159 | # Display options |
| 160 | self.parser.add_argument( |
| 161 | "-a", |
| 162 | "--attr", |
| 163 | nargs="+", |
| 164 | default=self.display_attributes, |
| 165 | help=( |
| 166 | "List of attributes to include in the " |
| 167 | 'output. "all" will return all ' |
| 168 | "attributes." |
| 169 | ), |
| 170 | ) |
| 171 | self.parser.add_argument( |
| 172 | "-w", |
| 173 | "--width", |
| 174 | nargs="+", |
| 175 | type=int, |
| 176 | default=None, |
| 177 | help=("Set the width of columns in output."), |
| 178 | ) |
| 179 | |
| 180 | @resource.add_auth_token_to_kwargs_from_cli |
| 181 | def run(self, args, **kwargs): |
nothing calls this directly
no test coverage detected