Ronelle Landy created DTACLOUD-449:
--------------------------------------
Summary: POST api/instances - creating an instance for the Vsphere
provider without a name parameters results in the wrong id being returned
Key: DTACLOUD-449
URL: https://issues.apache.org/jira/browse/DTACLOUD-449
Project: DeltaCloud
Issue Type: Bug
Components: Native/Frontend
Environment: Deltacloud commit version:
3ecb4feeefab8af9481a7a74aa70ba9f4ce7d87a
Vsphere 5.x
Reporter: Ronelle Landy
Creating an instance for the Vsphere provider without passing a 'name'
parameter, results in a '201 created' response but, no id or name is returned.
I am not sure if the instance is ever created in reality - hard to track it
without a name and/or id returned.
If name is a required parameter, then the POST command should not return a 201.
My guess here is that the instance is not actually created.
curl -v -X POST -F "image_id=AutoImageImport-DoNotDelete" --user 'un:pw'
"http://localhost:3001/api/instances?format=xml"
* About to connect() to localhost port 3001 (#0)
* Trying ::1...
* Connection refused
* Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 3001 (#0)
* Server auth using Basic with user 'Administrator'
> POST /api/instances?format=xml HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpSM2RoYXQh
> User-Agent: curl/7.24.0 (x86_64-redhat-linux-gnu) libcurl/7.24.0 NSS/3.13.5.0
> zlib/1.2.5 libidn/1.24 libssh2/1.4.1
> Host: localhost:3001
> Accept: */*
> Content-Length: 170
> Expect: 100-continue
> Content-Type: multipart/form-data;
> boundary=----------------------------21710f3b9c16
>
* Done waiting for 100-continue
< HTTP/1.1 201 Created
< Content-Type: application/xml
< Location: http://localhost:3001/api/instances
< Server: Apache-Deltacloud/1.1.0
< X-Deltacloud-Driver: vsphere
< X-Deltacloud-Provider: 10.16.120.33
< Content-Length: 632
< ETag: 9d8aa012613a1e4df0eaf0e63ad425e1
< Cache-Control: max-age=0, private, must-revalidate
< Date: Thu, 31 Jan 2013 16:09:07 GMT
< Connection: keep-alive
<
<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3001/api/instances'>
<owner_id>Administrator</owner_id>
<image href='http://localhost:3001/api/images/AutoImageImport-DoNotDelete'
id='AutoImageImport-DoNotDelete'></image>
<realm href='http://localhost:3001/api/realms/datastore1'
id='datastore1'></realm>
<state>PENDING</state>
<hardware_profile href='http://localhost:3001/api/hardware_profiles/default'
id='default'>
</hardware_profile>
<actions>
</actions>
<public_addresses></public_addresses>
<private_addresses></private_addresses>
<storage_volumes></storage_volumes>
</instance>
--
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