Asaf Shakarchi has uploaded a new change for review.

Change subject: engine: Forbid adding an existing SAN Export Storage Domain
......................................................................

engine: Forbid adding an existing SAN Export Storage Domain

- Forbid adding an existing SAN Export Storage Domain as this type
of domain is deprecated in the AddExistingSANStorageDomain command.
- Remove the SNA Export Storage Domain options from the storage type in
  the 'Import Domain' dialog.

Bug-Url: https://bugzilla.redhat.com/865506
Change-Id: I35b46ff1a507732e38b8979db067a9c52b927714
Signed-off-by: Asaf Shakarchi <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddExistingSANStorageDomainCommand.java
M 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java
M 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
7 files changed, 13 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/38/8838/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddExistingSANStorageDomainCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddExistingSANStorageDomainCommand.java
index 67f98ff..147cbe8 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddExistingSANStorageDomainCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddExistingSANStorageDomainCommand.java
@@ -3,6 +3,7 @@
 import org.apache.commons.lang.StringUtils;
 import org.ovirt.engine.core.common.action.AddSANStorageDomainParameters;
 import org.ovirt.engine.core.common.businessentities.SANState;
+import org.ovirt.engine.core.common.businessentities.StorageDomainType;
 import org.ovirt.engine.core.common.businessentities.storage_domain_static;
 import org.ovirt.engine.core.common.utils.Pair;
 import org.ovirt.engine.core.compat.Guid;
@@ -34,6 +35,11 @@
 
     @Override
     protected boolean CanAddDomain() {
+        if (getStorageDomain().getstorage_domain_type() == 
StorageDomainType.ImportExport) {
+            
addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_CONNECTION_DATA_ILLEGAL);
+            return false;
+        }
+
         return CheckExistingStorageDomain();
     }
 
diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
index 7312d3b..daed268 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
@@ -458,6 +458,7 @@
     ERROR_CANNOT_REMOVE_STORAGE_POOL_WITH_NONMASTER_DOMAINS,
     
ERROR_CANNOT_UPDATE_STORAGE_POOL_COMPATIBILITY_VERSION_BIGGER_THAN_CLUSTERS,
     ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_CONNECTION_DATA_ILLEGAL,
+    ERROR_CANNOT_ADD_DEPRECATED_EXISTING_SAN_EXPORT_STORAGE_DOMAIN,
     ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_LUNS_PROBLEM,
     ERROR_CANNOT_RECOVERY_STORAGE_POOL_THERE_IS_ACTIVE_DATA_DOMAINS,
     ERROR_CANNOT_RECOVERY_STORAGE_POOL_STORAGE_TYPE_MISSMATCH,
diff --git 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
index a0d0037..694548d 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -405,6 +405,7 @@
 ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS=Cannot ${action} ${type}. Only 
Storage Domain name is updateable.
 
ERROR_CANNOT_UPDATE_STORAGE_POOL_COMPATIBILITY_VERSION_BIGGER_THAN_CLUSTERS=Cannot
 update Data Center compatibility version to a value that is greater than its 
Cluster's version. The following clusters should be upgraded ${ClustersList}.
 ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_CONNECTION_DATA_ILLEGAL=Cannot import 
Storage Domain. Internal Error: The connection data is illegal.
+ERROR_CANNOT_ADD_DEPRECATED_EXISTING_SAN_EXPORT_STORAGE_DOMAIN=Cannot import 
SAN Export Storage Domain as it is deprecated.
 ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_LUNS_PROBLEM=Cannot import Storage 
Domain. Not all LUNs connected to Storage Domain.
 NETWORK_MAC_ADDRESS_IN_USE=MAC Address is already in use.
 NETWORK_INVALID_MAC_ADDRESS=The specified MAC Address cannot be set.\n\
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
index 9599c4e..fd4ef3c 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
@@ -1075,6 +1075,9 @@
     @DefaultStringValue("Cannot import Storage Domain. Internal Error: The 
connection data is illegal.")
     String ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_CONNECTION_DATA_ILLEGAL();
 
+    @DefaultStringValue("Cannot import SAN Export Storage Domain as it is 
deprecated.")
+    String ERROR_CANNOT_ADD_DEPRECATED_EXISTING_SAN_EXPORT_STORAGE_DOMAIN();
+
     @DefaultStringValue("Cannot import Storage Domain. Not all LUNs connected 
to Storage Domain.")
     String ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_LUNS_PROBLEM();
 
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java
index 2157f27..9b0b5d8 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java
@@ -578,14 +578,6 @@
         tempVar2.setRole(StorageDomainType.ImportExport);
         items.add(tempVar2);
 
-        IscsiImportStorageModel tempVar3 = new IscsiImportStorageModel();
-        tempVar3.setRole(StorageDomainType.ImportExport);
-        items.add(tempVar3);
-
-        FcpImportStorageModel tempVar4 = new FcpImportStorageModel();
-        tempVar4.setRole(StorageDomainType.ImportExport);
-        items.add(tempVar4);
-
         model.setItems(items);
 
         model.Initialize();
diff --git 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
index 424ef96..4ff2406 100644
--- 
a/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
+++ 
b/frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
@@ -403,6 +403,7 @@
 ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS=Cannot ${action} ${type}. Only 
Storage Domain name is updateable.
 
ERROR_CANNOT_UPDATE_STORAGE_POOL_COMPATIBILITY_VERSION_BIGGER_THAN_CLUSTERS=Cannot
 update Data Center compatibility version to a value that is greater than its 
Cluster's version. The following clusters should be upgraded ${ClustersList}.
 ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_CONNECTION_DATA_ILLEGAL=Cannot import 
Storage Domain. Internal Error: The connection data is illegal.
+ERROR_CANNOT_ADD_DEPRECATED_EXISTING_SAN_EXPORT_STORAGE_DOMAIN=Cannot import 
SAN Export Storage Domain as it is deprecated.
 ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_LUNS_PROBLEM=Cannot import Storage 
Domain. Not all LUNs connected to Storage Domain.
 NETWORK_MAC_ADDRESS_IN_USE=MAC Address is already in use.
 NETWORK_INVALID_MAC_ADDRESS=The specified MAC Address cannot be set.\n\
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
index a981815..608b09b 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
+++ 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
@@ -401,6 +401,7 @@
 ERROR_CANNOT_CHANGE_STORAGE_DOMAIN_FIELDS=Cannot ${action} ${type}. Only 
Storage Domain name is updateable.
 
ERROR_CANNOT_UPDATE_STORAGE_POOL_COMPATIBILITY_VERSION_BIGGER_THAN_CLUSTERS=Cannot
 update Data Center compatibility version to a value that is greater than its 
Cluster's version. The following clusters should be upgraded ${ClustersList}.
 ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_CONNECTION_DATA_ILLEGAL=Cannot import 
Storage Domain. Internal Error: The connection data is illegal.
+ERROR_CANNOT_ADD_DEPRECATED_EXISTING_SAN_EXPORT_STORAGE_DOMAIN=Cannot import 
SAN Export Storage Domain as it is deprecated.
 ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_LUNS_PROBLEM=Cannot import Storage 
Domain. Not all LUNs connected to Storage Domain.
 NETWORK_MAC_ADDRESS_IN_USE=MAC Address is already in use.
 NETWORK_INVALID_MAC_ADDRESS=The specified MAC Address cannot be set.\n\


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

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

Reply via email to