deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1228089 - /deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
Date Fri, 06 Jan 2012 11:17:00 GMT
Author: mfojtik
Date: Fri Jan  6 11:17:00 2012
New Revision: 1228089

URL: http://svn.apache.org/viewvc?rev=1228089&view=rev
Log:
RHEV-M: Fixed API version checking due to backward incompatible XML

Modified:
    deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb

Modified: deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb
URL: http://svn.apache.org/viewvc/deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb?rev=1228089&r1=1228088&r2=1228089&view=diff
==============================================================================
--- deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb (original)
+++ deltacloud/trunk/server/lib/deltacloud/drivers/rhevm/rhevm_client.rb Fri Jan  6 11:17:00
2012
@@ -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)



Mime
View raw message