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

Ronelle Landy closed DTACLOUD-449.
----------------------------------

    Resolution: Fixed

Closing JIRA issue as fixed in deltacloud 1.1.2:

Instance created with no name parameter gets a random default name:

curl -X POST -F "image_id=AutoImageImport-DoNotDelete" --user 'un:pw' 
"http://localhost:3008/api/instances?format=xml";


curl -X GET --user 'un:pw' 
"http://localhost:3008/api/instances/inst1363634220?format=xml";
<?xml version='1.0' encoding='utf-8' ?>
<instance href='http://localhost:3008/api/instances/inst1363634220' 
id='inst1363634220'>
  <name>inst1363634220</name>
  <owner_id>Administrator</owner_id>
  <image href='http://localhost:3008/api/images/AutoImageImport-DoNotDelete' 
id='AutoImageImport-DoNotDelete'></image>
  <realm href='http://localhost:3008/api/realms/datastore1' 
id='datastore1'></realm>
  <state>RUNNING</state>
  <hardware_profile href='http://localhost:3008/api/hardware_profiles/default' 
id='default'>
    <property kind='fixed' name='memory' unit='MB' value='512'></property>
    <property kind='fixed' name='storage' unit='GB' 
value='11321488456'></property>
    <property kind='fixed' name='cpu' unit='count' value='1'></property>
  </hardware_profile>
  <actions>
    <link href='http://localhost:3008/api/instances/inst1363634220/reboot' 
method='post' rel='reboot' />
    <link href='http://localhost:3008/api/instances/inst1363634220/stop' 
method='post' rel='stop' />
    <link href='http://localhost:3008/api/images;instance_id=inst1363634220' 
method='post' rel='create_image' />
  </actions>
  <launch_time>2013-03-18 22:19:17 UTC</launch_time>
  <public_addresses><address 
type='mac'>00:50:56:92:7d:24</address></public_addresses>
  <private_addresses></private_addresses>
  <storage_volumes></storage_volumes>
</instance>

                
> POST api/instances - creating an instance for the Vsphere provider, without a 
> name parameter, returns a 201 but no id or name
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 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

Reply via email to