Пример #1
0
 def add_policy_opt(parser):
     parser.add_argument("--policy",
                         metavar="<key-policy>",
                         required=False,
                         help=_("Key policy (length 0-255, json format)"))
Пример #2
0
 def add_usage_opt(parser):
     parser.add_argument("--usage",
                         metavar="<key-usage>",
                         required=False,
                         help=_("Key usage (default: Encrypt_Decrypt)"))
Пример #3
0
 def add_realm_opt(parser):
     parser.add_argument(
         "--realm",
         metavar="<realm>",
         required=True,
         help=_("Realm which key belong to (example: cn-north-1)"))
Пример #4
0
 def add_desc_opt(parser):
     parser.add_argument("--description",
                         metavar="<description>",
                         required=False,
                         help=_("Key description (length 0-255)"))
Пример #5
0
 def add_datakey_cipher_length_opt(parser):
     parser.add_argument("--datakey-cipher-length",
                         metavar="<length>",
                         type=int,
                         default=64,
                         help=_("DEK cipher text length"))
Пример #6
0
 def add_key_id_arg(parser, op):
     parser.add_argument("key",
                         metavar="<key-id>",
                         help=_("Key to %s (ID)" % op))
Пример #7
0
 def add_datakey_plain_length_opt(parser):
     parser.add_argument("--datakey-plain-length",
                         metavar="<length>",
                         type=int,
                         default=64,
                         help=_("DEK plain text length"))
Пример #8
0
 def add_random_data_len_arg(parser):
     parser.add_argument("random_data_length",
                         metavar="<length>",
                         type=int,
                         help=_("The length of the random byte string"))
Пример #9
0
 def add_without_plain_text_opt(parser):
     parser.add_argument("--without-plain-text",
                         required=False,
                         default=False,
                         action="store_true",
                         help=_("Do not show plain text"))
Пример #10
0
 def add_key_id_opt(parser):
     parser.add_argument("--key-id",
                         metavar="<key-id>",
                         required=True,
                         help=_("Key used for encrypt/decrypt (ID)"))
Пример #11
0
 def add_seq_opt(parser):
     parser.add_argument(
         "--sequence",
         metavar="<sequence>",
         help=_("Request-sequence-id (36 bit), used to trace request")
     )