`hammer capsule update` with invalid url shows improper error message
Description of problem:
The error message shows the capsule could not be updated, but the capsule is actually updated. This happens when the proxy features are not available (i.e. https://proxy.example.com:8000/features).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. `hammer capsule update --id 1 --new-name "centos7-devel.example.com" --url "http://centos7-devel.example.com:8001"` # setting to port 8001 instead of 8000 as an example of an invalid URL
Could not update the proxy
Updated with errors getting proxy features
#2 Updated by Evgeni Golov almost 2 years ago
I must admit I don't think this is a bug.
You are changing the URL of a proxy, and it tries to verify the connection to it. As you just set a "wrong" port (or hostname, in the rename case), it rightfully fails. Actually, it also should revert the change in that case.
I think what you'd need here is a --force or --no-verify switch, that instructs hammer not to try to talk to the new URI, and just assume the user knows what they are doing.