*What*
Modify the existing command to get serviceinstances for a service to also show the available integrations for that service and their state .
{code} oc plugin mobile get serviceinstances <serviceName> {code} Ensure there is clear documentation on this command and what it does *How* This command should look at the service instances provisioned for the named service (note it 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 the serviceinstance and the integration service 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. The integration should be shown as {code} integration available{code}
There should be a good set of unit tests added for this modification to the command |
|