Maor Lipchuk has uploaded a new change for review.

Change subject: core: Support format option for data domain
......................................................................

core: Support format option for data domain

Adding the option to remove Data Storage Domain from the engine without
formatting it so we can use it to move entities from one setup to
another.

Change-Id: I4392de431f6523e3824bbddd9d79aa4b1eb0819c
Bug-Url: https://bugzilla.redhat.com/1138132
Signed-off-by: Maor Lipchuk <mlipc...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainCommand.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/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/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
5 files changed, 1 insertion(+), 14 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/86/33286/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainCommand.java
index 6f60af9..75da33f 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RemoveStorageDomainCommand.java
@@ -55,7 +55,7 @@
             return;
         }
 
-        if (!isISO(dom) && !isExport(dom) || format) {
+        if (format) {
             if (!connectStorage()) {
                 return;
             }
@@ -130,11 +130,6 @@
                 
addCanDoActionMessage(VdcBllMessages.CANNOT_REMOVE_STORAGE_DOMAIN_INVALID_HOST_ID);
                 return false;
             }
-        }
-
-        if (isDataDomain(dom) && !format) {
-            
addCanDoActionMessage(VdcBllMessages.ERROR_CANNOT_REMOVE_STORAGE_DOMAIN_DO_FORMAT);
-            return false;
         }
 
         if (dom.getStorageType() == StorageType.GLANCE) {
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
index db7c172..b716f48 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
@@ -625,7 +625,6 @@
     
ERROR_CANNOT_FORCE_REMOVE_STORAGE_POOL_WITH_VDS_NOT_IN_MAINTENANCE(ErrorType.CONFLICT),
     
ERROR_CANNOT_UPDATE_STORAGE_POOL_COMPATIBILITY_VERSION_BIGGER_THAN_CLUSTERS(ErrorType.INCOMPATIBLE_VERSION),
     
ERROR_CANNOT_ADD_EXISTING_STORAGE_DOMAIN_CONNECTION_DATA_ILLEGAL(ErrorType.BAD_PARAMETERS),
-    ERROR_CANNOT_REMOVE_STORAGE_DOMAIN_DO_FORMAT(ErrorType.BAD_PARAMETERS),
     ERROR_CANNOT_MANAGE_STORAGE_DOMAIN(ErrorType.NOT_SUPPORTED),
     ERROR_CANNOT_FIND_ISO_IMAGE_PATH(ErrorType.BAD_PARAMETERS),
     ERROR_CANNOT_FIND_FLOPPY_IMAGE_PATH(ErrorType.BAD_PARAMETERS),
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 a68ea3c..bc3f67a 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -490,8 +490,6 @@
 ACTION_TYPE_FAILED_LUNS_ALREADY_PART_OF_STORAGE_DOMAINS=Cannot ${action} 
${type}. The following LUNs are already part of existing storage domains: 
${lunIds}.
 ACTION_TYPE_FAILED_LUNS_ALREADY_USED_BY_DISKS=Cannot ${action} ${type}. The 
following LUNs are already used by DirectLUN disks: ${lunIds}.
 ERROR_CANNOT_REMOVE_STORAGE_POOL_WITH_NONMASTER_DOMAINS=Cannot remove Data 
Center while there are more than one Storage Domain attached.
-ERROR_CANNOT_REMOVE_STORAGE_DOMAIN_DO_FORMAT=Cannot remove Storage Domain. 
Data storage must be formatted after remove.\n\
-       -Please verify that Format option is enabled on the Data Domain.
 ERROR_CANNOT_MANAGE_STORAGE_DOMAIN=Cannot manage Storage Domain. The domain is 
defined externally (such as through a provider).
 ERROR_CANNOT_FORCE_REMOVE_STORAGE_POOL_WITH_VDS_NOT_IN_MAINTENANCE=Cannot 
${action} ${type} while there are Hosts that are not in Maintenance mode.
 ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL=Cannot ${action} ${type}. 
Unknown Data Center status.
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 5d6c3bb..61830d8 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
@@ -1357,9 +1357,6 @@
     @DefaultStringValue("Cannot remove Data Center while there are more than 
one Storage Domains attached.")
     String ERROR_CANNOT_REMOVE_STORAGE_POOL_WITH_NONMASTER_DOMAINS();
 
-    @DefaultStringValue("Cannot remove Storage Domain. Data storage must be 
formatted after remove.\n-Please verify that Format option is enabled on the 
Data Domain.")
-    String ERROR_CANNOT_REMOVE_STORAGE_DOMAIN_DO_FORMAT();
-
     @DefaultStringValue("Cannot manage Storage Domain. The domain is defined 
externally (e.g. through a provider).")
     String ERROR_CANNOT_MANAGE_STORAGE_DOMAIN();
 
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 315735c..0ffbc22 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
@@ -449,8 +449,6 @@
 ACTION_TYPE_FAILED_LUNS_ALREADY_PART_OF_STORAGE_DOMAINS=Cannot ${action} 
${type}. The following LUNs are already part of existing storage domains: 
${lunIds}.
 ACTION_TYPE_FAILED_LUNS_ALREADY_USED_BY_DISKS=Cannot ${action} ${type}. The 
following LUNs are already used by DirectLUN disks: ${lunIds}.
 ERROR_CANNOT_REMOVE_STORAGE_POOL_WITH_NONMASTER_DOMAINS=Cannot remove Data 
Center when there are more than one Storage Domain attached.
-ERROR_CANNOT_REMOVE_STORAGE_DOMAIN_DO_FORMAT=Cannot remove Storage Domain. 
Data storage must be formatted after remove.\n\
-       -Please verify that Format option is enabled on the Data Domain.
 ERROR_CANNOT_MANAGE_STORAGE_DOMAIN=Cannot manage Storage Domain. The domain is 
defined externally (such as through a provider).
 ERROR_CANNOT_FORCE_REMOVE_STORAGE_POOL_WITH_VDS_NOT_IN_MAINTENANCE=Cannot 
${action} ${type} while there are Hosts that are not in Maintenance mode.
 ACTION_TYPE_FAILED_STORAGE_POOL_STATUS_ILLEGAL=Cannot ${action} ${type}. 
Unknown Data Center status.


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4392de431f6523e3824bbddd9d79aa4b1eb0819c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to