Merge pull request #2459 from KPrasch/shorthand

Shorthand CLI flags: -avk, -bvk, and -bek
pull/2451/head
K Prasch 2020-12-07 16:08:06 -08:00 committed by GitHub
commit 65a9b84cbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1 @@
Introduces shorthand options for --bob-verifying-key (-bvk), --bob-encrypting-key (-bek) and alice verifying key (-avk) for CLI commands.

View File

@ -31,12 +31,15 @@ class PolicyBaseSchema(BaseSchema):
required=True, load_only=True,
click=click.option(
'--bob-encrypting-key',
'-bek',
help="Bob's encrypting key as a hexadecimal string",
type=click.STRING, required=True,))
bob_verifying_key = fields.Key(
required=True, load_only=True,
click=click.option(
'--bob-verifying-key', help="Bob's verifying key as a hexadecimal string",
'--bob-verifying-key',
'-bvk',
help="Bob's verifying key as a hexadecimal string",
type=click.STRING, required=True))
m = fields.M(
required=True, load_only=True,
@ -119,6 +122,7 @@ class Revoke(BaseSchema):
required=True, load_only=True,
click=click.option(
'--bob-verifying-key',
'-bvk',
help="Bob's verifying key as a hexadecimal string", type=click.STRING,
required=True))

View File

@ -31,6 +31,7 @@ class JoinPolicy(BaseSchema): #TODO: this doesn't have a cli implementation
load_only=True, required=True,
click=click.option(
'--alice-verifying-key',
'-avk',
help="Alice's verifying key as a hexadecimal string",
required=True, type=click.STRING,))
@ -51,6 +52,7 @@ class Retrieve(BaseSchema):
required=True, load_only=True,
click=click.option(
'--alice-verifying-key',
'-avk',
help="Alice's verifying key as a hexadecimal string",
type=click.STRING,
required=True))

View File

@ -66,6 +66,7 @@ from nucypher.network.middleware import RestMiddleware
option_bob_verifying_key = click.option(
'--bob-verifying-key',
'-bvk',
help="Bob's verifying key as a hexadecimal string",
type=click.STRING,
required=True