[node-patches] Change in ovirt-node[master]: Fix exception issue when setting the "Netmask" of ipv4/6 as ...
hadong0720 at gmail.com
hadong0720 at gmail.com
Thu Aug 1 09:53:04 UTC 2013
hadong has uploaded a new change for review.
Change subject: Fix exception issue when setting the "Netmask" of ipv4/6 as number
......................................................................
Fix exception issue when setting the "Netmask" of ipv4/6 as number
Change-Id: I1176df057adcc0d5859581fa7be6342b3bfaa0ae
Signed-off-by: hadong <hadong0720 at gmail.com>
---
M src/ovirt/node/config/defaults.py
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/64/17564/1
diff --git a/src/ovirt/node/config/defaults.py b/src/ovirt/node/config/defaults.py
index 5d985c0..415bdbb 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):
@@ -615,7 +616,8 @@
raise exceptions.InvalidData("Unknown bootprotocol: %s" %
bootproto)
(valid.IPv6Address() | valid.Empty(or_none=True))(ipaddr)
- (valid.IPv6Address() | valid.Empty(or_none=True))(netmask)
+ (valid.IPv6Address() |
+ valid.Empty(or_none=True) | valid.Number(bounds=[0, 128]))(netmask)
(valid.IPv6Address() | valid.Empty(or_none=True))(gateway)
def transaction(self):
--
To view, visit http://gerrit.ovirt.org/17564
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1176df057adcc0d5859581fa7be6342b3bfaa0ae
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