Gustavo Frederico Temple Pedrosa has uploaded a new change for review.

Change subject: core: [Fix] Add host hotplug support checks
......................................................................

core: [Fix] Add host hotplug support checks

It is necessary to check the host (and OS) hotplug support of
vnic, disk and disk snapshot.

Change-Id: I8e4c8409c0de4ff1c959d27b54e793a31654326c
Signed-off-by: Gustavo Pedrosa <gustavo.pedr...@eldorado.org.br>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AttachDiskToVmCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/VmInterfaceManager.java
M 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommandTest.java
M 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/VmInterfaceManagerTest.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllMessages.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.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
M 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
17 files changed, 123 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/66/21266/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java
index 98f46d4..e51d0de 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java
@@ -13,6 +13,7 @@
 import org.ovirt.engine.core.bll.validator.DiskValidator;
 import org.ovirt.engine.core.bll.validator.LocalizedVmStatus;
 import org.ovirt.engine.core.bll.validator.VmValidator;
+import org.ovirt.engine.core.common.FeatureSupported;
 import org.ovirt.engine.core.common.action.VmDiskOperationParameterBase;
 import org.ovirt.engine.core.common.businessentities.Disk;
 import org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType;
@@ -215,6 +216,23 @@
         return false;
     }
 
+    @Override
+    protected boolean isHotPlugSupported() {
+        if (getParameters().getSnapshotId() == null) {
+            return super.isHotPlugSupported();
+        }
+
+        return isHotPlugDiskSnapshotSupported();
+    }
+
+    protected boolean isHotPlugDiskSnapshotSupported() {
+        if 
(!FeatureSupported.hotPlugDiskSnapshot(getVds().getVdsGroupCompatibilityVersion()))
 {
+            return 
failCanDoAction(VdcBllMessages.HOT_PLUG_DISK_SNAPSHOT_IS_NOT_SUPPORTED);
+        }
+
+        return true;
+    }
+
     protected ImageDao getImageDao() {
         return getDbFacade().getImageDao();
     }
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AttachDiskToVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AttachDiskToVmCommand.java
index faf7f9c..a6e5c8f 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AttachDiskToVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AttachDiskToVmCommand.java
@@ -132,7 +132,8 @@
 
         if (getParameters().isPlugUnPlug()
                 && getVm().getStatus() != VMStatus.Down) {
-            return isInterfaceSupportedForPlugUnPlug(disk);
+            return isOsSupportingHotPlug() && isHotPlugSupported()
+                    && isInterfaceSupportedForPlugUnPlug(disk);
         }
         return true;
     }
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java
index f73d42f..82356cd 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java
@@ -54,7 +54,8 @@
         if (vmDevice.getIsPlugged()) {
             if (retValue && Boolean.TRUE.equals(getParameters().isPlugUnPlug())
                     && getVm().getStatus() != VMStatus.Down) {
-                retValue = isInterfaceSupportedForPlugUnPlug(disk);
+                retValue = isHotPlugSupported() && isOsSupportingHotPlug()
+                        && isInterfaceSupportedForPlugUnPlug(disk);
             }
 
             if (retValue && 
Boolean.FALSE.equals(getParameters().isPlugUnPlug())
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
index 1d41751..4ede05b 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommand.java
@@ -92,7 +92,7 @@
     private boolean checkCanPerformPlugUnPlugDisk() {
         if (getVm().getStatus().isUpOrPaused()) {
             setVdsId(getVm().getRunOnVds());
-            if (!isInterfaceSupportedForPlugUnPlug(disk)) {
+            if (!canPerformDiskHotPlug() || 
!isInterfaceSupportedForPlugUnPlug(disk)) {
                 return false;
             }
         }
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
index a5dca79..f7edd2c 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
@@ -387,10 +387,43 @@
         }
     }
 
+    protected boolean canPerformDiskHotPlug() {
+        return isHotPlugSupported() && isOsSupportingHotPlug();
+    }
+
     protected boolean canPerformNicHotPlug() {
         return osRepository.hasNicHotplugSupport(getVm().getOs(), 
getVm().getVdsGroupCompatibilityVersion());
     }
 
+    /**
+     * check that hotplug is enabled via the 3.1 config paramter {@literal 
ConfigValues.HotPlugEnabled,
+     * @return
+     */
+    protected boolean isHotPlugSupported() {
+        if (Config.<Boolean> GetValue(ConfigValues.HotPlugEnabled, 
getVds().getVdsGroupCompatibilityVersion()
+                .getValue())) {
+            return true;
+        }
+        addCanDoActionMessage(VdcBllMessages.HOT_PLUG_IS_NOT_SUPPORTED);
+        return false;
+    }
+
+    /**
+     * The following method should check if os of guest is supported for hot 
plug/unplug operation
+     * @return
+     */
+    protected boolean isOsSupportingHotPlug() {
+        int vmOs = getVm().getOs();
+        String[] unsupportedOSs = Config.<String> 
GetValue(ConfigValues.HotPlugUnsupportedOsList).split(",");
+        for (String os : unsupportedOSs) {
+            if (os.equalsIgnoreCase(osRepository.getOsName(vmOs))) {
+                
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GUEST_OS_VERSION_IS_NOT_SUPPORTED);
+                return false;
+            }
+        }
+        return true;
+    }
+
     protected VmDeviceDAO getVmDeviceDao() {
         return getDbFacade().getVmDeviceDao();
     }
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/VmInterfaceManager.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/VmInterfaceManager.java
index 3b70df4..d10f2c8 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/VmInterfaceManager.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/VmInterfaceManager.java
@@ -7,6 +7,7 @@
 
 import org.ovirt.engine.core.bll.context.CompensationContext;
 import org.ovirt.engine.core.common.AuditLogType;
+import org.ovirt.engine.core.common.FeatureSupported;
 import org.ovirt.engine.core.common.businessentities.VM;
 import 
org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface;
 import org.ovirt.engine.core.common.businessentities.network.VmNic;
@@ -57,7 +58,8 @@
 
         if (allocateMac) {
             iface.setMacAddress(getMacPoolManager().allocateNewMac());
-        } else if (getOsRepository().hasNicHotplugSupport(osId, 
clusterCompatibilityVersion)) {
+        } else if (FeatureSupported.hotPlug(clusterCompatibilityVersion)
+                && getOsRepository().hasNicHotplugSupport(osId, 
clusterCompatibilityVersion)) {
             getMacPoolManager().forceAddMac(iface.getMacAddress());
         } else if (!getMacPoolManager().addMac(iface.getMacAddress())) {
             auditLogMacInUse(iface);
diff --git 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommandTest.java
 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommandTest.java
index d4fa701..51f30f3 100644
--- 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommandTest.java
+++ 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/HotPlugDiskToVmCommandTest.java
@@ -8,7 +8,10 @@
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
+import static org.ovirt.engine.core.utils.MockConfigRule.mockConfig;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -19,6 +22,7 @@
 import java.util.Map;
 
 import org.junit.Before;
+import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
@@ -39,6 +43,7 @@
 import org.ovirt.engine.core.common.businessentities.VMStatus;
 import org.ovirt.engine.core.common.businessentities.VmDevice;
 import org.ovirt.engine.core.common.businessentities.VmDeviceId;
+import org.ovirt.engine.core.common.config.ConfigValues;
 import org.ovirt.engine.core.common.errors.VdcBllMessages;
 import org.ovirt.engine.core.common.osinfo.OsRepository;
 import org.ovirt.engine.core.common.utils.SimpleDependecyInjector;
@@ -50,6 +55,7 @@
 import org.ovirt.engine.core.dao.VmDAO;
 import org.ovirt.engine.core.dao.VmDeviceDAO;
 import org.ovirt.engine.core.dao.network.VmNetworkInterfaceDao;
+import org.ovirt.engine.core.utils.MockConfigRule;
 
 @RunWith(MockitoJUnitRunner.class)
 public class HotPlugDiskToVmCommandTest {
@@ -59,6 +65,12 @@
     private final Guid storagePoolId = Guid.newGuid();
     private final Guid storageDomainId = Guid.newGuid();
     protected static final List<String> DISK_HOTPLUGGABLE_INTERFACES = 
Arrays.asList("VirtIO_SCSI", "VirtIO");
+
+    @ClassRule
+    public static final MockConfigRule mcr = new MockConfigRule(
+            mockConfig(ConfigValues.HotPlugUnsupportedOsList, "RHEL3x64"),
+            mockConfig(ConfigValues.HotPlugEnabled, "3.1", true),
+            mockConfig(ConfigValues.HotPlugDiskSnapshotSupported, "3.1", 
true));
 
     @Mock
     private VmDAO vmDAO;
@@ -72,6 +84,7 @@
     private StorageDomainDAO storageDomainDao;
     @Mock
     private VmNetworkInterfaceDao vmNetworkInterfaceDao;
+
     @Mock
     OsRepository osRepository;
 
@@ -151,6 +164,16 @@
     }
 
     @Test
+    public void canDoActionChecksIfHotPlugDiskSnapshotIsSupported() throws 
Exception {
+        mockVmStatusUp();
+        cretaeVirtIODisk();
+        initStorageDomain();
+        command.getParameters().setSnapshotId(Guid.newGuid());
+        command.canDoAction();
+        verify(command, times(1)).isHotPlugDiskSnapshotSupported();
+    }
+
+    @Test
     public void canDoActionFailedWrongPlugStatus() throws Exception {
         mockVmStatusUp();
         cretaeDiskWrongPlug(true);
diff --git 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/VmInterfaceManagerTest.java
 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/VmInterfaceManagerTest.java
index 63e645e..95626e4 100644
--- 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/VmInterfaceManagerTest.java
+++ 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/VmInterfaceManagerTest.java
@@ -10,12 +10,14 @@
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
+import static org.ovirt.engine.core.utils.MockConfigRule.mockConfig;
 
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
 import org.junit.Before;
+import org.junit.ClassRule;
 import org.junit.Test;
 import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
@@ -27,6 +29,7 @@
 import org.ovirt.engine.core.common.businessentities.network.Network;
 import 
org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface;
 import org.ovirt.engine.core.common.businessentities.network.VmNic;
+import org.ovirt.engine.core.common.config.ConfigValues;
 import org.ovirt.engine.core.common.osinfo.OsRepository;
 import org.ovirt.engine.core.compat.Guid;
 import org.ovirt.engine.core.compat.Version;
@@ -35,6 +38,7 @@
 import org.ovirt.engine.core.dao.network.VmNetworkInterfaceDao;
 import org.ovirt.engine.core.dao.network.VmNetworkStatisticsDao;
 import org.ovirt.engine.core.dao.network.VmNicDao;
+import org.ovirt.engine.core.utils.MockConfigRule;
 import org.ovirt.engine.core.utils.RandomUtils;
 
 public class VmInterfaceManagerTest {
@@ -44,6 +48,10 @@
     private final static Version VERSION_3_2 = new Version(3, 2);
     private final static int OS_ID = 0;
 
+    @ClassRule
+    public static MockConfigRule mcr = new MockConfigRule(
+            mockConfig(ConfigValues.HotPlugEnabled, VERSION_3_2.getValue(), 
true));
+
     @Mock
     private MacPoolManager macPoolManager;
 
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java
index 2a58e47..cd779c7 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java
@@ -90,6 +90,15 @@
     /**
      * @param version
      *            Compatibility version to check for.
+     * @return <code>true</code> if hot plug is supported for the version, 
<code>false</code> if it's not.
+     */
+    public static boolean hotPlug(Version version) {
+        return supportedInConfig(ConfigValues.HotPlugEnabled, version);
+    }
+
+    /**
+     * @param version
+     *            Compatibility version to check for.
      * @return <code>true</code> if migration network is supported for the 
version, <code>false</code> if it's not.
      */
     public static boolean migrationNetwork(Version version) {
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
index 76b87a0..e2cd5ee 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
@@ -901,6 +901,15 @@
     @DefaultValueAttribute("OVIRT")
     OriginType,
 
+    @TypeConverterAttribute(Boolean.class)
+    @DefaultValueAttribute("false")
+    HotPlugEnabled,
+
+    @Reloadable
+    @TypeConverterAttribute(String.class)
+    @DefaultValueAttribute("")
+    HotPlugUnsupportedOsList,
+
     @Reloadable
     @TypeConverterAttribute(Boolean.class)
     @DefaultValueAttribute("false")
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 bb39690..4e19969 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
@@ -662,6 +662,7 @@
     MOVE_VM_CLUSTER_MISSING_NETWORK(ErrorType.CONFLICT),
     
ACTION_TYPE_FAILED_STORAGE_POOL_WITH_DEFAULT_VDS_GROUP_CANNOT_BE_LOCALFS(ErrorType.CONFLICT),
     DEFAULT_CLUSTER_CANNOT_BE_ON_LOCALFS(ErrorType.CONFLICT),
+    HOT_PLUG_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED),
     UNLINKING_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED),
     HOT_PLUG_DISK_SNAPSHOT_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED),
     NULL_NETWORK_IS_NOT_SUPPORTED(ErrorType.NOT_SUPPORTED),
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java
index a0614a6..a5307e1 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java
@@ -65,6 +65,7 @@
     OvfItemsCountPerUpdate,
     ProductRPMVersion(ConfigAuthType.User),
     RhevhLocalFSPath,
+    HotPlugEnabled(ConfigAuthType.User),
     NetworkLinkingSupported(ConfigAuthType.User),
     SupportBridgesReportByVDSM(ConfigAuthType.User),
     ManagementNetwork,
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 6e95f6e..a78c684 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -854,6 +854,8 @@
 USER_CANNOT_BE_ADDED_TO_VM=User cannot be added to VM
 USER_CANNOT_BE_ADDED_TO_VM_POOL=User cannot be added to VM-Pool
 ACTION_TYPE_FAILED_DETECTED_PINNED_VMS=Cannot ${action} ${type}. The following 
VMs are set to run specifically only on this Host: ${VmNames}.\nIn order to 
${action} ${type}, you need to remove the association between the VMs and the 
Host (Using Edit VM properties).
+HOT_PLUG_IS_NOT_SUPPORTED=Activate/Deactivate while VM is running, is only 
supported for Clusters of version 3.1 and above.
+HOT_PLUG_DISK_SNAPSHOT_IS_NOT_SUPPORTED=Cannot ${action} ${type}. 
Activation/Deactivation of Disk Snapshot is not supported for clusters of 
version ${clusterVersion}.
 UNLINKING_IS_NOT_SUPPORTED=Cannot ${action} ${type}. Link state is set to 
'Down' on the virtual machine's interface, this is not supported for clusters 
of version ${clusterVersion}.
 NULL_NETWORK_IS_NOT_SUPPORTED=Cannot ${action} ${type}. There is no network on 
the virtual machine's interface, this is not supported for clusters of version 
${clusterVersion}.
 ACTION_TYPE_FAILED_NETWORK_QOS_IS_NOT_SUPPORTED=Cannot ${action} ${type}. 
There is Network QoS on the profile, this is not supported for clusters of 
version ${clusterVersion}.
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 3f8b259..1e00030 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
@@ -2281,6 +2281,12 @@
     @DefaultStringValue("Cannot ${action} ${type}. The following VMs are set 
to run specifically only on this Host: ${VmNames}.\nIn order to ${action} 
${type}, you need to remove the association between the VMs and the Host (Using 
Edit VM properties).")
     String ACTION_TYPE_FAILED_DETECTED_PINNED_VMS();
 
+    @DefaultStringValue("Activate/Deactivate while VM is running, is only 
supported for Clusters of version 3.1 and above.")
+    String HOT_PLUG_IS_NOT_SUPPORTED();
+
+    @DefaultStringValue("Cannot ${action} ${type}. Activation/Deactivation of 
Disk Snapshot is not supported for clusters of version ${clusterVersion}.")
+    String HOT_PLUG_DISK_SNAPSHOT_IS_NOT_SUPPORTED();
+
     @DefaultStringValue("Cannot ${action} ${type}. Link state is set to 'Down' 
on the virtual machine's interface, this is not supported for clusters of 
version ${clusterVersion}.")
     String UNLINKING_IS_NOT_SUPPORTED();
 
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 7ac02db..c7d5bba 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
@@ -829,6 +829,8 @@
 USER_CANNOT_BE_ADDED_TO_VM=User cannot be added to VM
 USER_CANNOT_BE_ADDED_TO_VM_POOL=User cannot be added to VM-Pool
 ACTION_TYPE_FAILED_DETECTED_PINNED_VMS=Cannot ${action} ${type}. The following 
VMs are set to run specifically only on this Host: ${VmNames}.\nIn order to 
${action} ${type}, you need to remove the association between the VMs and the 
Host (Using Edit VM properties).
+HOT_PLUG_IS_NOT_SUPPORTED=Activate/Deactivate while VM is running, is only 
supported for Clusters of version 3.1 and above.
+HOT_PLUG_DISK_SNAPSHOT_IS_NOT_SUPPORTED=Cannot ${action} ${type}. 
Activation/Deactivation of Disk Snapshot is not supported for clusters of 
version ${clusterVersion}.
 UNLINKING_IS_NOT_SUPPORTED=Cannot ${action} ${type}. Link state is set to 
'Down' on the virtual machine's interface, this is not supported for clusters 
of version ${clusterVersion}.
 NULL_NETWORK_IS_NOT_SUPPORTED=Cannot ${action} ${type}. There is no network on 
the virtual machine's interface, this is not supported for clusters of version 
${clusterVersion}.
 ACTION_TYPE_FAILED_NETWORK_QOS_IS_NOT_SUPPORTED=Cannot ${action} ${type}. 
There is Network QoS on the profile, this is not supported for clusters of 
version ${clusterVersion}.
@@ -918,4 +920,4 @@
 SCHEDULING_HOST_FILTERED_REASON=The host ${hostName} did not satisfy 
${filterType} filter ${filterName}.
 VAR__FILTERTYPE__EXTERNAL=$filterType external
 VAR__FILTERTYPE__INTERNAL=$filterType internal
-POWER_MANAGEMENT_ACTION_ON_ENTITY_ALREADY_IN_PROGRESS=Cannot perform 
${action}. Another power management action is already in progress.
\ No newline at end of file
+POWER_MANAGEMENT_ACTION_ON_ENTITY_ALREADY_IN_PROGRESS=Cannot perform 
${action}. Another power management action is already in progress.
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 4edac87..4b19506 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
@@ -854,6 +854,8 @@
 USER_CANNOT_BE_ADDED_TO_VM=User cannot be added to VM
 USER_CANNOT_BE_ADDED_TO_VM_POOL=User cannot be added to VM-Pool
 ACTION_TYPE_FAILED_DETECTED_PINNED_VMS=Cannot ${action} ${type}. The following 
VMs are set to run specifically only on this Host: ${VmNames}.\nIn order to 
${action} ${type}, you need to remove the association between the VMs and the 
Host (Using Edit VM properties).
+HOT_PLUG_IS_NOT_SUPPORTED=Activate/Deactivate while VM is running, is only 
supported for Clusters of version 3.1 and above.
+HOT_PLUG_DISK_SNAPSHOT_IS_NOT_SUPPORTED=Cannot ${action} ${type}. 
Activation/Deactivation of Disk Snapshot is not supported for clusters of 
version ${clusterVersion}.
 UNLINKING_IS_NOT_SUPPORTED=Cannot ${action} ${type}. Link state is set to 
'Down' on the virtual machine's interface, this is not supported for clusters 
of version ${clusterVersion}.
 NULL_NETWORK_IS_NOT_SUPPORTED=Cannot ${action} ${type}. There is no network on 
the virtual machine's interface, this is not supported for clusters of version 
${clusterVersion}.
 ACTION_TYPE_FAILED_NETWORK_QOS_IS_NOT_SUPPORTED=Cannot ${action} ${type}. 
There is Network QoS on the profile, this is not supported for clusters of 
version ${clusterVersion}.
diff --git a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql 
b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
index 0f8ccf4..28038f0 100644
--- a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
+++ b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
@@ -810,7 +810,6 @@
 select fn_db_delete_config_value('ENMailUseDefaultCredentials','general');
 select fn_db_delete_config_value('ENMailUser','general');
 select fn_db_delete_config_value('FreeSpaceCriticalLow','general');
-select fn_db_delete_config_value('HotPlugEnabled','3.0,3.1,3.2,3.3');
 select fn_db_delete_config_value('HotPlugSupportedOsList','general');
 select fn_db_delete_config_value('ImagesSyncronizationTimeout','general');
 select fn_db_delete_config_value('keystorePass','general');


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e4c8409c0de4ff1c959d27b54e793a31654326c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gustavo Frederico Temple Pedrosa <gustavo.pedr...@eldorado.org.br>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to