[
https://issues.apache.org/jira/browse/DTACLOUD-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13542945#comment-13542945
]
Ronelle Landy commented on DTACLOUD-364:
----------------------------------------
Looks to be fixed in Deltacloud commit version:
326df411e2e64eabaeb154bc13067234727d9088
curl --user "un:pw" -X POST
http://qe-blade-02.idm.lab.bos.redhat.com:3001/cimi/machines -H "Content-Type:
application/json" -d '{ "resourceURI":
"http://schemas.dmtf.org/cimi/1/MachineCreate", "name": "myMachine1",
"description": "My very first machine", "machineTemplate": { "machineConfig": {
"href":
"http://qe-blade-02.idm.lab.bos.redhat.com:3001/cimi/machine_configurations/m1-large"
}, "machineImage": { "href":
"http://qe-blade-02.idm.lab.bos.redhat.com:3001/cimi/machine_images/img3" } } }'
{"id":"http://qe-blade-02.idm.lab.bos.redhat.com:3001/cimi/machines/inst8","disks":{"href":"http://qe-blade-02.idm.lab.bos.redhat.com:3001/cimi/machines/inst8/disks"},"properties":{"machine_image":"http://qe-blade-02.idm.lab.bos.redhat.com:3001/cimi/machine_images/img3","credential":"http://qe-blade-02.idm.lab.bos.redhat.com:3001/cimi/credentials"},"description":"My
very first
machine","operations":[{"rel":"http://schemas.dmtf.org/cimi/1/action/restart","href":"http://qe-blade-02.idm.lab.bos.redhat.com:3001/cimi/machines/inst8/restart"},{"rel":"http://schemas.dmtf.org/cimi/1/action/stop","href":"http://qe-blade-02.idm.lab.bos.redhat.com:3001/cimi/machines/inst8/stop"},{"rel":"http://schemas.dmtf.org/cimi/1/action/capture","href":"http://qe-blade-02.idm.lab.bos.redhat.com:3001/cimi/machine_images"}],"name":"myMachine1","volumes":{"href":"http://qe-blade-02.idm.lab.bos.redhat.com:3001/cimi/machines/inst8/volumes"},"state":"STARTED","resourceURI":"http://schemas.dmtf.org/cimi/1/Machine","created":"2013-01-03T09:06:18-05:00","memory":10485760,"cpu":"1"}[rlandy@localhost
~]$
> base_driver.rb causes 500: [ArgumentError] wrong number of arguments (4 for 2)
> ------------------------------------------------------------------------------
>
> Key: DTACLOUD-364
> URL: https://issues.apache.org/jira/browse/DTACLOUD-364
> Project: DeltaCloud
> Issue Type: Bug
> Components: Server
> Reporter: Dies Koper
> Assignee: Michal Fojtik
> Priority: Minor
>
> Uncovered a bug while experimenting with adding machines with the mock driver.
> The bug is in base_driver.rb:107 and 112 (and possibly in other locations):
> raise BackendError.new(400, "bad-hardware-profile-name",
> "Hardware profile '#{name}' does not exist",
> nil)
> causes the error in the subject because exceptions.rb has:
> class BackendError < DeltacloudException
> def initialize(e, message=nil)
> To reproduce:
> curl --user "mockuser:mockpassword" -X POST
> http://localhost:3001/cimi/machines -H "Content-Type: application/json" -d
> @post.json
> with post.json having:
> { "resourceURI": "http://schemas.dmtf.org/cimi/1/MachineCreate", "name":
> "myMachine1", "description": "My very first machine", "machineTemplate": {
> "machineConfig": { "href":
> "http://localhost:3001/cimi/machine_configurations/economy" },
> "machineImage": { "href":
> "http://localhost:3001/cimi/machine_images/IMG_3c9820_S24FWXU0Q9VH0JK" } } }
--
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