openshift / ansible-service-broker

Ansible Service Broker
Apache License 2.0
228 stars 84 forks source link

Type fields in APB specs are case-sensitive #592

Closed eriknelson closed 6 years ago

eriknelson commented 6 years ago

apb push -o an APB spec with a type of String rather than string will cause the catalog endpoint to return empty spec objects, since they end up erroring on this case statement. Of potential importance, this is the local openshift adapter:

https://github.com/openshift/ansible-service-broker/blob/master/pkg/broker/util.go#L200

This causes apb list to display an empty entry (it will look like a blank line).

Interestingly, an additional bootstrap will resolve the problem...somehow. apb bootstrap && apb list will display the expected entry, so something must be lowercasing the type.

shawn-hurley commented 6 years ago

Looks like this is causing the same behaviour as this https://github.com/openshift/ansible-service-broker/issues/388

I assume we should just cast the switch to lower case.

eriknelson commented 6 years ago

@shawn-hurley yep, was thinking the same thing.

mhrivnak commented 6 years ago

I'll submit a fix for this.