summaryrefslogtreecommitdiffstats
path: root/cli/objects/scopes.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-03-31 10:40:19 +0000
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-03-31 15:07:40 +0200
commitc4179641790274f53cb325570c2fda24a10f1f92 (patch)
tree6a42ceb28fa51e5667c901961671617e84a2792e /cli/objects/scopes.py
parent6fd3cb7a251c3c0e6b98947f420c3d5f3146e582 (diff)
Fix fallback --repo value in 'restore image'
'--repo' was an optional argument to specify the ip of the machine holding the image to be restored. In case it was not specified it defaults to the ip specified inside ogcli.json for the ogServer (ie. As fallback, we assume the repo is in the same machine as the ogServer) We retrieve the ip using urlparse from urllib.parse module. The parse result has a 'netloc' member which holds the ip, but also any specified port. This resulted in a payload like: > ogcli restore image --id 3 --disk 1 --part 1 --type unicast-direct --client-ip 192.168.56.11 {"disk": "1", "partition": "1", "id": "1", "name": "pc11bak", "profile": "3", "repository": "192.168.56.10:8888", "type": "UNICAST-DIRECT", "clients": ["192.168.56.11"]} Split netloc to avoid copying the ogServer port.
Diffstat (limited to 'cli/objects/scopes.py')
0 files changed, 0 insertions, 0 deletions