File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -576,14 +576,17 @@ def metrics(ctx: Context) -> None:
576576 type = str ,
577577 help = "Filter keys by tags for respective user" ,
578578)
579+ @click .option ("-p" , "--prefix" , type = str , help = "Only list keys with the given prefix" )
579580@click .pass_context
580- def list_keys (ctx : Context , details : bool , filter : Optional [str ]) -> None :
581+ def list_keys (
582+ ctx : Context , details : bool , filter : Optional [str ], prefix : Optional [str ]
583+ ) -> None :
581584 """List all keys on the NetHSM.
582585
583586 This command requires authentication as a user with the Administrator or
584587 Operator role."""
585588 with connect (ctx ) as nethsm :
586- key_ids = nethsm .list_keys (filter )
589+ key_ids = nethsm .list_keys (filter , prefix = prefix )
587590
588591 print (f"Keys on NetHSM { nethsm .host } :" )
589592 print ()
You can’t perform that action at this time.
0 commit comments