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

Marios Andreou updated DTACLOUD-448:
------------------------------------

    Attachment: 0001-CIMI-bug-create-CIMI-db-resource-with-no-properties-.patch

attache patch should fix this issue... bug manifests when you try to create a 
cimi db resource without setting any 'property' attributes... eg:

curl -v --user "mockuser:mockpassword" -X POST -d '{"resourceURI": 
"http://schemas.dmtf.org/cimi/1/MachineTemplateCreate","name": 
"myMachineDemoTemplate","description": "My very loved machine 
template","machineConfig": { "href": 
"http://localhost:3001/cimi/machine_configurations/m1-xlarge"; },"machineImage": 
{ "href": "http://localhost:3001/cimi/machine_images/img3"; }}' -H 
"Content-Type: application/json"  -H "Accept: application/json" 
http://localhost:3001/cimi/machine_templates


attached patch fixes this for address_template, machine_template, 
volume_configuration and volume_template.  testing please :)
                
>  500 Error when creating a machine template with no properties
> --------------------------------------------------------------
>
>                 Key: DTACLOUD-448
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-448
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>            Reporter: Martha Chumo
>            Assignee: Marios Andreou
>         Attachments: 
> 0001-CIMI-bug-create-CIMI-db-resource-with-no-properties-.patch
>
>
> Here is part of the error trace-->
> 127.0.0.1 - - [31/Jan/2013 13:09:06] "POST /cimi/machine_templates HTTP/1.1" 
> 500 1818 1.1468
> E, [2013-01-31T13:09:07.481446 #7345] ERROR -- 500: [NoMethodError] undefined 
> method `inject' for nil:NilClass
> /home/martha/.rvm/gems/ruby-1.9.3-p194/gems/deltacloud-core-1.1.0/lib/cimi/models/machine_template.rb:74:in
>  `create_from_xml'
> /home/martha/.rvm/gems/ruby-1.9.3-p194/gems/deltacloud-core-1.1.0/lib/cimi/collections/machine_templates.rb:51:in
>  `block (3 levels) in <class:MachineTemplates>'
> /home/martha/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-rabbit-1.1.3/lib/sinatra/rabbit/base.rb:396:in
>  `instance_eval'
> /home/martha/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-rabbit-1.1.3/lib/sinatra/rabbit/base.rb:396:in
>  `block in control'

--
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

Reply via email to