Shubhendu Tripathi has uploaded a new change for review.

Change subject: gluster: BLL command to set volume snapshot config
......................................................................

gluster: BLL command to set volume snapshot config

Introduced BLL command to set the volume snapshot configurations

Change-Id: I37b6f4dd02ca4258e5e40e7da11f0a657ac6b330
Signed-off-by: Shubhendu Tripathi <[email protected]>
---
A 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/UpdateGlusterVolumeSnapshotConfigCommand.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
A 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/UpdateGlusterVolumeSnapshotConfigParameters.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 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
M 
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
M 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
11 files changed, 281 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/51/39351/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/UpdateGlusterVolumeSnapshotConfigCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/UpdateGlusterVolumeSnapshotConfigCommand.java
new file mode 100644
index 0000000..d68460b
--- /dev/null
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/UpdateGlusterVolumeSnapshotConfigCommand.java
@@ -0,0 +1,188 @@
+package org.ovirt.engine.core.bll.gluster;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
+import org.ovirt.engine.core.bll.LockMessagesMatchUtil;
+import org.ovirt.engine.core.common.AuditLogType;
+import org.ovirt.engine.core.common.action.LockProperties;
+import org.ovirt.engine.core.common.action.LockProperties.Scope;
+import 
org.ovirt.engine.core.common.action.gluster.UpdateGlusterVolumeSnapshotConfigParameters;
+import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotConfig;
+import org.ovirt.engine.core.common.errors.VdcBllMessages;
+import org.ovirt.engine.core.common.gluster.GlusterFeatureSupported;
+import org.ovirt.engine.core.common.locks.LockingGroup;
+import org.ovirt.engine.core.common.utils.Pair;
+import org.ovirt.engine.core.common.vdscommands.VDSCommandType;
+import org.ovirt.engine.core.common.vdscommands.VDSReturnValue;
+import 
org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeSnapshotSetConfigVDSParameters;
+import org.ovirt.engine.core.compat.Guid;
+import org.ovirt.engine.core.dal.dbbroker.DbFacade;
+import org.ovirt.engine.core.dao.gluster.GlusterVolumeSnapshotConfigDao;
+
+public class UpdateGlusterVolumeSnapshotConfigCommand extends 
GlusterCommandBase<UpdateGlusterVolumeSnapshotConfigParameters> {
+
+    private boolean updatesSuccessful;
+    private List<String> failedCfgs;
+
+    public 
UpdateGlusterVolumeSnapshotConfigCommand(UpdateGlusterVolumeSnapshotConfigParameters
 params) {
+        super(params);
+        setVdsGroupId(params.getClusterId());
+        failedCfgs = new ArrayList<>();
+    }
+
+    @Override
+    protected LockProperties applyLockProperties(LockProperties 
lockProperties) {
+        return lockProperties.withScope(Scope.Execution);
+    }
+
+    @Override
+    protected void setActionMessageParameters() {
+        
addCanDoActionMessage(VdcBllMessages.VAR__ACTION__VOLUME_SNAPSHOT_CONFIG_UPDATE);
+    }
+
+    @Override
+    protected boolean canDoAction() {
+        if (!super.canDoAction()) {
+            return false;
+        }
+
+        if (getParameters().getClusterId() == null) {
+            
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID);
+            return false;
+        }
+
+        if 
(!GlusterFeatureSupported.glusterSnapshot(getVdsGroup().getcompatibility_version()))
 {
+            
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VOLUME_SNAPSHOT_NOT_SUPPORTED);
+        }
+
+        if (getParameters().getConfigParams() == null) {
+            
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_CONFIG_PARAMS_IS_EMPTY);
+            return false;
+        }
+
+        for (GlusterVolumeSnapshotConfig param : 
getParameters().getConfigParams()) {
+            if (StringUtils.isEmpty(param.getParamValue())) {
+                addCustomValue("snapshotConfigParam", param.getParamName());
+                
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_CONFIG_PARAM_VALUE_IS_EMPTY);
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    @Override
+    protected void executeCommand() {
+        Guid clusterId = getParameters().getClusterId();
+        Guid volumeId = getParameters().getVolumeId();
+        List<GlusterVolumeSnapshotConfig> fetchedConfigParams =
+                
getGlusterVolumeSnapshotConfigDao().getConfigByClusterId(clusterId);
+
+        // segregate the fetched cluster and volume specific config params
+        Map<String, GlusterVolumeSnapshotConfig> fetchedClusterConfigParams = 
new HashMap<>();
+        Map<String, GlusterVolumeSnapshotConfig> fetchedVolumeConfigParams = 
new HashMap<>();
+        for (GlusterVolumeSnapshotConfig param : fetchedConfigParams) {
+            if (Guid.isNullOrEmpty(param.getVolumeId())) {
+                fetchedClusterConfigParams.put(param.getParamName(), param);
+            } else if (volumeId != null && 
param.getVolumeId().equals(volumeId)) {
+                fetchedVolumeConfigParams.put(param.getParamName(), param);
+            }
+        }
+
+        List<GlusterVolumeSnapshotConfig> configParams = 
getParameters().getConfigParams();
+
+        // segregate the cluster and volume specific config params
+        Map<String, GlusterVolumeSnapshotConfig> clusterConfigParams = new 
HashMap<>();
+        Map<String, GlusterVolumeSnapshotConfig> volumeConfigParams = new 
HashMap<>();
+        for (GlusterVolumeSnapshotConfig param : configParams) {
+            if (Guid.isNullOrEmpty(param.getVolumeId())) {
+                clusterConfigParams.put(param.getParamName(), param);
+            } else {
+                volumeConfigParams.put(param.getParamName(), param);
+            }
+        }
+
+        // form the final list of updated config params
+        List<GlusterVolumeSnapshotConfig> updatedClusterConfigParams = new 
ArrayList<>();
+        for (GlusterVolumeSnapshotConfig cfgParam : 
clusterConfigParams.values()) {
+            GlusterVolumeSnapshotConfig fetchedCfgParam = 
fetchedClusterConfigParams.get(cfgParam.getParamName());
+            if (fetchedCfgParam != null && 
!(fetchedCfgParam.getParamValue().equals(cfgParam.getParamValue()))) {
+                updatedClusterConfigParams.add(cfgParam);
+            }
+        }
+        List<GlusterVolumeSnapshotConfig> updatedVolumeConfigParams = new 
ArrayList<>();
+        for (GlusterVolumeSnapshotConfig cfgParam : 
volumeConfigParams.values()) {
+            GlusterVolumeSnapshotConfig fetchedCfgParam = 
fetchedVolumeConfigParams.get(cfgParam.getParamName());
+            if (fetchedCfgParam != null && 
!(fetchedCfgParam.getParamValue().equals(cfgParam.getParamValue()))) {
+                updatedVolumeConfigParams.add(cfgParam);
+            }
+        }
+
+        List<GlusterVolumeSnapshotConfig> updatedConfigs = new ArrayList<>();
+        for (GlusterVolumeSnapshotConfig param : updatedClusterConfigParams)
+            updatedConfigs.add(param);
+        for (GlusterVolumeSnapshotConfig param : updatedVolumeConfigParams)
+            updatedConfigs.add(param);
+
+        for (GlusterVolumeSnapshotConfig config : updatedConfigs) {
+            VDSReturnValue retVal = 
runVdsCommand(VDSCommandType.SetGlusterVolumeSnapshotConfig,
+                    new 
GlusterVolumeSnapshotSetConfigVDSParameters(upServer.getId(), config));
+
+            if (!retVal.getSucceeded()) {
+                failedCfgs.add(config.getParamName());
+                updatesSuccessful = false;
+            } else {
+                if (config.getVolumeId() != null) {
+                    
getGlusterVolumeSnapshotConfigDao().updateConfigByVolumeIdAndName(config.getClusterId(),
+                            config.getVolumeId(),
+                            config.getParamName(),
+                            config.getParamValue());
+                } else {
+                    
getGlusterVolumeSnapshotConfigDao().updateConfigByClusterIdAndName(config.getClusterId(),
+                            config.getParamName(),
+                            config.getParamValue());
+                }
+                updatesSuccessful = true;
+            }
+        }
+
+        if (!updatesSuccessful) {
+            addCustomValue("failedSnapshotConfigs", failedCfgs.toString());
+        }
+
+        setSucceeded(true);
+    }
+
+    protected GlusterVolumeSnapshotConfigDao 
getGlusterVolumeSnapshotConfigDao() {
+        return DbFacade.getInstance().getGlusterVolumeSnapshotConfigDao();
+    }
+
+    @Override
+    protected Map<String, Pair<String, String>> getExclusiveLocks() {
+        Guid clusterId = 
getParameters().getConfigParams().get(0).getClusterId();
+        if (!isInternalExecution()) {
+            return Collections.singletonMap(clusterId.toString(),
+                    
LockMessagesMatchUtil.makeLockingPair(LockingGroup.GLUSTER_SNAPSHOT,
+                            VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED));
+        }
+        return null;
+    }
+
+    @Override
+    public AuditLogType getAuditLogTypeValue() {
+        if (getSucceeded()) {
+            if (updatesSuccessful) {
+                return AuditLogType.GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATED;
+            } else {
+                return 
AuditLogType.GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATE_FAILED_PARTIALLY;
+            }
+        } else {
+            return errorType == null ? 
AuditLogType.GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATE_FAILED : errorType;
+        }
+    }
+}
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
index 4116c7a..000c502 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
@@ -392,7 +392,9 @@
     GLUSTER_VOLUME_SNAPSHOT_DEACTIVATE_FAILED(4118, AuditLogSeverity.ERROR),
     GLUSTER_VOLUME_SNAPSHOT_RESTORED(4119),
     GLUSTER_VOLUME_SNAPSHOT_RESTORE_FAILED(4120, AuditLogSeverity.ERROR),
-
+    GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATED(4121),
+    GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATE_FAILED(4122, AuditLogSeverity.ERROR),
+    GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATE_FAILED_PARTIALLY(4123, 
AuditLogSeverity.ERROR),
     USER_FORCE_SELECTED_SPM(159),
     USER_VDS_RESTART(41),
     USER_FAILED_VDS_RESTART(107, AuditLogSeverity.ERROR),
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
index 40e43c4..7748ba5 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
@@ -309,6 +309,7 @@
     ActivateGlusterVolumeSnapshot(1436, ActionGroup.MANIPULATE_GLUSTER_VOLUME, 
QuotaDependency.NONE),
     DeactivateGlusterVolumeSnapshot(1437, 
ActionGroup.MANIPULATE_GLUSTER_VOLUME, QuotaDependency.NONE),
     RestoreGlusterVolumeSnapshot(1438, ActionGroup.MANIPULATE_GLUSTER_VOLUME, 
QuotaDependency.NONE),
+    UpdateGlusterVolumeSnapshotConfig(1439, 
ActionGroup.MANIPULATE_GLUSTER_VOLUME, QuotaDependency.NONE),
 
     // Cluster Policy
     AddClusterPolicy(1450, ActionGroup.EDIT_STORAGE_POOL_CONFIGURATION, false, 
QuotaDependency.NONE),
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/UpdateGlusterVolumeSnapshotConfigParameters.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/UpdateGlusterVolumeSnapshotConfigParameters.java
new file mode 100644
index 0000000..9d17871
--- /dev/null
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/UpdateGlusterVolumeSnapshotConfigParameters.java
@@ -0,0 +1,51 @@
+package org.ovirt.engine.core.common.action.gluster;
+
+import java.util.List;
+
+import org.ovirt.engine.core.common.action.VdcActionParametersBase;
+import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotConfig;
+import org.ovirt.engine.core.compat.Guid;
+
+public class UpdateGlusterVolumeSnapshotConfigParameters extends 
VdcActionParametersBase {
+    private static final long serialVersionUID = 2015321730118872977L;
+
+    private Guid clusterId;
+    // Nullable, so not extending the class from GlusterVolumeParameters
+    private Guid volumeId;
+    private List<GlusterVolumeSnapshotConfig> configParams;
+
+    public UpdateGlusterVolumeSnapshotConfigParameters() {
+    }
+
+    public UpdateGlusterVolumeSnapshotConfigParameters(Guid clusterId,
+            Guid volumeId,
+            List<GlusterVolumeSnapshotConfig> params) {
+        this.clusterId = clusterId;
+        this.volumeId = volumeId;
+        this.configParams = params;
+    }
+
+    public Guid getClusterId() {
+        return this.clusterId;
+    }
+
+    public void setClusterId(Guid id) {
+        this.clusterId = id;
+    }
+
+    public Guid getVolumeId() {
+        return this.volumeId;
+    }
+
+    public void setVolumeId(Guid id) {
+        this.volumeId = id;
+    }
+
+    public List<GlusterVolumeSnapshotConfig> getConfigParams() {
+        return this.configParams;
+    }
+
+    public void setConfigParams(List<GlusterVolumeSnapshotConfig> params) {
+        this.configParams = params;
+    }
+}
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 37e2e1c..1c5ea03 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
@@ -109,6 +109,7 @@
     VAR__ACTION__HOT_SET_CPUS,
     VAR__ACTION__UPDATE_SLA_POLICY,
     VAR__ACTION__UPDATE_VM_VERSION,
+    VAR__ACTION__VOLUME_SNAPSHOT_CONFIG_UPDATE,
 
     // Host statuses replacements
     VAR__HOST_STATUS__UP,
@@ -893,6 +894,9 @@
     
ACTION_TYPE_FAILED_GLUSTER_VOLUME_CANNOT_STOP_REBALANCE_IN_PROGRESS(ErrorType.CONFLICT),
     
ACTION_TYPE_FAILED_GLUSTER_VOLUME_CANNOT_STOP_REMOVE_BRICK_IN_PROGRESS(ErrorType.CONFLICT),
     ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN(ErrorType.CONFLICT),
+    
ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_NOT_THINLY_PROVISIONED(ErrorType.CONFLICT),
+    
ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_CONFIG_PARAMS_IS_EMPTY(ErrorType.BAD_PARAMETERS),
+    
ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_CONFIG_PARAM_VALUE_IS_EMPTY(ErrorType.BAD_PARAMETERS),
     ACTION_TYPE_FAILED_NOT_A_GLUSTER_VOLUME_BRICK(ErrorType.BAD_PARAMETERS),
     
ACTION_TYPE_FAILED_GLUSTER_VOLUME_REMOVE_BRICKS_NOT_STARTED(ErrorType.CONFLICT),
     
ACTION_TYPE_FAILED_GLUSTER_VOLUME_REMOVE_BRICKS_NOT_FINISHED(ErrorType.CONFLICT),
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 612ff58..cde571c 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -375,6 +375,7 @@
 VAR__ACTION__FORCE_SELECT=$action force select
 VAR__ACTION__EXTEND_IMAGE_SIZE=$action extend
 VAR__ACTION__UPDATE_VM_VERSION=$action update version for
+VAR__ACTION__VOLUME_SNAPSHOT_CONFIG_UPDATE="$action gluster volume snapshot 
config update"
 VAR__HOST_STATUS__UP=$hostStatus Up
 VAR__HOST_STATUS__UP_MAINTENANCE_OR_NON_OPERATIONAL=$hostStatus Up, 
Maintenance or Non operational
 
@@ -1077,6 +1078,9 @@
 VMPAYLOAD_CDROM_WITH_CLOUD_INIT=Payload cdrom deivce cannot be used with 
Cloud-Init via cdrom device.
 ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_UP=Cannot ${action} ${type}. Gluster 
volume ${volumeName} is up.
 ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN=Cannot ${action} ${type}. Gluster 
Volume is down.
+ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_NOT_THINLY_PROVISIONED="Cannot ${action} 
${type}. Gluster volume is not thinly provisioned."
+ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_CONFIG_PARAMS_IS_EMPTY="Cannot 
${action} ${type}. No gluster volume snapshot parameters for update."
+ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_CONFIG_PARAM_VALUE_IS_EMPTY="Cannot 
${action} ${type}. The value of gluster volume snapshot parameter 
${snapshotConfigParam} is empty."
 ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME=Cannot ${action} 
${type}. Cannot remove all the bricks from a Volume.
 ACTION_TYPE_FAILED_GLUSTER_VOLUME_SHOULD_BE_STARTED=Cannot ${action} ${type}. 
Gluster Volume should be started.
 ACTION_TYPE_FAILED_GLUSTER_VOLUME_NOT_DISTRIBUTED=Cannot ${action} ${type}. 
Gluster Volume is not distributed.
diff --git 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
index 793b5a0..be63ced 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
@@ -814,7 +814,9 @@
 GLUSTER_VOLUME_SNAPSHOT_DEACTIVATE_FAILED=Failed to de-activate gluster volume 
snapshot ${snapname} on volume ${glusterVolumeName}.
 GLUSTER_VOLUME_SNAPSHOT_RESTORED=Restored the volume ${glusterVolumeName} to 
the state of gluster volume snapshot ${snapname}.
 GLUSTER_VOLUME_SNAPSHOT_RESTORE_FAILED=Failed to restore the volume 
${glusterVolumeName} to the state of gluster volume snapshot ${snapname}.
-
+GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATED=Updated Gluster volume snapshot 
configuration(s).
+GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATE_FAILED=Failed to update gluster volume 
snapshot configuration(s).
+GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATE_FAILED_PARTIALLY=Failed to update 
gluster volume snapshot configuration(s) ${failedSnapshotConfigs}.
 VDS_UNTRUSTED=Host ${VdsName} was set to non-operational. Host is not trusted 
by the attestation service.
 USER_ADDED_NETWORK_QOS=Network QoS ${QosName} was added. (User: ${UserName})
 USER_FAILED_TO_ADD_NETWORK_QOS=Failed to add Network QoS ${QosName}. (User: 
${UserName})
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 ac51e49..21b12db 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
@@ -1036,6 +1036,9 @@
     @DefaultStringValue("$action update version for")
     String VAR__ACTION__UPDATE_VM_VERSION();
 
+    @DefaultStringValue("$action gluster volume snapshot config update")
+    String VAR__ACTION__VOLUME_SNAPSHOT_CONFIG_UPDATE();
+
     @DefaultStringValue("$hostStatus Up")
     String VAR__HOST_STATUS__UP();
 
@@ -2868,6 +2871,15 @@
     @DefaultStringValue("Cannot ${action} ${type}. Gluster Volume is down.")
     String ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN();
 
+    @DefaultStringValue("Cannot ${action} ${type}. Gluster volume is not 
thinly provisioned.")
+    String ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_NOT_THINLY_PROVISIONED();
+
+    @DefaultStringValue("Cannot ${action} ${type}. No gluster volume snapshot 
parameters for update.")
+    String ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_CONFIG_PARAMS_IS_EMPTY();
+
+    @DefaultStringValue("Cannot ${action} ${type}. The value of gluster volume 
snapshot parameter ${snapshotConfigParam} is empty.")
+    String 
ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_CONFIG_PARAM_VALUE_IS_EMPTY();
+
     @DefaultStringValue("Cannot ${action} ${type}. Cannot remove all the 
bricks from a Volume.")
     String ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME();
 
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
index 53f5a79..7209b61 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
@@ -1,6 +1,7 @@
 package org.ovirt.engine.ui.uicompat;
 
 import org.ovirt.engine.core.common.businessentities.NumaTuneMode;
+import org.ovirt.engine.core.common.AuditLogSeverity;
 
 import com.google.gwt.i18n.client.ConstantsWithLookup;
 
@@ -449,6 +450,12 @@
 
     String AuditLogType___GLUSTER_VOLUME_SNAPSHOT_RESTORE_FAILED();
 
+    String AuditLogType___GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATED();
+
+    String AuditLogType___GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATE_FAILED();
+
+    String 
AuditLogType___GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATE_FAILED_PARTIALLY();
+
     String VdcActionType___ActivateVds();
 
     String VdcActionType___RecoveryStoragePool();
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
index c7dfb99..4932c21 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
+++ 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
@@ -222,6 +222,9 @@
 AuditLogType___GLUSTER_VOLUME_SNAPSHOT_DEACTIVATE_FAILED=Failed to de-activate 
snapshot on the volume
 AuditLogType___GLUSTER_VOLUME_SNAPSHOT_RESTORED=Snapshot restore on the volume
 AuditLogType___GLUSTER_VOLUME_SNAPSHOT_RESTORE_FAILED=Failed to restore 
snapshot on the volume
+AuditLogType___GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATED=Gluster volume snapshot 
configuration updated
+AuditLogType___GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATE_FAILED=Failed to update 
gluster volume snapshot configuration
+AuditLogType___GLUSTER_VOLUME_SNAPSHOT_CONFIG_UPDATE_FAILED_PARTIALLY=Failed 
to update some gluster volume snapshot configuration
 
 VdcActionType___ActivateVds=Activate Host
 VdcActionType___RecoveryStoragePool=Reinitialize Data Center
@@ -356,6 +359,7 @@
 VdcActionType___ActivateGlusterVolumeSnapshot=Activate volume snapshot
 VdcActionType___DeactivateGlusterVolumeSnapshot=Deactivate volume snapshot
 VdcActionType___RestoreGlusterVolumeSnapshot=Restore volume snapshot
+VdcActionType___UpdateGlusterVolumeSnapshotConfigCommand=Update Gluster volume 
snapshot configuration
 VdcActionType___ActivateStorageDomain=Activate Storage Domain
 VdcActionType___FenceVdsManualy=Fence Host Manually
 VdcActionType___AddEmptyStoragePool=New Data Center
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 b25cca9..b1ac435 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
@@ -378,6 +378,7 @@
 VAR__ACTION__FORCE_SELECT=$action force select
 VAR__ACTION__EXTEND_IMAGE_SIZE=$action extend
 VAR__ACTION__UPDATE_VM_VERSION=$action update version for
+VAR__ACTION__VOLUME_SNAPSHOT_CONFIG_UPDATE="$action gluster volume snapshot 
config update"
 VAR__HOST_STATUS__UP=$hostStatus Up
 VAR__HOST_STATUS__UP_MAINTENANCE_OR_NON_OPERATIONAL=$hostStatus Up, 
Maintenance or Non operational
 
@@ -1063,6 +1064,9 @@
 ACTION_TYPE_FAILED_GLUSTER_VOLUME_ALREADY_STOPPED=Cannot ${action} ${type}. 
Gluster Volume ${volumeName} already stopped.
 ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_UP=Cannot ${action} ${type}. Gluster 
Volume ${volumeName} is up.
 ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_DOWN=Cannot ${action} ${type}. Gluster 
Volume is down.
+ACTION_TYPE_FAILED_GLUSTER_VOLUME_IS_NOT_THINLY_PROVISIONED="Cannot ${action} 
${type}. Gluster volume is not thinly provisioned."
+ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_CONFIG_PARAMS_IS_EMPTY="Cannot 
${action} ${type}. No gluster volume snapshot parameters for update."
+ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_CONFIG_PARAM_VALUE_IS_EMPTY="Cannot 
${action} ${type}. The value of gluster volume snapshot parameter 
${snapshotConfigParam} is empty."
 ACTION_TYPE_FAILED_CAN_NOT_REMOVE_ALL_BRICKS_FROM_VOLUME=Cannot ${action} 
${type}. Cannot remove all the bricks from a Volume.
 ACTION_TYPE_FAILED_GLUSTER_VOLUME_SHOULD_BE_STARTED=Cannot ${action} ${type}. 
Gluster Volume should be started.
 ACTION_TYPE_FAILED_GLUSTER_VOLUME_NOT_DISTRIBUTED=Cannot ${action} ${type}. 
Gluster Volume is not distributed.


-- 
To view, visit https://gerrit.ovirt.org/39351
To unsubscribe, visit https://gerrit.ovirt.org/settings

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

Reply via email to