[node-patches] Change in ovirt-node[master]: Fix throw an exception when configure "iscsi initiator name"...

hadong0720 at gmail.com hadong0720 at gmail.com
Fri Jul 5 06:45:43 UTC 2013


hadong has uploaded a new change for review.

Change subject: Fix throw an exception when configure "iscsi initiator name" with an empty string. Also fix similar issue for setting "Rsyslog address" and "Netconsole address" with an empty string
......................................................................

Fix throw an exception when configure "iscsi initiator name"
with an empty string.
Also fix similar issue for setting "Rsyslog address" and "Netconsole
address" with an empty string

Change-Id: If5e4ac9dd6aa2cc0924281e018b209078f6aba3e
Signed-off-by: hadong <hadong0720 at gmail.com>
---
M src/ovirt/node/config/defaults.py
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/71/16471/1

diff --git a/src/ovirt/node/config/defaults.py b/src/ovirt/node/config/defaults.py
index 8ea4ab8..e508db5 100644
--- a/src/ovirt/node/config/defaults.py
+++ b/src/ovirt/node/config/defaults.py
@@ -894,7 +894,7 @@
 
     @NodeConfigFileSection.map_and_update_defaults_decorator
     def update(self, server, port):
-        valid.FQDNOrIPAddress()(server)
+        (valid.Empty(or_none=True) | valid.FQDNOrIPAddress())(server)
         valid.Port()(port)
 
     def transaction(self):
@@ -1129,7 +1129,7 @@
     @NodeConfigFileSection.map_and_update_defaults_decorator
     def update(self, name, target_name, target_host, target_port):
         # FIXME add more validation
-        valid.IQN()(name)
+        (valid.Empty(or_none=True) | valid.IQN())(name)
         (valid.Empty(or_none=True) | valid.IQN())(target_name)
         (valid.Empty(or_none=True) | valid.FQDNOrIPAddress())(target_host)
         (valid.Empty(or_none=True) | valid.Port())(target_port)
@@ -1166,7 +1166,7 @@
 
     @NodeConfigFileSection.map_and_update_defaults_decorator
     def update(self, server, port):
-        valid.FQDNOrIPAddress()(server)
+        (valid.Empty(or_none=True) | valid.FQDNOrIPAddress())(server)
         valid.Port()(port)
 
     def transaction(self):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5e4ac9dd6aa2cc0924281e018b209078f6aba3e
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