app-services-cli
app-services-cli copied to clipboard
refactor: override fetch if instance exists
Adresses #1522
Verification Steps
- Run Service Registry describe command in verbose mode:
rhoas service-registry describe -v
- It should call the endpoint
api/serviceregistry_mgmt/v1/registries/<registry-id>only once.
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation change
- [X] Optimization
This is the most straight forward method to ensure CLI doesnt end up doing multiple requests, marking this PR as draft for initial discussions, will replicate to rest of the commands once we lock on an approach.