Closed jmrodri closed 6 years ago
$ apb relist --help
usage: apb relist [-h] [--broker-name BROKER_NAME] [--secure] [--ca-path CERT]
[--username BASIC_AUTH_USERNAME]
[--password BASIC_AUTH_PASSWORD]
optional arguments:
-h, --help show this help message and exit
--broker-name BROKER_NAME
Name of the ServiceBroker k8s resource
--secure Verify SSL connection to Ansible Service Broker
--ca-path CERT CA cert to use for verifying SSL connection to Ansible
Service Broker
--username BASIC_AUTH_USERNAME, -u BASIC_AUTH_USERNAME
Specify the basic auth username to be used
--password BASIC_AUTH_PASSWORD, -p BASIC_AUTH_PASSWORD
Specify the basic auth password to be used
passing in an invalid option now correctly prints out the usage
$ apb relist --broker asb-1338-ansible-service-broker.172.17.0.1.nip.io
usage: apb [-h] [--debug] [--project BASE_PATH] [--token AUTH_TOKEN]
{relist,run,help,test,refresh,prepare,setup,bootstrap,list,remove,init,version,build,push,serviceinstance}
...
apb: error: unrecognized arguments: --broker asb-1338-ansible-service-broker.172.17.0.1.nip.io
$ apb relist
Successfully relisted the Service Catalog
Override the ArgumentParser so we could disable the argument abbreviations.