MCPcopy Index your code
hub / github.com/feast-dev/feast / feast_permissions_list_roles_command

Function feast_permissions_list_roles_command

sdk/python/feast/cli/permissions.py:231–271  ·  view source on GitHub ↗

List all the configured roles

(ctx: click.Context, verbose: bool)

Source from the content-addressed store, hash-verified

229)
230@click.pass_context
231def 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 )

Callers

nothing calls this directly

Calls 2

create_feature_storeFunction · 0.90
list_permissionsMethod · 0.45

Tested by

no test coverage detected