ansibleplaybookbundle / ansible-playbook-bundle

THIS REPO IS MIGRATING: https://github.com/automationbroker/apb
GNU General Public License v2.0
140 stars 70 forks source link

Bug 1581651 - add --broker option to relist cmd #295

Closed jmrodri closed 6 years ago

jmrodri commented 6 years ago

BEFORE my patch:

$ 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

$ apb relist --broker  asb-1338-ansible-service-broker.172.17.0.1.nip.io
Relist failure: Received non-200 status code while retrieving broker: asb-1338-ansible-service-broker.172.17.0.1.nip.io
Response body:
{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"clusterservicebrokers.servicecatalog.k8s.io \"asb-1338-ansible-service-broker.172.17.0.1.nip.io\" not found","reason":"NotFound","details":{"name":"asb-1338-ansible-service-broker.172.17.0.1.nip.io","group":"servicecatalog.k8s.io","kind":"clusterservicebrokers"},"code":404}

AFTER my patch:

$ apb relist --help
usage: apb relist [-h] [--broker BROKER] [--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 BROKER       Route to the Ansible Service Broker
  --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

$ apb relist --broker  asb-1338-ansible-service-broker.172.17.0.1.nip.io
Successfully relisted the Service Catalog