def add_policy_opt(parser): parser.add_argument("--policy", metavar="<key-policy>", required=False, help=_("Key policy (length 0-255, json format)"))
def add_usage_opt(parser): parser.add_argument("--usage", metavar="<key-usage>", required=False, help=_("Key usage (default: Encrypt_Decrypt)"))
def add_realm_opt(parser): parser.add_argument( "--realm", metavar="<realm>", required=True, help=_("Realm which key belong to (example: cn-north-1)"))
def add_desc_opt(parser): parser.add_argument("--description", metavar="<description>", required=False, help=_("Key description (length 0-255)"))
def add_datakey_cipher_length_opt(parser): parser.add_argument("--datakey-cipher-length", metavar="<length>", type=int, default=64, help=_("DEK cipher text length"))
def add_key_id_arg(parser, op): parser.add_argument("key", metavar="<key-id>", help=_("Key to %s (ID)" % op))
def add_datakey_plain_length_opt(parser): parser.add_argument("--datakey-plain-length", metavar="<length>", type=int, default=64, help=_("DEK plain text length"))
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"))
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"))
def add_key_id_opt(parser): parser.add_argument("--key-id", metavar="<key-id>", required=True, help=_("Key used for encrypt/decrypt (ID)"))
def add_seq_opt(parser): parser.add_argument( "--sequence", metavar="<sequence>", help=_("Request-sequence-id (36 bit), used to trace request") )