*What*
Add a new Modify the existing command to the CLI to get integrations serviceinstances for provisioned services within the namespace a service . If the command already exists. Review the command and ensure it is properly unit tested.
{code} oc plugin mobile get integrations serviceinstances <serviceName> {code} *How* This command should look at the service instances provisioned , for each of these the named service (note it should look at already does this). Then for each instance find the ClusterServiceClass and pull out the integrations list. It should then look for any serviceinstances that have the label {code}serviceName:integration{code} in the namespace If there is none then the integration is not available (should be shown as {code} integration unavailable. No <serviceName> provisioned {code} If there is one we should check for a binding between that the serviceinstance and the integration service instance serviceinstance . This can be done by checking the consumer and provider labels on the binding. if one of these bindings exists then the integration should be show as {code} integration enabled {code} If there is no binding then the integration is available but not enabled. If there is The integration should be shown as {code} integration available{code}
There should be a binding then good set of unit tests added for this modification to the integration is enabled command |
|