Maor Lipchuk has posted comments on this change.
Change subject: engine: Split nfs, posix and iscsi logic when creating
connection struct
......................................................................
Patch Set 2:
(5 comments)
mainly cosmetic comments
....................................................
File
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ConnectStorageServerVDSCommand.java
Line 74: conParams.put("id", connection.getid(), Guid.Empty.toString());
Line 75: conParams.put("connection", connection.getconnection(), "");
Line 76:
Line 77: switch (connection.getstorage_type()) {
Line 78: case ISCSI:
This code is not formatted properly (extra spaces), please use the formatter.
Line 79: conParams.put("portal", connection.getportal(), "");
Line 80: conParams.put("port", connection.getport(), "");
Line 81: conParams.put("iqn", connection.getiqn(), "");
Line 82: conParams.put("user", connection.getuser_name(), "");
Line 79: conParams.put("portal", connection.getportal(), "");
Line 80: conParams.put("port", connection.getport(), "");
Line 81: conParams.put("iqn", connection.getiqn(), "");
Line 82: conParams.put("user", connection.getuser_name(), "");
Line 83: conParams.put("password", connection.getpassword(),
"");
Consider to re-extend this to a separated method
Line 84: break;
Line 85:
Line 86: case POSIXFS:
Line 87: // For mnt_options and vfs_type - if they are null
Line 86: case POSIXFS:
Line 87: // For mnt_options and vfs_type - if they are null
Line 88: // or empty we should not send a key with an empty
value
Line 89: conParams.putIfNotEmpty("mnt_options",
connection.getMountOptions());
Line 90: conParams.putIfNotEmpty("vfs_type",
connection.getVfsType());
Consider to re-extend this to a separated method
Line 91: break;
Line 92:
Line 93: case NFS:
Line 94: // storage_pool can be null when connecting through
vds which has no storage pool
Line 99: conParams.put("protocol_version",
connection.getNfsVersion().getValue());
Line 100: }
Line 101: conParams.putIfNotEmpty("timeout",
connection.getNfsTimeo());
Line 102: conParams.putIfNotEmpty("retrans",
connection.getNfsRetrans());
Line 103: }
Consider to re-extend this to a separated method
Line 104: break;
Line 105: }
Line 106: return conParams;
Line 107: }
Line 101: conParams.putIfNotEmpty("timeout",
connection.getNfsTimeo());
Line 102: conParams.putIfNotEmpty("retrans",
connection.getNfsRetrans());
Line 103: }
Line 104: break;
Line 105: }
I would consider to add a default block here, and add a log, just that to get
heads up if we will encounter any future bugs.
Line 106: return conParams;
Line 107: }
Line 108:
Line 109: private void logFailedStorageConnections(Map<String, String>
returnValue) {
--
To view, visit http://gerrit.ovirt.org/21971
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iba33ea1b40ef1eb9c74cad7b0531dc26e21c049a
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches