Shireesh Anjal has uploaded a new change for review. Change subject: engine: Refactoring FeatureSupported ......................................................................
engine: Refactoring FeatureSupported At present, FeatureSupported primarily contains a set of methods to check if a given feature is supported for a given compatibility level. This is done by checking the boolean value of corresponding confiuration in vdc_options. Currently, one is expected to add a new boolean entry in vdc_options for every compatibility version supported by the engine. For gluster features, we would prefer to use a different mechanism - just a single entry in config to check which version was the feature introduced in. In case of rare scenarios where the feature stops being supported, another config can be used for the "to version". In this patch, we introduce CompatibilityUtils, a class with utility methods - one each for checking compatibility of features using above mentioned approaches. It also renames the existing FeatureSupported to VirtFeatureSupported, to make sure that methods for only virt related features are added in it. For gluster features, a new class - GlusterFeatureSupported - will be introduced in a separate patch. Change-Id: I9b8ef0769f8b4ad04dde9a23a2c3c9508d2e0e89 Signed-off-by: Shireesh Anjal <san...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/VmInterfaceManager.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/cluster/AttachNetworkToVdsGroupCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/UpdateVmInterfaceCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkValidator.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmNicValidator.java R backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VirtFeatureSupported.java A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/CompatibilityUtils.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugNicVDSCommand.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java 13 files changed, 91 insertions(+), 41 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/13490/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java index 45ea7c4..8a397d2 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java @@ -5,7 +5,7 @@ import org.ovirt.engine.core.bll.job.ExecutionHandler; import org.ovirt.engine.core.bll.snapshots.SnapshotsValidator; import org.ovirt.engine.core.common.AuditLogType; -import org.ovirt.engine.core.common.FeatureSupported; +import org.ovirt.engine.core.common.VirtFeatureSupported; import org.ovirt.engine.core.common.action.MigrateVmParameters; import org.ovirt.engine.core.common.businessentities.MigrationMethod; import org.ovirt.engine.core.common.businessentities.MigrationSupport; @@ -118,7 +118,7 @@ String dstVdsHost = String.format("%1$s:%2$s", getDestinationVds().getHostName(), getDestinationVds() .getPort()); Boolean tunnelMigration = null; - if (FeatureSupported.tunnelMigration(getVm().getVdsGroupCompatibilityVersion())) { + if (VirtFeatureSupported.tunnelMigration(getVm().getVdsGroupCompatibilityVersion())) { // if vm has no override for tunnel migration (its null), // use cluster's setting tunnelMigration = diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java index 3a576d4..535dc40 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java @@ -22,7 +22,7 @@ import org.ovirt.engine.core.bll.utils.PermissionSubject; import org.ovirt.engine.core.bll.utils.VmDeviceUtils; import org.ovirt.engine.core.common.AuditLogType; -import org.ovirt.engine.core.common.FeatureSupported; +import org.ovirt.engine.core.common.VirtFeatureSupported; import org.ovirt.engine.core.common.VdcObjectType; import org.ovirt.engine.core.common.action.CreateAllSnapshotsFromVmParameters; import org.ovirt.engine.core.common.action.RunVmParams; @@ -809,7 +809,7 @@ private boolean isVmInterfacesConfigured() { for (VmNetworkInterface nic : getVm().getInterfaces()) { if (nic.getNetworkName() == null) { - if (!FeatureSupported.networkLinking(getVm().getVdsGroupCompatibilityVersion())) { + if (!VirtFeatureSupported.networkLinking(getVm().getVdsGroupCompatibilityVersion())) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_INTERFACE_NETWORK_NOT_CONFIGURED); return false; } else { @@ -832,7 +832,7 @@ Set<String> result = new HashSet<String>(interfaceNetworkNames); result.removeAll(clusterNetworkNames); - if (FeatureSupported.networkLinking(getVm().getVdsGroupCompatibilityVersion())) { + if (VirtFeatureSupported.networkLinking(getVm().getVdsGroupCompatibilityVersion())) { result.remove(null); } 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 c417908..f0c91ae 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 @@ -6,7 +6,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.VirtFeatureSupported; import org.ovirt.engine.core.common.businessentities.VM; import org.ovirt.engine.core.common.businessentities.network.Network; import org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; @@ -51,7 +51,7 @@ if (allocateMac) { iface.setMacAddress(getMacPoolManager().allocateNewMac()); - } else if (FeatureSupported.hotPlug(clusterCompatibilityVersion)) { + } else if (VirtFeatureSupported.hotPlug(clusterCompatibilityVersion)) { getMacPoolManager().forceAddMac(iface.getMacAddress()); } else if (!getMacPoolManager().addMac(iface.getMacAddress())) { auditLogMacInUse(iface); diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/cluster/AttachNetworkToVdsGroupCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/cluster/AttachNetworkToVdsGroupCommand.java index 12c879b..2b3f5ee 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/cluster/AttachNetworkToVdsGroupCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/cluster/AttachNetworkToVdsGroupCommand.java @@ -6,7 +6,7 @@ import org.ovirt.engine.core.bll.VdsGroupCommandBase; import org.ovirt.engine.core.bll.utils.PermissionSubject; import org.ovirt.engine.core.common.AuditLogType; -import org.ovirt.engine.core.common.FeatureSupported; +import org.ovirt.engine.core.common.VirtFeatureSupported; import org.ovirt.engine.core.common.VdcObjectType; import org.ovirt.engine.core.common.action.AttachNetworkToVdsGroupParameter; import org.ovirt.engine.core.common.businessentities.ActionGroup; @@ -77,7 +77,7 @@ private boolean changesAreClusterCompatible() { if (getParameters().getNetwork().isVmNetwork() == false) { - if (!FeatureSupported.nonVmNetwork(getVdsGroup().getcompatibility_version())) { + if (!VirtFeatureSupported.nonVmNetwork(getVdsGroup().getcompatibility_version())) { addCanDoActionMessage(VdcBllMessages.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL); return false; } diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/UpdateVmInterfaceCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/UpdateVmInterfaceCommand.java index d4051ea..b0783d5 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/UpdateVmInterfaceCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/vm/UpdateVmInterfaceCommand.java @@ -9,7 +9,7 @@ import org.ovirt.engine.core.bll.utils.PermissionSubject; import org.ovirt.engine.core.bll.validator.VmNicValidator; import org.ovirt.engine.core.common.AuditLogType; -import org.ovirt.engine.core.common.FeatureSupported; +import org.ovirt.engine.core.common.VirtFeatureSupported; import org.ovirt.engine.core.common.VdcObjectType; import org.ovirt.engine.core.common.action.AddVmInterfaceParameters; import org.ovirt.engine.core.common.action.PlugAction; @@ -288,7 +288,7 @@ */ public ValidationResult hotUpdatePossible() { if (getRequiredAction() == RequiredAction.UPDATE_VM_DEVICE) { - if (!FeatureSupported.networkLinking(version)) { + if (!VirtFeatureSupported.networkLinking(version)) { return new ValidationResult(VdcBllMessages.HOT_VM_INTERFACE_UPDATE_IS_NOT_SUPPORTED, clusterVersion()); } else if (nic.isPortMirroring()) { diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkValidator.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkValidator.java index 7b4ed2d..1fc3dca 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkValidator.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkValidator.java @@ -4,7 +4,7 @@ import java.util.List; import org.ovirt.engine.core.bll.ValidationResult; -import org.ovirt.engine.core.common.FeatureSupported; +import org.ovirt.engine.core.common.VirtFeatureSupported; import org.ovirt.engine.core.common.businessentities.Nameable; import org.ovirt.engine.core.common.businessentities.storage_pool; import org.ovirt.engine.core.common.businessentities.network.Network; @@ -54,7 +54,7 @@ * @return An error iff network is defined as non-VM when that feature is not supported. */ public ValidationResult vmNetworkSetCorrectly() { - return network.isVmNetwork() || FeatureSupported.nonVmNetwork(getDataCenter().getcompatibility_version()) + return network.isVmNetwork() || VirtFeatureSupported.nonVmNetwork(getDataCenter().getcompatibility_version()) ? ValidationResult.VALID : new ValidationResult(VdcBllMessages.NON_VM_NETWORK_NOT_SUPPORTED_FOR_POOL_LEVEL); } @@ -73,7 +73,7 @@ */ public ValidationResult mtuValid() { return network.getMtu() == 0 - || FeatureSupported.mtuSpecification(getDataCenter().getcompatibility_version()) + || VirtFeatureSupported.mtuSpecification(getDataCenter().getcompatibility_version()) ? ValidationResult.VALID : new ValidationResult(VdcBllMessages.NETWORK_MTU_OVERRIDE_NOT_SUPPORTED); } diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmNicValidator.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmNicValidator.java index 9c435e4..2c9a8cc 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmNicValidator.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmNicValidator.java @@ -1,7 +1,7 @@ package org.ovirt.engine.core.bll.validator; import org.ovirt.engine.core.bll.ValidationResult; -import org.ovirt.engine.core.common.FeatureSupported; +import org.ovirt.engine.core.common.VirtFeatureSupported; import org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; import org.ovirt.engine.core.compat.Version; import org.ovirt.engine.core.dal.VdcBllMessages; @@ -26,7 +26,7 @@ * @return An error if unlinking is not supported and the interface is unlinked, otherwise it's OK. */ public ValidationResult linkedCorrectly() { - return !FeatureSupported.networkLinking(version) && !nic.isLinked() + return !VirtFeatureSupported.networkLinking(version) && !nic.isLinked() ? new ValidationResult(VdcBllMessages.UNLINKING_IS_NOT_SUPPORTED, clusterVersion()) : ValidationResult.VALID; } @@ -35,7 +35,7 @@ * @return An error if unlinking is not supported and the network is not set, otherwise it's OK. */ public ValidationResult networkNameValid() { - return !FeatureSupported.networkLinking(version) && nic.getNetworkName() == null + return !VirtFeatureSupported.networkLinking(version) && nic.getNetworkName() == null ? new ValidationResult(VdcBllMessages.NULL_NETWORK_IS_NOT_SUPPORTED, clusterVersion()) : ValidationResult.VALID; } 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/VirtFeatureSupported.java similarity index 73% rename from backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java rename to backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VirtFeatureSupported.java index 57b9fc7..9abd6cc 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/VirtFeatureSupported.java @@ -1,6 +1,7 @@ package org.ovirt.engine.core.common; -import org.ovirt.engine.core.common.config.Config; +import static org.ovirt.engine.core.common.utils.CompatibilityUtils.featureSupported; + import org.ovirt.engine.core.common.config.ConfigValues; import org.ovirt.engine.core.compat.Version; @@ -8,11 +9,7 @@ * Convenience class to check if a feature is supported or not in any given version.<br> * Methods should be named by feature and accept version to check against. */ -public class FeatureSupported { - - private static boolean supportedInConfig(ConfigValues feature, Version version) { - return Config.<Boolean> GetValue(feature, version.getValue()); - } +public class VirtFeatureSupported { /** * @param version @@ -20,7 +17,7 @@ * @return <code>true</code> if network linking is supported for the version, <code>false</code> if it's not. */ public static boolean networkLinking(Version version) { - return supportedInConfig(ConfigValues.NetworkLinkingSupported, version); + return featureSupported(ConfigValues.NetworkLinkingSupported, version); } /** @@ -29,7 +26,7 @@ * @return <code>true</code> if MTU specification is supported for the version, <code>false</code> if it's not. */ public static boolean mtuSpecification(Version version) { - return supportedInConfig(ConfigValues.MTUOverrideSupported, version); + return featureSupported(ConfigValues.MTUOverrideSupported, version); } /** @@ -38,7 +35,7 @@ * @return <code>true</code> if non-VM network is supported for the version, <code>false</code> if it's not. */ public static boolean nonVmNetwork(Version version) { - return supportedInConfig(ConfigValues.NonVmNetworkSupported, version); + return featureSupported(ConfigValues.NonVmNetworkSupported, version); } /** @@ -48,7 +45,7 @@ * it's not. */ public static boolean bridgesReportByVdsm(Version version) { - return supportedInConfig(ConfigValues.SupportBridgesReportByVDSM, version); + return featureSupported(ConfigValues.SupportBridgesReportByVDSM, version); } /** @@ -57,16 +54,17 @@ * @return <code>true</code> if anti MAC spoofing is supported for the version, <code>false</code> if it's not. */ public static boolean antiMacSpoofing(Version version) { - return supportedInConfig(ConfigValues.EnableMACAntiSpoofingFilterRules, version); + return featureSupported(ConfigValues.EnableMACAntiSpoofingFilterRules, version); } /** * @param version * Compatibility version to check for. - * @return <code>true</code> if get hardware information is supported for the version, <code>false</code> if it's not. + * @return <code>true</code> if get hardware information is supported for the version, <code>false</code> if it's + * not. */ public static boolean hardwareInfo(Version version) { - return supportedInConfig(ConfigValues.HardwareInfoEnabled, version); + return featureSupported(ConfigValues.HardwareInfoEnabled, version); } /** @@ -75,7 +73,7 @@ * @return <code>true</code> if tunnel migration is supported for the version, <code>false</code> if it's not. */ public static boolean tunnelMigration(Version version) { - return supportedInConfig(ConfigValues.TunnelMigrationEnabled, version); + return featureSupported(ConfigValues.TunnelMigrationEnabled, version); } /** @@ -84,6 +82,6 @@ * @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); + return featureSupported(ConfigValues.HotPlugEnabled, version); } } diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/CompatibilityUtils.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/CompatibilityUtils.java new file mode 100644 index 0000000..1a4ca91 --- /dev/null +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/CompatibilityUtils.java @@ -0,0 +1,52 @@ +package org.ovirt.engine.core.common.utils; + +import org.ovirt.engine.core.common.config.Config; +import org.ovirt.engine.core.common.config.ConfigValues; +import org.ovirt.engine.core.compat.Version; + +public class CompatibilityUtils { + /** + * Checks if the given feature is supported in given version. This is done by checking if the boolean value of the + * feature config is set to true for the given <code>version</code> + * + * @param feature + * The <code>ConfigValues</code> enum for the feature + * @param version + * Version to check against + * @return true if the feature configuration is set to true for the given <code>version</code>, else false + */ + public static boolean featureSupported(ConfigValues feature, Version version) { + return Config.<Boolean> GetValue(feature, version.getValue()); + } + + /** + * Checks if the given version is >= the minimum version requirement for the feature, and <= the maximum version, if + * provided. + * + * @param featureSupportedFrom + * Config enum for minimum version supported of a feature. This must be non-null. + * @param featureSupportedTo + * Config enum for maximum version supported of a feature. If this is passed as null, only the "from" + * check is performed. + * @param version + * Version to check against. + * @return <code>true</code> if <code>version</code> is >= minimum version required and <= maximum version required + * (if provided), else <code>false</code> + */ + public static boolean featureSupported(ConfigValues featureSupportedFrom, + ConfigValues featureSupportedTo, + Version version) { + if (featureSupportedFrom == null) { + throw new RuntimeException("featureSupportedFrom must not be null!"); + } + + Version supportedFrom = new Version(Config.<String> GetValue(featureSupportedFrom)); + Version supportedTo = new Version(Config.<String> GetValue(featureSupportedTo)); + + if (featureSupportedTo == null) { + return version.compareTo(supportedFrom) >= 0; + } else { + return (version.compareTo(supportedFrom) >= 0 && version.compareTo(supportedTo) <= 0); + } + } +} diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java index dd10aec..23724c1 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java @@ -13,7 +13,7 @@ import org.apache.commons.httpclient.HttpClient; import org.apache.commons.lang.exception.ExceptionUtils; import org.ovirt.engine.core.common.AuditLogType; -import org.ovirt.engine.core.common.FeatureSupported; +import org.ovirt.engine.core.common.VirtFeatureSupported; import org.ovirt.engine.core.common.businessentities.NonOperationalReason; import org.ovirt.engine.core.common.businessentities.VDS; import org.ovirt.engine.core.common.businessentities.VDSDomainsData; @@ -531,7 +531,7 @@ // Verify version capabilities HashSet<Version> hostVersions = null; Version clusterCompatibility = vds.getVdsGroupCompatibilityVersion(); - if (FeatureSupported.hardwareInfo(clusterCompatibility) && + if (VirtFeatureSupported.hardwareInfo(clusterCompatibility) && // If the feature is enabled in cluster level, we continue by verifying that this VDS also // supports the specific cluster level. Otherwise getHardwareInfo API won't exist for the // host and an exception will be raised by vdsm. diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugNicVDSCommand.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugNicVDSCommand.java index eb6163e..2147d83 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugNicVDSCommand.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugNicVDSCommand.java @@ -3,7 +3,7 @@ import java.util.Collections; import org.apache.commons.lang.StringUtils; -import org.ovirt.engine.core.common.FeatureSupported; +import org.ovirt.engine.core.common.VirtFeatureSupported; import org.ovirt.engine.core.common.businessentities.VmDevice; import org.ovirt.engine.core.common.businessentities.network.VmInterfaceType; import org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface; @@ -42,7 +42,7 @@ map.add(VdsProperties.MAC_ADDR, nic.getMacAddress()); map.add(VdsProperties.NETWORK, StringUtils.defaultString(nic.getNetworkName())); - if (FeatureSupported.networkLinking(getParameters().getVm().getVdsGroupCompatibilityVersion())) { + if (VirtFeatureSupported.networkLinking(getParameters().getVm().getVdsGroupCompatibilityVersion())) { map.add(VdsProperties.LINK_ACTIVE, String.valueOf(nic.isLinked())); } addAddress(map, vmDevice.getAddress()); diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java index e979178..77a6859 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java @@ -15,7 +15,7 @@ import org.apache.commons.lang.StringUtils; import org.ovirt.engine.core.common.AuditLogType; -import org.ovirt.engine.core.common.FeatureSupported; +import org.ovirt.engine.core.common.VirtFeatureSupported; import org.ovirt.engine.core.common.businessentities.DiskImageDynamic; import org.ovirt.engine.core.common.businessentities.DisplayType; import org.ovirt.engine.core.common.businessentities.Entities; @@ -972,7 +972,7 @@ Map<String, VdsNetworkInterface> vdsInterfaces = Entities.entitiesByName(vds.getInterfaces()); List<VdsNetworkInterface> interfaces = new ArrayList<VdsNetworkInterface>(); - if (FeatureSupported.bridgesReportByVdsm(vds.getVdsGroupCompatibilityVersion())) { + if (VirtFeatureSupported.bridgesReportByVdsm(vds.getVdsGroupCompatibilityVersion())) { VdsNetworkInterface iface = null; String interfaceName = (String) network.get(VdsProperties.NETWORK_INTERFACE); if (interfaceName != null) { diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java index 6ba2926..1a131ee 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java @@ -10,7 +10,7 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang.StringUtils; -import org.ovirt.engine.core.common.FeatureSupported; +import org.ovirt.engine.core.common.VirtFeatureSupported; import org.ovirt.engine.core.common.businessentities.Disk; import org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType; import org.ovirt.engine.core.common.businessentities.DiskImage; @@ -471,7 +471,7 @@ struct.add(VdsProperties.Device, vmDevice.getDevice()); struct.add(VdsProperties.NETWORK, StringUtils.defaultString(vmInterface.getNetworkName())); - if (FeatureSupported.networkLinking(clusterVersion)) { + if (VirtFeatureSupported.networkLinking(clusterVersion)) { struct.add(VdsProperties.LINK_ACTIVE, String.valueOf(vmInterface.isLinked())); } @@ -493,7 +493,7 @@ } public static void addNetworkFiltersToNic(XmlRpcStruct struct, Version clusterVersion) { - if (FeatureSupported.antiMacSpoofing(clusterVersion)) { + if (VirtFeatureSupported.antiMacSpoofing(clusterVersion)) { struct.add(VdsProperties.NW_FILTER, NetworkFilters.NO_MAC_SPOOFING.getFilterName()); } } -- To view, visit http://gerrit.ovirt.org/13490 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b8ef0769f8b4ad04dde9a23a2c3c9508d2e0e89 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shireesh Anjal <san...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches