[node-patches] Change in ovirt-node[master]: Fix exception issue when setting the "Netmask" of ipv4 as in...

hadong0720 at gmail.com hadong0720 at gmail.com
Wed Aug 7 13:29:11 UTC 2013


hadong has uploaded a new change for review.

Change subject: Fix exception issue when setting the "Netmask" of ipv4 as integer
......................................................................

Fix exception issue when setting the "Netmask" of ipv4 as integer

Change-Id: I68b20ea199826532626413ed55467d49d61a58cd
Signed-off-by: hadong <hadong0720 at gmail.com>
Bug-Url:https://bugzilla.redhat.com/show_bug.cgi?id=990965
---
M src/ovirt/node/config/defaults.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/78/17778/1

diff --git a/src/ovirt/node/config/defaults.py b/src/ovirt/node/config/defaults.py
index f5ffab5..1130ae4 100644
--- a/src/ovirt/node/config/defaults.py
+++ b/src/ovirt/node/config/defaults.py
@@ -235,7 +235,8 @@
             raise exceptions.InvalidData("Unknown bootprotocol: %s" %
                                          bootproto)
         (valid.IPv4Address() | valid.Empty(or_none=True))(ipaddr)
-        (valid.IPv4Address() | valid.Empty(or_none=True))(netmask)
+        (valid.IPv4Address() |
+         valid.Empty(or_none=True) | valid.Number(bounds=[0, 32]))(netmask)
         (valid.IPv4Address() | valid.Empty(or_none=True))(gateway)
 
     def configure_no_networking(self, iface=None):


-- 
To view, visit http://gerrit.ovirt.org/17778
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68b20ea199826532626413ed55467d49d61a58cd
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>



More information about the node-patches mailing list