deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marios Andreou (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DTACLOUD-258) opennebula driver requesting /api/hardware_profiles
Date Tue, 10 Jul 2012 14:44:35 GMT

     [ https://issues.apache.org/jira/browse/DTACLOUD-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marios Andreou updated DTACLOUD-258:
------------------------------------

    Attachment: 0001-Fix-for-JIRA-DTACLOUD_258-opennebula-xml-sent-back-f.patch

Hi Christian,

ok - so this one I could reproduce. As with https://issues.apache.org/jira/browse/DTACLOUD-257
it seems to be an incompatibility issue with the version of ON OCCI endpoint running at http://occi.c12g.com
and the current version of the ON driver in Deltacloud. I'll be pinging the ON guys to see
what their plans are wrt to our driver. In the meantime  the attached patch should resolve
this specific issue for you, thanks for taking the time, 

all the best, marios

==========

more detail/debug info:

xml returned for get('/instance_type?verbose=yes') in lib/deltacloud/drivers/opennebula/occi_client.rb
71     def get_instance_types looks like:

"<INSTANCE_TYPE_COLLECTION><INSTANCE_TYPE href=\"http://:4567/instance_type/large\"
name=\"large\"><ID>large</ID><NAME>large</NAME><CPU>8</CPU><MEMORY>8192</MEMORY></INSTANCE_TYPE><INSTANCE_TYPE
href=\"http://:4567/instance_type/medium\" name=\"medium\"><ID>medium</ID><NAME>medium</NAME><CPU>4</CPU><MEMORY>4096</MEMORY></INSTANCE_TYPE><INSTANCE_TYPE
href=\"http://:4567/instance_type/small\" name=\"small\"><ID>small</ID><NAME>small</NAME><CPU>1</CPU><MEMORY>1024</MEMORY></INSTANCE_TYPE></INSTANCE_TYPE_COLLECTION>"

Two things to notice - 

1. there is no 'STORAGE' or 'ARCHITECTURE' - these may have been present previously as the
driver was trying to capture them

2. The xml parsing previously was like "elem['CPU']" - but I had to change this to "elem['CPU'].text"
to grab the actual values.


                
> opennebula driver requesting /api/hardware_profiles
> ---------------------------------------------------
>
>                 Key: DTACLOUD-258
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-258
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment: ruby1.8, deltacloud-core-1.0.0, deltacloud-core-head
>            Reporter: Christian Karnath
>            Assignee: Marios Andreou
>         Attachments: 0001-Fix-for-JIRA-DTACLOUD_258-opennebula-xml-sent-back-f.patch
>
>
> When requesting /api/hardware_profiles the following error occurs: 
> NoMethodError - undefined method `<=>' for <CPU> ... </>:REXML::Element:

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message