Omer Frenkel has posted comments on this change.

Change subject: Verify vdsm cluster level support before send getHardwareInfo 
request
......................................................................


Patch Set 2: (2 inline comments)

....................................................
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
Line 514:         vdsBrokerCommand.Execute();
Line 515:         if (vdsBrokerCommand.getVDSReturnValue().getSucceeded()) {
Line 516:             // Verify version capabilities
Line 517:             String clusterCompatibility = 
vds.getvds_group_compatibility_version().getValue();
Line 518:             List<String> hostVersions = 
Arrays.asList(vds.getsupported_cluster_levels().split("[,]", -1));
you can use vds.getSupportedClusterVersionsSet() which already do this work for 
you, just remember it can be null
Line 519:             if (hostVersions.contains(clusterCompatibility) &&
Line 520:                     Config.<Boolean> 
GetValue(ConfigValues.HardwareInfoEnabled, clusterCompatibility)) {
Line 521:                 VDSReturnValue ret = 
ResourceManager.getInstance().runVdsCommand(VDSCommandType.GetHardwareInfo,
Line 522:                         new VdsIdAndVdsVDSCommandParametersBase(vds));


Line 516:             // Verify version capabilities
Line 517:             String clusterCompatibility = 
vds.getvds_group_compatibility_version().getValue();
Line 518:             List<String> hostVersions = 
Arrays.asList(vds.getsupported_cluster_levels().split("[,]", -1));
Line 519:             if (hostVersions.contains(clusterCompatibility) &&
Line 520:                     Config.<Boolean> 
GetValue(ConfigValues.HardwareInfoEnabled, clusterCompatibility)) {
if you are touching this code already,
there is a class introduced lately to encapsulate config checks related to 
features which are enabled per version: FeatureSupported,
please use it
Line 521:                 VDSReturnValue ret = 
ResourceManager.getInstance().runVdsCommand(VDSCommandType.GetHardwareInfo,
Line 522:                         new VdsIdAndVdsVDSCommandParametersBase(vds));
Line 523:                 if (!ret.getSucceeded()) {
Line 524:                     AuditLogableBase logable = new 
AuditLogableBase(vds.getId());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I240786444bdf393f6df4e53daf94d0ee197ecb73
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to