deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core] RHEV-M: Fixed API version checking due to backward incompatible XML
Date Mon, 02 Jan 2012 11:52:16 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 .../lib/deltacloud/drivers/rhevm/rhevm_client.rb   |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
index 50e433a..d662818 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
@@ -102,7 +102,11 @@ module RHEVM
       }
       headers.merge!(auth_header)
       result_xml = Nokogiri::XML(RHEVM::client(@api_entrypoint)["/"].get(headers))
-      (result_xml/'/api/system_version').first[:major].strip == major
+      if (result_xml/'api/system_version').empty?
+        (result_xml/'/api/product_info/version').first[:major].strip == major
+      else
+        (result_xml/'/api/system_version').first[:major].strip == major
+      end
     end
 
     def cluster_version?(cluster_id, major)
-- 
1.7.4.4


Mime
View raw message