Bug 772316

Summary: Error when accessing Deltacloud API - Vsphere provider; deltacloud-core-0.5.0
Product: [Retired] CloudForms Cloud Engine Reporter: Ronelle Landy <rlandy>
Component: deltacloud-coreAssignee: Michal Fojtik <mfojtik>
Status: CLOSED CURRENTRELEASE QA Contact: Ronelle Landy <rlandy>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: rananda, whayutin
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-30 17:13:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Screenshot of API Entry page none

Description Ronelle Landy 2012-01-06 19:36:30 UTC
Description of problem:

The following error is displayed when accessing the deltacloud API (Entry page in the GUI and from server:portNumber/api from the API):

NoMethodError - undefined method `keys' for nil:NilClass
 

Version-Release number of selected component (if applicable):
deltacloud-core-0.5.0

How reproducible:


Steps to Reproduce:
1. On RHEL 6, install Deltacloud from http://people.apache.org/~lutter/deltacloud/0.5.0/rc1/
2. Start a server : API_PROVIDER=providerURL ./bin/deltacloudd -i vsphere -r serverName -p 3006
3.Execute: curl -X GET --user 'Username:pwd' "http://server:3006/api?format=xml" or access the GUI Entry page http://server:3006/api
  
Actual results:

curl -X GET --user 'Username:pwd' "http://server:3006/api?format=xml"
<error status='500' url='/api?format=xml'>
  <kind>backend_error</kind>
  <backend driver='vsphere'>
    <code>500</code>
  </backend>
  <message><![CDATA[undefined method `keys' for nil:NilClass]]></message>
</error>


Expected results:

The collections available for Vsphere provider should be listed or displayed.

Additional info:

Comment 1 Ronelle Landy 2012-01-08 02:33:00 UTC
This has been fixed in: http://people.apache.org/~lutter/deltacloud/0.5.0/rc1/. 
See: https://issues.apache.org/jira/browse/DTACLOUD-124

>> curl -X GET --user 'username:password' "http://server:3006/api?format=xml"
<api driver='vsphere' version='0.5.0'>
  <link href='http://server:3006/api/realms' rel='realms'>
  </link>
  <link href='http://server.com:3006/api/storage_snapshots' rel='storage_snapshots'>
  </link>
  <link href='http://server:3006/api/images' rel='images'>
  </link>
  <link href='http://server:3006/api/instances' rel='instances'>
    <feature name='user_iso'>
    </feature>
    <feature name='user_data'>
    </feature>
    <feature name='user_name'>
    </feature>
  </link>
  <link href='http://server:3006/api/storage_volumes' rel='storage_volumes'>
  </link>
  <link href='http://server:3006/api/hardware_profiles' rel='hardware_profiles'>
  </link>
  <link href='http://server:3006/api/instance_states' rel='instance_states'>
  </link>
  <link href='http://server:3006/api/drivers' rel='drivers'>
  </link>
</api>

Comment 2 wes hayutin 2012-01-09 21:38:59 UTC
moving to on_qa based on Ronelle's comments

Comment 3 Ronelle Landy 2012-01-10 16:12:00 UTC
Created attachment 551879 [details]
Screenshot of API Entry page

Comment 4 Ronelle Landy 2012-01-10 16:14:28 UTC
Verified according to attached screenshot and and API output copied in Comment 1 above.

Comment 5 wes hayutin 2012-01-12 16:16:14 UTC
bugs in verified or on_qa moving off tracker