[
https://issues.apache.org/jira/browse/DTACLOUD-321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michal Fojtik closed DTACLOUD-321.
----------------------------------
Resolution: Fixed
Assignee: Michal Fojtik
> CIMI models does not respond to methods correctly
> -------------------------------------------------
>
> Key: DTACLOUD-321
> URL: https://issues.apache.org/jira/browse/DTACLOUD-321
> Project: DeltaCloud
> Issue Type: Bug
> Reporter: Michal Fojtik
> Assignee: Michal Fojtik
>
> Sorry for weird bug title but I can't figure out how to better describe this
> behaviour ;-).
> I'm fixing CIMI client and I got a weird error when I tried to access
> MachineImage collection:
> NoMethodError - undefined method `machine_images' for
> #<CIMI::Model::MachineImageCollection:0x007ff6cacbc938>:
>
> /Users/mfojtik/code/core/clients/cimi/lib/entities/machine_image.rb:27:in
> `block in <class:MachineImage>'
> It seems like the MachineImageCollection object was created with all values
> set:
> #<CIMI::Model::MachineImageCollection:0x007ffd71327898
> @attribute_values={:id=>"http://localhost:3001/cimi/machine_images",
> :name=>"default", :description=>"Mock MachineImageCollection",
> :created=>"2012-09-14 13:26:59 +0200", :property=>{}, :count=>"4",
> :machine_images=>[#<struct
> id="http://localhost:3001/cimi/machine_images/img2", name="img2",
> description="Fedora 10", created="2012-09-14 13:26:59 +0200", property={},
> image_location=#<struct href="mock://img2">, image_data=nil, operations=[]>,
> #<struct id="http://localhost:3001/cimi/machine_images/img1", name="img1",
> description="Fedora 10", created="2012-09-14 13:26:59 +0200", property={},
> image_location=#<struct href="mock://img1">, image_data=nil, operations=[]>,
> #<struct id="http://localhost:3001/cimi/machine_images/img3", name="img3",
> description="JBoss", created="2012-09-14 13:26:59 +0200", property={},
> image_location=#<struct href="mock://img3">, image_data=nil, operations=[]>,
> #<struct id="http://localhost:3001/cimi/machine_images/img1-test",
> name="img1-test", description="Test1", created="2012-09-14 13:26:59 +0200",
> property={}, image_location=#<struct href="mock://img1-test">,
> image_data=nil, operations=[]>]}>
> However, when I call '.machine_images' on that object I got NoMethodError. I
> dunno If I'm doing something wrong or this is a bug :-)
> Also I can see the ':machine_images' attribute in MachineImagesCollection
> model.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira