Daniel Erez has uploaded a new change for review.

Change subject: core: tpgt should not be sent when empty
......................................................................

core: tpgt should not be sent when empty

Ensure 'tpgt' isn't sent as an empty string as VDSM expects an integer.
I.e. 'tpgt' is optional, but if specified, it must be an integer.

Vdsm API:
"
{'type': 'IscsiConnectionParameters',
 'data': {'portal': 'IscsiPortal', 'iqn': 'str', '*tpgt': 'int',
          '*iface': 'str', '*credentials': 'IscsiCredentials'}}

@tpgt: #optional The Target Portal Group Tag to use
"

Change-Id: I79b6b80fafff7b87700e4e340eacff6cd0c43f30
Bug-Url: https://bugzilla.redhat.com/1160785
Signed-off-by: Daniel Erez <[email protected]>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ConnectStorageServerVDSCommand.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/35582/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ConnectStorageServerVDSCommand.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ConnectStorageServerVDSCommand.java
index 9fb6594..16077cc 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ConnectStorageServerVDSCommand.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/ConnectStorageServerVDSCommand.java
@@ -73,7 +73,7 @@
         DefaultValueMap con = new DefaultValueMap();
         con.put("id", connection.getid(), Guid.Empty.toString());
         con.put("connection", connection.getconnection(), "");
-        con.put("tpgt", connection.getportal(), "");
+        con.putIfNotEmpty("tpgt", connection.getportal());
         con.put("port", connection.getport(), "");
         con.put("iqn", connection.getiqn(), "");
         con.put("user", connection.getuser_name(), "");


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79b6b80fafff7b87700e4e340eacff6cd0c43f30
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Daniel Erez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to