ofri masad has posted comments on this change. Change subject: webadmin: Fix vm pop-up host tab logic ......................................................................
Patch Set 2: (10 inline comments) .................................................... File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/uicommon/popup/AbstractVmPopupWidget.ui.xml Line 200: float: left; Line 201: } Line 202: Line 203: .migrationSelect { Line 204: margin-right: 174px; had to add them to be the same as the rest of the code. Line 205: } Line 206: Line 207: </ui:style> Line 208: .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolListModel.java Line 466: { Line 467: default_host = defaultHost.getId(); Line 468: } Line 469: Line 470: MigrationSupport migrationSupport = (MigrationSupport) ((EntityModel)(model.getMigrationMode().getSelectedItem())).getEntity(); Done Line 471: Line 472: VM desktop = new VM(); Line 473: desktop.setVmtGuid(((VmTemplate) model.getTemplate().getSelectedItem()).getId()); Line 474: desktop.setName(name); Line 496: .getSelectedItem() : ""); //$NON-NLS-1$ Line 497: desktop.setDedicatedVmForVds(default_host); Line 498: desktop.setKernelUrl((String) model.getKernel_path().getEntity()); Line 499: desktop.setKernelParams((String) model.getKernel_parameters().getEntity()); Line 500: desktop.setInitrdUrl((String) model.getInitrd_path().getEntity()); Done Line 501: desktop.setMigrationSupport(migrationSupport); Line 502: Line 503: EntityModel displayProtocolSelectedItem = Line 504: (EntityModel) model.getDisplayProtocol().getSelectedItem(); .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java Line 1532: Constants constants = ConstantsManager.getInstance().getConstants(); Line 1533: Line 1534: migrationModes.add(new EntityModel(constants.autoAndManMigration(), MigrationSupport.MIGRATABLE)); Line 1535: migrationModes.add(new EntityModel(constants.manualMigrationOnly(), MigrationSupport.IMPLICITLY_NON_MIGRATABLE)); Line 1536: migrationModes.add(new EntityModel(constants.noMigration(), MigrationSupport.PINNED_TO_HOST)); Done Line 1537: getMigrationMode().setItems(migrationModes); Line 1538: Line 1539: getDisplayProtocol().getSelectedItemChangedEvent().addListener(this); Line 1540: } Line 1535: migrationModes.add(new EntityModel(constants.manualMigrationOnly(), MigrationSupport.IMPLICITLY_NON_MIGRATABLE)); Line 1536: migrationModes.add(new EntityModel(constants.noMigration(), MigrationSupport.PINNED_TO_HOST)); Line 1537: getMigrationMode().setItems(migrationModes); Line 1538: Line 1539: getDisplayProtocol().getSelectedItemChangedEvent().addListener(this); Done Line 1540: } Line 1541: Line 1542: private void DataCenter_SelectedItemChanged(Object sender, EventArgs args) Line 1543: { Line 1672: private void CoresPerSocket_EntityChanged(Object sender, EventArgs args) { Line 1673: behavior.coresPerSocketChanged(); Line 1674: } Line 1675: Line 1676: private void clearAndDisable(EntityModel entityModel) { Done Line 1677: entityModel.setEntity(false); Line 1678: entityModel.setIsChangable(false); Line 1679: } Line 1680: Line 1710 Line 1711 Line 1712 Line 1713 Line 1714 and it still does. if it is PINNED_TO_HOST (the same as DontMigrateVM) .................................................... File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java Line 731: protected void updateCpuPinningVisibility() { Line 732: if (getModel().getCluster().getSelectedItem() != null) { Line 733: VDSGroup cluster = (VDSGroup) getModel().getCluster().getSelectedItem(); Line 734: String compatibilityVersion = cluster.getcompatibility_version().toString(); Line 735: boolean hasCpuPinning = Boolean.TRUE.equals(getModel().getHostCpu().getEntity()); This was part of the bug. If VM is migratebale it cannot support cpu pinning. But if cpu pinning is on - migration could be turned on (in this case cpu pinning will be turned off) Line 736: Line 737: if (Boolean.FALSE.equals(AsyncDataProvider.GetConfigValuePreConverted(ConfigurationValues.CpuPinningEnabled, Line 738: compatibilityVersion))) { Line 739: hasCpuPinning = false; .................................................... File frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java Line 1766: Line 1767: @DefaultStringValue("There can be only one bootable disk defined") Line 1768: String onlyOneBootableDisk(); Line 1769: Line 1770: @DefaultStringValue("Allow Manual and Automatic migration") Done Line 1771: String autoAndManMigration(); Line 1772: Line 1773: @DefaultStringValue("Allow Manual migration only") Line 1774: String manualMigrationOnly(); Line 1769: Line 1770: @DefaultStringValue("Allow Manual and Automatic migration") Line 1771: String autoAndManMigration(); Line 1772: Line 1773: @DefaultStringValue("Allow Manual migration only") Done Line 1774: String manualMigrationOnly(); Line 1775: Line 1776: @DefaultStringValue("Do not allow migration") Line 1777: String noMigration(); -- To view, visit http://gerrit.ovirt.org/12706 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib4da1be4919913b7739f4139299d2c88958488d0 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: ofri masad <oma...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: ofri masad <oma...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches