summaryrefslogtreecommitdiff
path: root/virtinst/storage.py
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2019-07-02 19:39:28 -0400
committerCole Robinson <crobinso@redhat.com>2019-07-03 19:37:01 -0400
commit67bb8fabdb0532f56df8c6b8c8b4831866660bd9 (patch)
tree03742807b94d7ab4a1e5ac92f1b8c202b2ca1ab9 /virtinst/storage.py
parent9d7b20d3de79f81a4aae1ec32502c4d96479a76a (diff)
downloadvirt-manager-67bb8fabdb0532f56df8c6b8c8b4831866660bd9.tar.gz
storage: Drop redundant validation
libvirt catches most of this, and it's not all that useful to duplicate it ourselves
Diffstat (limited to 'virtinst/storage.py')
-rw-r--r--virtinst/storage.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/virtinst/storage.py b/virtinst/storage.py
index 309afe7e..b134fc79 100644
--- a/virtinst/storage.py
+++ b/virtinst/storage.py
@@ -408,13 +408,6 @@ class StoragePool(_StorageObject):
if not self.format and self.supports_format():
self.format = "auto"
- if self.supports_hosts() and not self.hosts:
- raise RuntimeError(_("Hostname is required"))
- if (self.supports_source_path() and
- self.type != self.TYPE_LOGICAL and
- not self.source_path):
- raise RuntimeError(_("Source path is required"))
-
if (self.type == self.TYPE_DISK and self.format == "auto"):
# There is no explicit "auto" type for disk pools, but leaving out
# the format type seems to do the job for existing formatted disks
@@ -424,15 +417,6 @@ class StoragePool(_StorageObject):
"""
Install storage pool xml.
"""
- if (self.type == self.TYPE_LOGICAL and
- build and not self.source_path):
- raise ValueError(_("Must explicitly specify source path if "
- "building pool"))
- if (self.type == self.TYPE_DISK and
- build and self.format == "auto"):
- raise ValueError(_("Must explicitly specify disk format if "
- "formatting disk device."))
-
xml = self.get_xml()
log.debug("Creating storage pool '%s' with xml:\n%s",
self.name, xml)