summaryrefslogtreecommitdiff
path: root/virt-install
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2019-06-08 10:05:58 -0400
committerCole Robinson <crobinso@redhat.com>2019-06-08 10:20:36 -0400
commit635361f0bd2a7f74798a6611e2ef6fe5296b2a63 (patch)
tree1edc96e5668cc3496dfa7cae6e74b6b07094a2c9 /virt-install
parent1914f0f6cd9ad6fd1f5f01f64b7af98364966261 (diff)
downloadvirt-manager-635361f0bd2a7f74798a6611e2ef6fe5296b2a63.tar.gz
tests: Add osinfo URL and URL unattended tests
Diffstat (limited to 'virt-install')
-rwxr-xr-xvirt-install8
1 files changed, 5 insertions, 3 deletions
diff --git a/virt-install b/virt-install
index 3b634c7e..7db51e31 100755
--- a/virt-install
+++ b/virt-install
@@ -455,15 +455,17 @@ def build_installer(options, guest):
options.cdrom = None
options.os_variant.install = "location"
+ INSTALL_VALUES = ["location"]
+ if options.os_variant.install not in INSTALL_VALUES + [None]:
+ fail(_("Unknown --os-variant install value '%s'. Must be one of: %s") %
+ (options.os_variant.install, ", ".join(INSTALL_VALUES)))
+
if options.os_variant.install == "location":
if not options.location:
location = guest.osinfo.get_location(guest.os.arch)
logging.debug(
"Generated default libosinfo '--location %s'", location)
options.location = location
- elif options.os_variant.install:
- fail(_("Unknown --os-variant install=%s") %
- options.os_variant.install)
if options.location:
(location,