List all the configured roles
(ctx: click.Context, verbose: bool)
| 229 | ) |
| 230 | @click.pass_context |
| 231 | def feast_permissions_list_roles_command(ctx: click.Context, verbose: bool): |
| 232 | """ |
| 233 | List all the configured roles |
| 234 | """ |
| 235 | from tabulate import tabulate |
| 236 | |
| 237 | table: list[Any] = [] |
| 238 | store = create_feature_store(ctx) |
| 239 | permissions = store.list_permissions() |
| 240 | if not verbose: |
| 241 | cli_utils.handler_list_all_permissions_roles( |
| 242 | permissions=permissions, table=table |
| 243 | ) |
| 244 | print( |
| 245 | tabulate( |
| 246 | table, |
| 247 | headers=[ |
| 248 | "ROLE NAME", |
| 249 | ], |
| 250 | tablefmt="grid", |
| 251 | ) |
| 252 | ) |
| 253 | else: |
| 254 | objects = cli_utils.fetch_all_feast_objects( |
| 255 | store=store, |
| 256 | ) |
| 257 | cli_utils.handler_list_all_permissions_roles_verbose( |
| 258 | objects=objects, permissions=permissions, table=table |
| 259 | ) |
| 260 | print( |
| 261 | tabulate( |
| 262 | table, |
| 263 | headers=[ |
| 264 | "ROLE NAME", |
| 265 | "RESOURCE NAME", |
| 266 | "RESOURCE TYPE", |
| 267 | "PERMITTED ACTIONS", |
| 268 | ], |
| 269 | tablefmt="plain", |
| 270 | ) |
| 271 | ) |
nothing calls this directly
no test coverage detected