[Engine-devel] Fwd: Change in ovirt-engine[master]: engine: Add FeatureSupported class
Mike Kolesnik
mkolesni at redhat.com
Wed Jan 2 06:37:48 UTC 2013
Hi all,
I've added a new class FeatueSupported.
The purpose of the class is to encapsulate all the calls to "feature support" config values.
I think it will be better to add all "feature support" calls to this class from now on, as it makes it easier to read the code and also abstracts the actual implementation details from us (the configuration mechanism that is currently used for this).
For example, instead of writing:
Config.<Boolean> GetValue(ConfigValues.NetworkLinkingSupported, getVm().getVdsGroupCompatibilityVersion().getValue())
We write:
FeatureSupported.networkLinking(getVm().getVdsGroupCompatibilityVersion())
I'm sure you can agree that the later one makes more sense and is easier to understand when looking at the code.
Regards,
Mike
-------- Original Message --------
Subject: Change in ovirt-engine[master]: engine: Add FeatureSupported class
Date: Sun, 30 Dec 2012 09:40:19 -0500
From: mkolesni at redhat.com
Reply-To: engine-devel at ovirt.org
To: undisclosed-recipients:;
Mike Kolesnik has submitted this change and it was merged.
Change subject: engine: Add FeatureSupported class
......................................................................
engine: Add FeatureSupported class
This is a convenience class that allows to check if a feature is
supported for a given version while keeping the actual implementation
decoupled from the code.
Future patches can add more features except the one extracted here.
Change-Id: I9d0adb696f3767ce165bfd9e78ba76a68778c91a
Signed-off-by: Mike Kolesnik <mkolesni at redhat.com>
---
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/vm/UpdateVmInterfaceCommand.java
A
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/FeatureSupported.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmNicValidator.java
4 files changed, 32 insertions(+), 12 deletions(-)
Approvals:
Mike Kolesnik: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/10486
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9d0adb696f3767ce165bfd9e78ba76a68778c91a
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Mike Kolesnik <mkolesni at redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkolesni at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Muli Salem <msalem at redhat.com>
_______________________________________________
Engine-commits mailing list
Engine-commits at ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-commits
More information about the Engine-devel
mailing list