Hello Eduardo,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/17197
to review the following change.
Change subject: Remove obscure and redundant getIntParam().
......................................................................
Remove obscure and redundant getIntParam().
Change-Id: I65b3e05535652e0f9f9c0c4fe7c97db368c6f06e
Signed-off-by: Eduardo <[email protected]>
---
M vdsm/storage/hsm.py
1 file changed, 3 insertions(+), 14 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/17197/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 7ce80d6..b49f419 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -156,16 +156,6 @@
def _connectionDict2ConnectionInfo(conTypeId, conDict):
- def getIntParam(optDict, key, default):
- res = optDict.get(key, default)
- if res is None:
- return res
-
- try:
- return int(res)
- except ValueError:
- raise se.InvalidParameterException(key, res)
-
# FIXME: Remove when nfs_mount_options is no longer supported. This is
# in the compatibility layer so that the NFSConnection class stays clean.
# Engine options have precendence, so use deprecated nfs_mount_options
@@ -201,11 +191,10 @@
if version == "auto":
version = None
+ retx = int(conDict['retrans']) if conDict.get('retrans') else None
+ tout = int(conDict['timeout']) if conDict.get('timeout') else None
params = storageServer.NfsConnectionParameters(
- conDict.get('connection', None),
- getIntParam(conDict, 'retrans', None),
- getIntParam(conDict, 'timeout', None),
- version)
+ conDict.get('connection', None), retx, tout, version)
elif typeName == 'posixfs':
params = storageServer.PosixFsConnectionParameters(
conDict.get('connection', None),
--
To view, visit http://gerrit.ovirt.org/17197
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I65b3e05535652e0f9f9c0c4fe7c97db368c6f06e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches