(subparsers)
| 532 | |
| 533 | |
| 534 | def initialize_upload_credentials_subcommand(subparsers): |
| 535 | command_help = """Uploads a new set of credentials to a running topology.""" |
| 536 | sub_parser = subparsers.add_parser("upload-credentials", help=command_help, formatter_class=SortingHelpFormatter) |
| 537 | |
| 538 | sub_parser.add_argument("topology-name") |
| 539 | |
| 540 | sub_parser.add_argument( |
| 541 | "-f", "--file", default=None, |
| 542 | help="""provide a properties file with credentials in it to be uploaded""" |
| 543 | ) |
| 544 | |
| 545 | sub_parser.add_argument( |
| 546 | "-u", "--user", default=None, |
| 547 | help="""name of the owner of the topology (security precaution)""" |
| 548 | ) |
| 549 | |
| 550 | # If set, this flag will become true meaning that user expects non-empty creds to be uploaded. |
| 551 | # Command exits with non-zero code if uploaded creds collection is empty. |
| 552 | sub_parser.add_argument( |
| 553 | "-e", "--exception-when-empty", action='store_true', |
| 554 | help="""If specified, throw exception if there are no credentials uploaded. |
| 555 | Otherwise, it is default to be false""" |
| 556 | ) |
| 557 | |
| 558 | sub_parser.add_argument( |
| 559 | "cred_list", nargs='*', help="List of credkeys and their values [credkey credvalue]*" |
| 560 | ) |
| 561 | |
| 562 | sub_parser.set_defaults(func=upload_credentials) |
| 563 | add_common_options(sub_parser) |
| 564 | |
| 565 | def initialize_blobstore_subcommand(subparsers): |
| 566 | sub_parser = subparsers.add_parser("blobstore", formatter_class=SortingHelpFormatter) |
no test coverage detected