Sergey Gotliv has uploaded a new change for review. Change subject: engine: Set default tpgt value to 1 ......................................................................
engine: Set default tpgt value to 1 Engine uses wrong iSCSI terminology, portal instead of tpgt (target portal group tag) which only purpose at this stage impose iSCSI layer to create node record in the new format supporting multipathing. Tpgt default value in VDSM is 1 so it should be the same here. Change-Id: I7ebfc1335b051e02f62b9544d2500416818940d0 Signed-off-by: Sergey Gotliv <sgot...@redhat.com> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageServerConnections.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/StorageDomainHelper.java M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostResourceTest.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/SanStorageModelBase.java 5 files changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/60/26660/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageServerConnections.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageServerConnections.java index 99da2b0..3564203 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageServerConnections.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageServerConnections.java @@ -7,6 +7,8 @@ public class StorageServerConnections implements Serializable { private static final long serialVersionUID = 5444293590307760809L; + public static final String DEFAULT_TPGT = "1"; + public StorageServerConnections() { storageType = StorageType.UNKNOWN; } @@ -91,7 +93,7 @@ this.port = value; } - private String portal; + private String portal = DEFAULT_TPGT; public String getportal() { return this.portal; diff --git a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java index f82f2a4..c4ba804 100644 --- a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java +++ b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java @@ -194,7 +194,7 @@ if (iscsiDetails.isSetPassword()) { cnx.setpassword(iscsiDetails.getPassword()); } - cnx.setportal("0");//TODO: when VSDM and Backend will support this, we will need to externalize this parameter to the user + StorageServerConnectionParametersBase connectionParms = new StorageServerConnectionParametersBase(cnx, guid); return doAction(VdcActionType.ConnectStorageToVds, connectionParms, action); } diff --git a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/StorageDomainHelper.java b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/StorageDomainHelper.java index 66d5aea..9394409 100644 --- a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/StorageDomainHelper.java +++ b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/StorageDomainHelper.java @@ -14,6 +14,6 @@ storageType, userName, port==null ? null : Integer.toString(port), - "0");//TODO: when VSDM and Backend will support this, we will need to externalize portal to the user + StorageServerConnections.DEFAULT_TPGT); } } diff --git a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostResourceTest.java b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostResourceTest.java index f2baabb..70a58cb 100644 --- a/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostResourceTest.java +++ b/backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostResourceTest.java @@ -43,6 +43,7 @@ import org.ovirt.engine.core.common.businessentities.AsyncTaskStatusEnum; import org.ovirt.engine.core.common.businessentities.FenceActionType; import org.ovirt.engine.core.common.businessentities.FenceStatusReturnValue; +import org.ovirt.engine.core.common.businessentities.StorageServerConnections; import org.ovirt.engine.core.common.businessentities.StorageType; import org.ovirt.engine.core.common.businessentities.VDS; import org.ovirt.engine.core.common.businessentities.VDSGroup; @@ -390,7 +391,7 @@ "StorageServerConnection.password" }, new Object[] { GUIDS[0], ISCSI_SERVER_ADDRESS, - "0", //TODO: right now hard-coded, but this should change when VDSM and Backend support portal + StorageServerConnections.DEFAULT_TPGT, //TODO: right now hard-coded, but this should change when VDSM and Backend support portal ISCSI_IQN, ISCSI_PORT_STRING, ISCSI_STORAGE_TYPE, diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/SanStorageModelBase.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/SanStorageModelBase.java index 0977057..1299fbc 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/SanStorageModelBase.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/SanStorageModelBase.java @@ -375,7 +375,6 @@ for (int i = 0; i < targetsToConnect.size(); i++) { SanTargetModel model = targetsToConnect.get(i); StorageServerConnections connection = new StorageServerConnections(); - connection.setportal("0"); //$NON-NLS-1$ connection.setstorage_type(StorageType.ISCSI); connection.setuser_name((Boolean) getUseUserAuth().getEntity() ? (String) getUserName().getEntity() : ""); //$NON-NLS-1$ connection.setpassword((Boolean) getUseUserAuth().getEntity() ? (String) getPassword().getEntity() : ""); //$NON-NLS-1$ @@ -431,7 +430,6 @@ StorageServerConnections tempVar = new StorageServerConnections(); tempVar.setconnection(((String) getAddress().getEntity()).trim()); tempVar.setport(((String) getPort().getEntity()).trim()); - tempVar.setportal("0"); //$NON-NLS-1$ tempVar.setstorage_type(StorageType.ISCSI); tempVar.setuser_name((Boolean) getUseUserAuth().getEntity() ? (String) getUserName().getEntity() : ""); //$NON-NLS-1$ tempVar.setpassword((Boolean) getUseUserAuth().getEntity() ? (String) getPassword().getEntity() : ""); //$NON-NLS-1$ -- To view, visit http://gerrit.ovirt.org/26660 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ebfc1335b051e02f62b9544d2500416818940d0 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.4 Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches