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 frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/SanStorageModelBase.java 4 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/50/26050/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 0e77928..f742425 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 @@ -197,7 +197,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/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 96a5d37..96027a64 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/26050 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7ebfc1335b051e02f62b9544d2500416818940d0 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches