virt-manager/53375bad-raise-value-error-when-no-ipaddr-set.patch
Charles Arnold f42ba1daac - Upstream bug fixes
533d708d-fix-showing-vcpus-values.patch
  533d7602-fix-changing-graphics-type.patch
  533d7be7-clarify-iscsi-IQN-fields.patch
- Dropped virtman-init-vm-processor-topology.patch in favor of
  upstream 533d708d-fix-showing-vcpus-values.patch

- bnc#869024 - Build0198: Only option to create a virtual machine is
  "import existing disk image" 
  virtman-add-s390x-arch-support.patch

- bnc#871642 - virt-manager wants to install libvirt-daemon-xen
  even when it is installed 
  xen.spec
- Xen: Virt-install won't reboot VM after install of SLE HVM guest
  because of libxl exception.
  virtinst-keep-cdrom-media-attached.patch

- Fate#315125: add NOCOW flag
  virtinst-vol-default-nocow.patch 

- Upstream bug fixes
  53375bad-raise-value-error-when-no-ipaddr-set.patch
  53388de2-show-port-number-for-active-autoport-VM.patch
  53397ae0-check-ip-address-format.patch
  53399b45-hook-into-domain-balloon-event.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=162
2014-04-04 01:55:04 +00:00

32 lines
1.2 KiB
Diff

Subject: createinterface: raise value error when no ip addr set
From: Chen Hanxiao chenhanxiao@cn.fujitsu.com Sun Mar 30 07:47:22 2014 +0800
Date: Sun Mar 30 07:47:57 2014 +0800:
Git: 119025e1ef5e6b47d634c1e05d9143f0092da5c2
We could set blank ip address
IP setting->Configure->Mode (static), then press "OK".
And libvirt will throw an error not very helpful:
Error creating interface: 'Could not define interface:
XML error: could not get interface XML description:
XML invalid - Element protocol failed to validate attributes.
This patch will forbid setting an empty ip address.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
diff --git a/virtManager/createinterface.py b/virtManager/createinterface.py
index 11fc9b2..4588bba 100644
--- a/virtManager/createinterface.py
+++ b/virtManager/createinterface.py
@@ -764,7 +764,7 @@ class vmmCreateInterface(vmmGObjectUI):
def build_ip_info(self):
def build_ip(addr_str):
if not addr_str:
- return None, None
+ raise ValueError(_("Please enter an IP address"))
ret = addr_str.rsplit("/", 1)
address = ret[0]
prefix = None