Juan Hernandez has uploaded a new change for review.

Change subject: restapi: Always use "general" value of VdcFenceOptionTypes
......................................................................

restapi: Always use "general" value of VdcFenceOptionTypes

When the RESTAPI populates the "power_managers" section of the
capabilities resource it needs to know the option types used by the
power management options. Currently it does this retriving the version
specific version of the "VdcFenceOptionTypes" configuration parameter.
But the database only contains the "general" value of this parameter,
not the version specific values. This means that the RESTAPI will always
get the default value specified in the "ConfigValues" class, and this
doesn't contain some recently added types, like "encrypt_options". To
solve this problem this patch changes the RESTAPI so that it will always
retrieve the "general" version of this configuration parameter.

Change-Id: I140fac538ce1d7f146943ce5d8c80a2a787a5fc4
Signed-off-by: Juan Hernandez <[email protected]>
---
M 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendCapabilitiesResource.java
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/53/39453/1

diff --git 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendCapabilitiesResource.java
 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendCapabilitiesResource.java
index fc720be..aaa6a16 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendCapabilitiesResource.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendCapabilitiesResource.java
@@ -602,11 +602,11 @@
     }
 
     private List<PowerManagement> getPowerManagers(Version version) {
-        return 
FenceOptionsParser.parse(getFenceConfigurationValue(String.class,
-                ConfigurationValues.VdsFenceOptionMapping,
-                version),
-                getConfigurationValue(String.class, 
ConfigurationValues.VdsFenceOptionTypes, version),
-                true);
+        return FenceOptionsParser.parse(
+            getFenceConfigurationValue(String.class, 
ConfigurationValues.VdsFenceOptionMapping, version),
+            getConfigurationValueDefault(String.class, 
ConfigurationValues.VdsFenceOptionTypes),
+            true
+        );
     }
 
     private List<StorageType> getStorageTypes(Version version) {


-- 
To view, visit https://gerrit.ovirt.org/39453
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I140fac538ce1d7f146943ce5d8c80a2a787a5fc4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to