deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@redhat.com
Subject [PATCH] Fix for JIRA DTACLOUD_258 - opennebula xml sent back from http://occi.c12g.com
Date Tue, 10 Jul 2012 14:36:14 GMT
From: marios <marios@redhat.com>

https://issues.apache.org/jira/browse/DTACLOUD-258

Seems the latest version of ON OCCI endpoint running at http://occi.c12g.com
is not compatible with our 'older' version of the opennebula driver (3.2?)

Signed-off-by: marios <marios@redhat.com>
---
 .../drivers/opennebula/opennebula_driver.rb        |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/lib/deltacloud/drivers/opennebula/opennebula_driver.rb b/server/lib/deltacloud/drivers/opennebula/opennebula_driver.rb
index cc1f13e..b44482e 100644
--- a/server/lib/deltacloud/drivers/opennebula/opennebula_driver.rb
+++ b/server/lib/deltacloud/drivers/opennebula/opennebula_driver.rb
@@ -45,10 +45,10 @@ class OpennebulaDriver < Deltacloud::BaseDriver
       @hardware_profiles = REXML::Document.new(xml).root.elements.map {|d|
         elem = d.elements
         ::Deltacloud::HardwareProfile.new(elem['NAME'].text) {
-          cpu          elem['CPU']
-          memory       elem['MEMORY']
-          storage      elem['STORAGE']
-          architecture elem['ARCHITECTURE']
+          cpu          elem['CPU'].text if elem['CPU']
+          memory       elem['MEMORY'].text if elem['MEMORY']
+          storage      elem['STORAGE'].text  if elem['STORAGE']
+          architecture elem['ARCHITECTURE'].text if elem['ARCHITECTURE']
         }
       }
     end
-- 
1.7.6.5


Mime
View raw message