From d8efd3321c759440c1f9f66b55b6b2c8b1edb67a Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Mon, 16 May 2022 15:07:37 +0200 Subject: create image: fix --repo default ip value rest.URL is the ip and port of the ogServer like: 192.168.56.10:8888, specified in ogcli.json. As long as the host and port is specified in rest.URL, split by the ':' character and extract the ip. Fixes OpenGnsys clients failing to execute the command due to invalid repository IP being fed to the underlying bash scripts. --- cli/objects/images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/objects/images.py b/cli/objects/images.py index 270dfc3..c696d53 100644 --- a/cli/objects/images.py +++ b/cli/objects/images.py @@ -117,7 +117,7 @@ class OgImage(): help='Image description (for new images)') parser.add_argument('--repo', nargs='?', - default=urlparse(rest.URL).netloc, + default=urlparse(rest.URL).netloc.split(':')[0], help='Images repository ip') group = parser.add_argument_group('clients', 'Client selection args') group.add_argument('--client-ip', -- cgit v1.2.3-18-g5258