Maor Lipchuk has uploaded a new change for review. Change subject: core: remove auto suspend of VM. ......................................................................
core: remove auto suspend of VM. Auto suspend is a feature which is no longer being used, therefore should be deleted. Signed-off-by: Maor Lipchuk <mlipc...@redhat.com> Change-Id: I7d9eb342e4ab04c87bc30545cc0831b11c21337a --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java M backend/manager/modules/dal/src/test/resources/fixtures.xml M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java M packaging/dbscripts/create_dwh_views.sql M packaging/dbscripts/create_views.sql A packaging/dbscripts/upgrade/03_03_0320_remove_auto_suspend.sql M packaging/dbscripts/vm_templates_sp.sql M packaging/dbscripts/vms_sp.sql 24 files changed, 13 insertions(+), 86 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/74/16274/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java index aee9fb0..a6b1ce4 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java @@ -355,7 +355,6 @@ VmTemplateStatus.Locked.getValue(), getParameters().getMasterVm().getUsbPolicy().getValue(), getParameters().getMasterVm().getTimeZone(), - getParameters().getMasterVm().isAutoSuspend(), getParameters().getMasterVm().getNiceLevel(), getParameters().getMasterVm().isFailBack(), getParameters().getMasterVm().getDefaultBootSequence(), diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java index 170578b..9fb386e 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmTemplateHandler.java @@ -30,7 +30,7 @@ mUpdateVmTemplate = new ObjectIdentityChecker(VmTemplateHandler.class); BlankVmTemplateId = new Guid("00000000-0000-0000-0000-000000000000"); mUpdateVmTemplate.AddPermittedFields(new String[] { "name", "description", "domain", "os", "osType", - "autoSuspend", "interfaces", "memSizeMb", "numOfSockets", "cpuPerSocket", + "interfaces", "memSizeMb", "numOfSockets", "cpuPerSocket", "vdsGroupId", "numOfMonitors", "allowConsoleReconnect", "usbPolicy", "timeZone", "diskMap", "defaultBootSequence", "disabled", "isoPath", "diskImageMap", "defaultDisplayType", "priority", "autoStartup", "stateless", diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java index fa0495b..beda1df 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java @@ -217,14 +217,6 @@ this.vmStatic.setInitialized(value); } - public boolean isAutoSuspend() { - return this.vmStatic.isAutoSuspend(); - } - - public void setAutoSuspend(boolean value) { - this.vmStatic.setAutoSuspend(value); - } - public int getNumOfCpus() { return this.vmStatic.getNumOfCpus(); } diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java index 2732625..959f1ae 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java @@ -91,9 +91,6 @@ private int niceLevel; @EditableField - private boolean autoSuspend; - - @EditableField private int priority; @EditableField @@ -214,7 +211,6 @@ boolean failBack, BootSequence defaultBootSequence, int niceLevel, - boolean autosuspend, int priority, boolean autoStartup, boolean stateless, @@ -247,7 +243,6 @@ this.failBack = failBack; this.defaultBootSequence = defaultBootSequence; this.niceLevel = niceLevel; - this.autoSuspend = autosuspend; this.priority = priority; this.autoStartup = autoStartup; this.stateless = stateless; @@ -443,14 +438,6 @@ niceLevel = value; } - public boolean isAutoSuspend() { - return autoSuspend; - } - - public void setAutoSuspend(boolean value) { - autoSuspend = value; - } - public int getPriority() { return priority; } @@ -561,7 +548,6 @@ int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + (autoStartup ? 1231 : 1237); - result = prime * result + (autoSuspend ? 1231 : 1237); result = prime * result + cpuPerSocket; result = prime * result + ((creationDate == null) ? 0 : creationDate.hashCode()); result = prime * result + ((defaultBootSequence == null) ? 0 : defaultBootSequence.hashCode()); @@ -608,7 +594,6 @@ VmBase other = (VmBase) obj; return (ObjectUtils.objectsEqual(id, other.id) && autoStartup == other.autoStartup - && autoSuspend == other.autoSuspend && cpuPerSocket == other.cpuPerSocket && ObjectUtils.objectsEqual(creationDate, other.creationDate) && defaultBootSequence == other.defaultBootSequence diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java index e3e1198..a5b96b8 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java @@ -47,7 +47,6 @@ public VmStatic() { setNumOfMonitors(1); initialized = false; - setAutoSuspend(false); setNiceLevel(0); setDefaultBootSequence(BootSequence.C); defaultDisplayType = DisplayType.qxl; @@ -71,7 +70,6 @@ vmStatic.isFailBack(), vmStatic.getDefaultBootSequence(), vmStatic.getNiceLevel(), - vmStatic.isAutoSuspend(), vmStatic.getPriority(), vmStatic.isAutoStartup(), vmStatic.isStateless(), diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java index 215b66e..2507eb6 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java @@ -46,7 +46,6 @@ private double actualDiskSize = 0; public VmTemplate() { - setAutoSuspend(false); setNiceLevel(0); diskTemplateMap = new HashMap<Guid, DiskImage>(); } @@ -55,7 +54,7 @@ public VmTemplate(int childCount, Date creationDate, String description, int memSizeMb, String name, int numOfSockets, int cpuPerSocket, int osId, Guid vdsGroupId, Guid vmtGuid, String domain, - int numOfMonitors, int status, int usbPolicy, String timeZone, boolean autoSuspend, int niceLevel, + int numOfMonitors, int status, int usbPolicy, String timeZone, int niceLevel, boolean failBack, BootSequence defaultBootSequence, VmType vmType, boolean smartcardEnabled, boolean deleteProtected, Boolean tunnelMigration, String vncKeyboardLayout, int minAllocatedMem, boolean stateless, boolean runAndPause) { @@ -76,7 +75,6 @@ failBack, defaultBootSequence, niceLevel, - autoSuspend, 0, false, stateless, diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java index 83f0ebd..5e55562 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java @@ -28,7 +28,6 @@ entity.setFailBack(rs.getBoolean("fail_back")); entity.setDefaultBootSequence(BootSequence.forValue(rs.getInt("default_boot_sequence"))); entity.setNiceLevel(rs.getInt("nice_level")); - entity.setAutoSuspend(rs.getBoolean("is_auto_suspend")); entity.setPriority(rs.getInt("priority")); entity.setAutoStartup(rs.getBoolean("auto_startup")); entity.setStateless(rs.getBoolean("is_stateless")); diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java index edeb1a0..2c36d278 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java @@ -205,7 +205,6 @@ .addValue("num_of_monitors", vm.getNumOfMonitors()) .addValue("allow_console_reconnect", vm.getAllowConsoleReconnect()) .addValue("is_initialized", vm.isInitialized()) - .addValue("is_auto_suspend", vm.isAutoSuspend()) .addValue("num_of_sockets", vm.getNumOfSockets()) .addValue("cpu_per_socket", vm.getCpuPerSocket()) .addValue("usb_policy", vm.getUsbPolicy()) @@ -344,7 +343,6 @@ entity.setNumOfMonitors(rs.getInt("num_of_monitors")); entity.setAllowConsoleReconnect(rs.getBoolean("allow_console_reconnect")); entity.setInitialized(rs.getBoolean("is_initialized")); - entity.setAutoSuspend(rs.getBoolean("is_auto_suspend")); entity.setNumOfSockets(rs.getInt("num_of_sockets")); entity.setCpuPerSocket(rs.getInt("cpu_per_socket")); entity.setUsbPolicy(UsbPolicy.forValue(rs.getInt("usb_policy"))); diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java index 38b4aba..733e697 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java @@ -51,7 +51,6 @@ .addValue("creation_date", vm.getCreationDate()) .addValue("num_of_monitors", vm.getNumOfMonitors()) .addValue("is_initialized", vm.isInitialized()) - .addValue("is_auto_suspend", vm.isAutoSuspend()) .addValue("num_of_sockets", vm.getNumOfSockets()) .addValue("cpu_per_socket", vm.getCpuPerSocket()) .addValue("usb_policy", vm.getUsbPolicy()) diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java index 6c14464..71d545b 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java @@ -141,7 +141,6 @@ .addValue("usb_policy", template.getUsbPolicy()) .addValue("time_zone", template.getTimeZone()) .addValue("fail_back", template.isFailBack()) - .addValue("is_auto_suspend", template.isAutoSuspend()) .addValue("vm_type", template.getVmType()) .addValue("nice_level", template.getNiceLevel()) .addValue("default_boot_sequence", diff --git a/backend/manager/modules/dal/src/test/resources/fixtures.xml b/backend/manager/modules/dal/src/test/resources/fixtures.xml index 6b51918..0875748 100644 --- a/backend/manager/modules/dal/src/test/resources/fixtures.xml +++ b/backend/manager/modules/dal/src/test/resources/fixtures.xml @@ -1137,7 +1137,6 @@ <column>num_of_monitors</column> <column>allow_console_reconnect</column> <column>is_initialized</column> - <column>is_auto_suspend</column> <column>num_of_sockets</column> <column>cpu_per_socket</column> <column>template_status</column> @@ -1183,7 +1182,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <null /> - <value>0</value> <value>1</value> <value>1</value> <value>0</value> @@ -1229,7 +1227,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <null /> - <value>0</value> <value>1</value> <value>1</value> <value>0</value> @@ -1275,7 +1272,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <null /> - <value>0</value> <value>1</value> <value>1</value> <value>0</value> @@ -1321,7 +1317,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <null /> - <value>0</value> <value>1</value> <value>1</value> <value>0</value> @@ -1367,7 +1362,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <null /> - <value>0</value> <value>1</value> <value>1</value> <value>0</value> @@ -1415,7 +1409,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <value>1</value> - <value>0</value> <value>1</value> <value>1</value> <null /> @@ -1461,7 +1454,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <value>1</value> - <value>0</value> <value>1</value> <value>1</value> <null /> @@ -1507,7 +1499,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <value>1</value> - <value>0</value> <value>1</value> <value>1</value> <null /> @@ -1553,7 +1544,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <value>1</value> - <value>0</value> <value>1</value> <value>1</value> <null /> @@ -1599,7 +1589,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <value>1</value> - <value>0</value> <value>1</value> <value>1</value> <null /> @@ -1645,7 +1634,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <value>1</value> - <value>0</value> <value>1</value> <value>1</value> <null /> @@ -1691,7 +1679,6 @@ <value>1</value> <value>false</value> <!-- allow_console_reconnect --> <value>1</value> - <value>0</value> <value>1</value> <value>1</value> <null /> diff --git a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java index 9555c05..6842c4d 100644 --- a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java +++ b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java @@ -331,11 +331,6 @@ } } - node = content.SelectSingleNode("IsAutoSuspend"); - if (node != null) { - vmBase.setAutoSuspend(Boolean.parseBoolean(node.InnerText)); - } - node = content.SelectSingleNode("TimeZone"); if (node != null) { vmBase.setTimeZone(node.InnerText); diff --git a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java index 074628d..4f1ba59 100644 --- a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java +++ b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java @@ -205,10 +205,6 @@ _writer.WriteRaw(OvfParser.LocalDateToUtcDateString(new Date())); _writer.WriteEndElement(); - _writer.WriteStartElement("IsAutoSuspend"); - _writer.WriteRaw(String.valueOf(vmBase.isAutoSuspend())); - _writer.WriteEndElement(); - _writer.WriteStartElement("DeleteProtected"); _writer.WriteRaw(String.valueOf(vmBase.isDeleteProtected())); _writer.WriteEndElement(); diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java index fdf951e..9fbee9b 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java @@ -133,7 +133,6 @@ vm.setInitrdUrl(instance.getInitrdUrl()); // TODO: array - need to consider cloning of array, and of actual interfaces vm.setInterfaces(instance.getInterfaces()); - vm.setAutoSuspend(instance.isAutoSuspend()); vm.setInitialized(instance.isInitialized()); vm.setStateless(instance.isStateless()); vm.setRunAndPause(instance.isRunAndPause()); @@ -370,7 +369,6 @@ obj.setDescription(instance.getDescription()); obj.setDomain(instance.getDomain()); obj.setFailBack(instance.isFailBack()); - obj.setAutoSuspend(instance.isAutoSuspend()); obj.setStateless(instance.isStateless()); obj.setMemSizeMb(instance.getMemSizeMb()); obj.setName(instance.getName()); @@ -408,7 +406,6 @@ obj.setDedicatedVmForVds(instance.getDedicatedVmForVds()); obj.setDescription(instance.getDescription()); obj.setDomain(instance.getDomain()); - obj.setAutoSuspend(instance.isAutoSuspend()); obj.setInitialized(instance.isInitialized()); obj.setStateless(instance.isStateless()); obj.setRunAndPause(instance.isRunAndPause()); diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java index ab961a6..7eced26 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java @@ -488,7 +488,6 @@ vm.setCpuPerSocket(Integer.parseInt(model.getTotalCPUCores().getEntity().toString()) / (Integer) model.getNumOfSockets().getSelectedItem()); vm.setUsbPolicy((UsbPolicy) model.getUsbPolicy().getSelectedItem()); - vm.setAutoSuspend(false); vm.setStateless(false); vm.setDefaultBootSequence(model.getBootSequence()); vm.setIsoPath(model.getCdImage().getIsChangable() ? (String) model.getCdImage() diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java index aa89ec7..72ab80f 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateListModel.java @@ -453,7 +453,6 @@ template.setCpuPerSocket(Integer.parseInt(model.getTotalCPUCores().getEntity().toString()) / (Integer) model.getNumOfSockets().getSelectedItem()); template.setUsbPolicy((UsbPolicy) model.getUsbPolicy().getSelectedItem()); - template.setAutoSuspend(false); template.setStateless((Boolean) model.getIsStateless().getEntity()); template.setRunAndPause((Boolean) model.getIsRunAndPause().getEntity()); template.setDeleteProtected((Boolean) model.getIsDeleteProtected().getEntity()); diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java index fd45c37..d2cee6a 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalListModel.java @@ -608,7 +608,6 @@ tempVar.setCpuPerSocket(Integer.parseInt(model.getTotalCPUCores().getEntity().toString()) / (Integer) model.getNumOfSockets().getSelectedItem()); tempVar.setDeleteProtected((Boolean) model.getIsDeleteProtected().getEntity()); - tempVar.setAutoSuspend(false); tempVar.setStateless((Boolean) model.getIsStateless().getEntity()); tempVar.setRunAndPause(((Boolean) model.getIsRunAndPause().getEntity())); tempVar.setSmartcardEnabled((Boolean) model.getIsSmartcardEnabled().getEntity()); @@ -1001,7 +1000,6 @@ gettempVm().setCpuPerSocket(Integer.parseInt(model.getTotalCPUCores().getEntity().toString()) / (Integer) model.getNumOfSockets().getSelectedItem()); gettempVm().setUsbPolicy((UsbPolicy) model.getUsbPolicy().getSelectedItem()); - gettempVm().setAutoSuspend(false); gettempVm().setStateless((Boolean) model.getIsStateless().getEntity()); gettempVm().setRunAndPause(((Boolean) model.getIsRunAndPause().getEntity())); gettempVm().setDeleteProtected((Boolean) model.getIsDeleteProtected().getEntity()); diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java index 8ede831..4e95f62 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java @@ -1362,7 +1362,6 @@ tempVar.setNumOfSockets((Integer) model.getNumOfSockets().getSelectedItem()); tempVar.setCpuPerSocket(Integer.parseInt(model.getTotalCPUCores().getEntity().toString()) / (Integer) model.getNumOfSockets().getSelectedItem()); - tempVar.setAutoSuspend(false); tempVar.setStateless((Boolean) model.getIsStateless().getEntity()); tempVar.setRunAndPause(((Boolean) model.getIsRunAndPause().getEntity())); tempVar.setSmartcardEnabled((Boolean) model.getIsSmartcardEnabled().getEntity()); @@ -1938,7 +1937,6 @@ getcurrentVm().setCpuPerSocket(Integer.parseInt(model.getTotalCPUCores().getEntity().toString()) / (Integer) model.getNumOfSockets().getSelectedItem()); getcurrentVm().setUsbPolicy((UsbPolicy) model.getUsbPolicy().getSelectedItem()); - getcurrentVm().setAutoSuspend(false); getcurrentVm().setStateless((Boolean) model.getIsStateless().getEntity()); getcurrentVm().setRunAndPause((Boolean) model.getIsRunAndPause().getEntity()); getcurrentVm().setSmartcardEnabled((Boolean) model.getIsSmartcardEnabled().getEntity()); diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java index 5ba3e4f..39d5cce 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java @@ -559,7 +559,6 @@ getcurrentVm().setCpuPerSocket(Integer.parseInt(model.getTotalCPUCores().getEntity().toString()) / (Integer) model.getNumOfSockets().getSelectedItem()); getcurrentVm().setUsbPolicy((UsbPolicy) model.getUsbPolicy().getSelectedItem()); - getcurrentVm().setAutoSuspend(false); getcurrentVm().setStateless((Boolean) model.getIsStateless().getEntity()); getcurrentVm().setSmartcardEnabled((Boolean) model.getIsSmartcardEnabled().getEntity()); getcurrentVm().setDeleteProtected((Boolean) model.getIsDeleteProtected().getEntity()); diff --git a/packaging/dbscripts/create_dwh_views.sql b/packaging/dbscripts/create_dwh_views.sql index d9d93f2..67c397f 100644 --- a/packaging/dbscripts/create_dwh_views.sql +++ b/packaging/dbscripts/create_dwh_views.sql @@ -234,7 +234,6 @@ a.is_initialized AS initialized, a.is_stateless AS stateless, a.fail_back, - a.is_auto_suspend AS auto_suspend, cast(a.usb_policy as smallint) as usb_policy, a.time_zone, a._create_date AS create_date, diff --git a/packaging/dbscripts/create_views.sql b/packaging/dbscripts/create_views.sql index fc02d39..5a97064 100644 --- a/packaging/dbscripts/create_views.sql +++ b/packaging/dbscripts/create_views.sql @@ -350,7 +350,6 @@ vm_templates.template_status as status, vm_templates.usb_policy as usb_policy, vm_templates.time_zone as time_zone, - vm_templates.is_auto_suspend as is_auto_suspend, vm_templates.fail_back as fail_back, vds_groups.name as vds_group_name, vm_templates.vm_type as vm_type, @@ -408,7 +407,7 @@ vm_templates.child_count, vm_templates.num_of_sockets, vm_templates.cpu_per_socket, vm_templates.num_of_sockets*vm_templates.cpu_per_socket AS num_of_cpus, vm_templates.description, vm_templates.vds_group_id, vm_templates.domain, vm_templates.num_of_monitors, vm_templates.allow_console_reconnect, vm_templates.template_status AS status, - vm_templates.usb_policy, vm_templates.time_zone, vm_templates.is_auto_suspend, vm_templates.fail_back, + vm_templates.usb_policy, vm_templates.time_zone, vm_templates.fail_back, vds_groups.name AS vds_group_name, vm_templates.vm_type, vm_templates.nice_level, storage_pool.id AS storage_pool_id, storage_pool.name AS storage_pool_name, vm_templates.default_boot_sequence, vm_templates.default_display_type, vm_templates.priority, vm_templates.auto_startup, @@ -428,7 +427,7 @@ vm_templates_1.child_count, vm_templates_1.num_of_sockets, vm_templates_1.cpu_per_socket, vm_templates_1.num_of_sockets*vm_templates_1.cpu_per_socket AS num_of_cpus, vm_templates_1.description, vm_templates_1.vds_group_id, vm_templates_1.domain, vm_templates_1.num_of_monitors, vm_templates_1.allow_console_reconnect, vm_templates_1.template_status AS status, vm_templates_1.usb_policy, vm_templates_1.time_zone, - vm_templates_1.is_auto_suspend, vm_templates_1.fail_back, vds_groups_1.name AS vds_group_name, vm_templates_1.vm_type, + vm_templates_1.fail_back, vds_groups_1.name AS vds_group_name, vm_templates_1.vm_type, vm_templates_1.nice_level, storage_pool_1.id AS storage_pool_id, storage_pool_1.name AS storage_pool_name, vm_templates_1.default_boot_sequence, vm_templates_1.default_display_type, vm_templates_1.priority, vm_templates_1.auto_startup, vm_templates_1.is_stateless, vm_templates_1.iso_path, vm_templates_1.origin, @@ -543,7 +542,7 @@ vm_dynamic.console_user_id as console_user_id, vm_dynamic.guest_agent_nics_hash as guest_agent_nics_hash, vm_dynamic.run_on_vds as run_on_vds, vm_dynamic.migrating_to_vds as migrating_to_vds, vm_dynamic.app_list as app_list, vm_dynamic.display as display, vm_dynamic.hibernation_vol_handle as hibernation_vol_handle, vm_pool_map_view.vm_pool_name as vm_pool_name, vm_pool_map_view.vm_pool_id as vm_pool_id, vm_static.vm_guid as vm_guid, vm_static.num_of_monitors as num_of_monitors, vm_static.allow_console_reconnect as allow_console_reconnect, vm_static.is_initialized as is_initialized, - vm_static.is_auto_suspend as is_auto_suspend, vm_static.num_of_sockets as num_of_sockets, vm_static.cpu_per_socket as cpu_per_socket, vm_static.usb_policy as usb_policy, vm_dynamic.acpi_enable as acpi_enable, vm_dynamic.session as session, + vm_static.num_of_sockets as num_of_sockets, vm_static.cpu_per_socket as cpu_per_socket, vm_static.usb_policy as usb_policy, vm_dynamic.acpi_enable as acpi_enable, vm_dynamic.session as session, vm_static.num_of_sockets*vm_static.cpu_per_socket as num_of_cpus, vm_static.quota_id as quota_id, quota.quota_name as quota_name, storage_pool.quota_enforcement_type as quota_enforcement_type, vm_dynamic.display_ip as display_ip, vm_dynamic.display_type as display_type, vm_dynamic.kvm_enable as kvm_enable, vm_dynamic.boot_sequence as boot_sequence, @@ -582,7 +581,7 @@ vms.guest_last_logout_time, vms.guest_os, vms.run_on_vds, vms.migrating_to_vds, vms.app_list, vms.display, vms.hibernation_vol_handle, vms.vm_pool_name, vms.vm_pool_id, vms.vm_guid, vms.num_of_monitors, vms.allow_console_reconnect, - vms.is_initialized, vms.is_auto_suspend, vms.num_of_sockets, vms.cpu_per_socket, vms.usb_policy, vms.acpi_enable, + vms.is_initialized, vms.num_of_sockets, vms.cpu_per_socket, vms.usb_policy, vms.acpi_enable, vms.session, vms.num_of_sockets * vms.cpu_per_socket AS num_of_cpus, vms.display_ip, vms.display_type, vms.kvm_enable, vms.boot_sequence, vms.display_secure_port, vms.utc_diff, vms.last_vds_run_on, vms.client_ip, vms.guest_requested_memory, vms.time_zone, vms.cpu_user, vms.cpu_sys, vms.elapsed_time, diff --git a/packaging/dbscripts/upgrade/03_03_0320_remove_auto_suspend.sql b/packaging/dbscripts/upgrade/03_03_0320_remove_auto_suspend.sql new file mode 100644 index 0000000..f9b1990 --- /dev/null +++ b/packaging/dbscripts/upgrade/03_03_0320_remove_auto_suspend.sql @@ -0,0 +1 @@ +select fn_db_drop_column('vm_templates', 'is_auto_suspend'); diff --git a/packaging/dbscripts/vm_templates_sp.sql b/packaging/dbscripts/vm_templates_sp.sql index af4a1c2..4835b94 100644 --- a/packaging/dbscripts/vm_templates_sp.sql +++ b/packaging/dbscripts/vm_templates_sp.sql @@ -24,7 +24,6 @@ v_usb_policy INTEGER, v_time_zone VARCHAR(40) , v_fail_back BOOLEAN , - v_is_auto_suspend BOOLEAN, v_vm_type INTEGER , v_nice_level INTEGER, v_default_boot_sequence INTEGER, @@ -71,7 +70,6 @@ usb_policy, time_zone, fail_back, - is_auto_suspend, vm_type, nice_level, default_boot_sequence, @@ -116,7 +114,6 @@ v_usb_policy, v_time_zone, v_fail_back, - v_is_auto_suspend, v_vm_type, v_nice_level, v_default_boot_sequence, @@ -170,7 +167,6 @@ v_usb_policy INTEGER, v_time_zone VARCHAR(40) , v_fail_back BOOLEAN , - v_is_auto_suspend BOOLEAN, v_vm_type INTEGER , v_nice_level INTEGER, v_default_boot_sequence INTEGER, @@ -205,7 +201,7 @@ vds_group_id = v_vds_group_id,domain = v_domain,num_of_monitors = v_num_of_monitors, allow_console_reconnect = v_allow_console_reconnect, template_status = v_status,usb_policy = v_usb_policy,time_zone = v_time_zone, - fail_back = v_fail_back,is_auto_suspend = v_is_auto_suspend, + fail_back = v_fail_back, vm_type = v_vm_type, nice_level = v_nice_level,default_boot_sequence = v_default_boot_sequence, default_display_type = v_default_display_type, diff --git a/packaging/dbscripts/vms_sp.sql b/packaging/dbscripts/vms_sp.sql index 73a70c7..3e1f5e0 100644 --- a/packaging/dbscripts/vms_sp.sql +++ b/packaging/dbscripts/vms_sp.sql @@ -406,7 +406,6 @@ v_num_of_monitors INTEGER, v_allow_console_reconnect BOOLEAN, v_is_initialized BOOLEAN, - v_is_auto_suspend BOOLEAN, v_num_of_sockets INTEGER, v_cpu_per_socket INTEGER, v_usb_policy INTEGER, @@ -440,8 +439,8 @@ RETURNS VOID AS $procedure$ BEGIN -INSERT INTO vm_static(description, mem_size_mb, os, vds_group_id, vm_guid, VM_NAME, vmt_guid,domain,creation_date,num_of_monitors,allow_console_reconnect,is_initialized,is_auto_suspend,num_of_sockets,cpu_per_socket,usb_policy, time_zone,auto_startup,is_stateless,dedicated_vm_for_vds, fail_back, default_boot_sequence, vm_type, nice_level, default_display_type, priority,iso_path,origin,initrd_url,kernel_url,kernel_params,migration_support,predefined_properties,userdefined_properties,min_allocated_mem, entity_type, quota_id, cpu_pinning, is_smartcard_enabled,is_delete_protected,host_cpu_flags, tunnel_migration, vnc_keyboard_layout, is_run_and_pause) - VALUES(v_description, v_mem_size_mb, v_os, v_vds_group_id, v_vm_guid, v_vm_name, v_vmt_guid, v_domain, v_creation_date, v_num_of_monitors, v_allow_console_reconnect, v_is_initialized, v_is_auto_suspend, v_num_of_sockets, v_cpu_per_socket, v_usb_policy, v_time_zone, v_auto_startup,v_is_stateless,v_dedicated_vm_for_vds,v_fail_back, v_default_boot_sequence, v_vm_type, v_nice_level, v_default_display_type, v_priority,v_iso_path,v_origin,v_initrd_url,v_kernel_url,v_kernel_params,v_migration_support,v_predefined_properties,v_userdefined_properties,v_min_allocated_mem, 'VM', v_quota_id, v_cpu_pinning, v_is_smartcard_enabled,v_is_delete_protected,v_host_cpu_flags, v_tunnel_migration, v_vnc_keyboard_layout, v_is_run_and_pause); +INSERT INTO vm_static(description, mem_size_mb, os, vds_group_id, vm_guid, VM_NAME, vmt_guid,domain,creation_date,num_of_monitors,allow_console_reconnect,is_initialized,num_of_sockets,cpu_per_socket,usb_policy, time_zone,auto_startup,is_stateless,dedicated_vm_for_vds, fail_back, default_boot_sequence, vm_type, nice_level, default_display_type, priority,iso_path,origin,initrd_url,kernel_url,kernel_params,migration_support,predefined_properties,userdefined_properties,min_allocated_mem, entity_type, quota_id, cpu_pinning, is_smartcard_enabled,is_delete_protected,host_cpu_flags, tunnel_migration, vnc_keyboard_layout, is_run_and_pause) + VALUES(v_description, v_mem_size_mb, v_os, v_vds_group_id, v_vm_guid, v_vm_name, v_vmt_guid, v_domain, v_creation_date, v_num_of_monitors, v_allow_console_reconnect, v_is_initialized, v_num_of_sockets, v_cpu_per_socket, v_usb_policy, v_time_zone, v_auto_startup,v_is_stateless,v_dedicated_vm_for_vds,v_fail_back, v_default_boot_sequence, v_vm_type, v_nice_level, v_default_display_type, v_priority,v_iso_path,v_origin,v_initrd_url,v_kernel_url,v_kernel_params,v_migration_support,v_predefined_properties,v_userdefined_properties,v_min_allocated_mem, 'VM', v_quota_id, v_cpu_pinning, v_is_smartcard_enabled,v_is_delete_protected,v_host_cpu_flags, v_tunnel_migration, v_vnc_keyboard_layout, v_is_run_and_pause); -- perform deletion from vm_ovf_generations to ensure that no record exists when performing insert to avoid PK violation. DELETE FROM vm_ovf_generations gen WHERE gen.vm_guid = v_vm_guid; INSERT INTO vm_ovf_generations(vm_guid, storage_pool_id) VALUES (v_vm_guid, (SELECT storage_pool_id FROM vds_groups vg WHERE vg.vds_group_id = v_vds_group_id)); @@ -522,7 +521,6 @@ v_num_of_monitors INTEGER, v_allow_console_reconnect BOOLEAN, v_is_initialized BOOLEAN, - v_is_auto_suspend BOOLEAN, v_num_of_sockets INTEGER, v_cpu_per_socket INTEGER, v_usb_policy INTEGER, @@ -563,7 +561,7 @@ VM_NAME = v_vm_name,vmt_guid = v_vmt_guid, domain = v_domain,creation_date = v_creation_date,num_of_monitors = v_num_of_monitors, allow_console_reconnect = v_allow_console_reconnect, - is_initialized = v_is_initialized,is_auto_suspend = v_is_auto_suspend, + is_initialized = v_is_initialized, num_of_sockets = v_num_of_sockets,cpu_per_socket = v_cpu_per_socket, usb_policy = v_usb_policy,time_zone = v_time_zone,auto_startup = v_auto_startup, is_stateless = v_is_stateless,dedicated_vm_for_vds = v_dedicated_vm_for_vds, @@ -896,7 +894,6 @@ v_num_of_monitors INTEGER, v_allow_console_reconnect BOOLEAN, v_is_initialized BOOLEAN, - v_is_auto_suspend BOOLEAN, v_num_of_sockets INTEGER, v_cpu_per_socket INTEGER, v_usb_policy INTEGER, @@ -928,8 +925,8 @@ RETURNS VOID AS $procedure$ BEGIN -INSERT INTO vm_static(description, mem_size_mb, os, vds_group_id, vm_guid, VM_NAME, vmt_guid, num_of_monitors, allow_console_reconnect, is_initialized, is_auto_suspend, num_of_sockets, cpu_per_socket, usb_policy, time_zone,auto_startup,is_stateless,dedicated_vm_for_vds,fail_back,vm_type,nice_level,default_boot_sequence,default_display_type,priority,iso_path,origin,initrd_url,kernel_url,kernel_params,migration_support,predefined_properties,userdefined_properties,min_allocated_mem,cpu_pinning,is_smartcard_enabled,is_delete_protected,host_cpu_flags, tunnel_migration, is_run_and_pause) - VALUES(v_description, v_mem_size_mb, v_os, v_vds_group_id, v_vm_guid, v_vm_name, v_vmt_guid, v_num_of_monitors, v_num_of_monitors, v_is_initialized, v_is_auto_suspend, v_num_of_sockets, v_cpu_per_socket, v_usb_policy, v_time_zone,v_auto_startup,v_is_stateless,v_dedicated_vm_for_vds,v_fail_back,v_vm_type,v_nice_level,v_default_boot_sequence,v_default_display_type,v_priority,v_iso_path,v_origin,v_initrd_url,v_kernel_url,v_kernel_params,v_migration_support,v_predefined_properties,v_userdefined_properties,v_min_allocated_mem,v_cpu_pinning,v_is_smartcard_enabled,v_is_delete_protected,v_host_cpu_flags, v_tunnel_migration, v_is_run_and_pause); +INSERT INTO vm_static(description, mem_size_mb, os, vds_group_id, vm_guid, VM_NAME, vmt_guid, num_of_monitors, allow_console_reconnect, is_initialized, num_of_sockets, cpu_per_socket, usb_policy, time_zone,auto_startup,is_stateless,dedicated_vm_for_vds,fail_back,vm_type,nice_level,default_boot_sequence,default_display_type,priority,iso_path,origin,initrd_url,kernel_url,kernel_params,migration_support,predefined_properties,userdefined_properties,min_allocated_mem,cpu_pinning,is_smartcard_enabled,is_delete_protected,host_cpu_flags, tunnel_migration, is_run_and_pause) + VALUES(v_description, v_mem_size_mb, v_os, v_vds_group_id, v_vm_guid, v_vm_name, v_vmt_guid, v_num_of_monitors, v_num_of_monitors, v_is_initialized, v_num_of_sockets, v_cpu_per_socket, v_usb_policy, v_time_zone,v_auto_startup,v_is_stateless,v_dedicated_vm_for_vds,v_fail_back,v_vm_type,v_nice_level,v_default_boot_sequence,v_default_display_type,v_priority,v_iso_path,v_origin,v_initrd_url,v_kernel_url,v_kernel_params,v_migration_support,v_predefined_properties,v_userdefined_properties,v_min_allocated_mem,v_cpu_pinning,v_is_smartcard_enabled,v_is_delete_protected,v_host_cpu_flags, v_tunnel_migration, v_is_run_and_pause); INSERT INTO vm_dynamic(vm_guid, status) VALUES(v_vm_guid, 0); -- To view, visit http://gerrit.ovirt.org/16274 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d9eb342e4ab04c87bc30545cc0831b11c21337a 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