[
https://issues.apache.org/jira/browse/DTACLOUD-481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ronelle Landy closed DTACLOUD-481.
----------------------------------
Fixed in deltacloud-core gem under test on 03/12/2013 (post 1.1.1)
- A STOPPED instance advertises a destroy/delete operation
- Can delete a STOPPED instance
- but ... (possible issue) can also delete a RUNNING instance and
destroy/delete operation is advertised for a RUNNING instance
However marking this JIRA as fixed because the major issue was the inability to
delete a stopped instance and that works now:
Check the instance is STOPPED:
>> curl -X GET --user "un:pw" "localhost:3001/api/instances?format=xml"<?xml
>> version='1.0' encoding='utf-8' ?>
<instances>
<instance href='http://localhost:3001/api/instances/122188' id='122188'>
<name>inst-1363103219</name>
<owner_id></owner_id>
<image href='http://localhost:3001/api/images/43462' id='43462'></image>
<realm href='http://localhost:3001/api/realms/1' id='1'></realm>
<state>STOPPED</state>
<hardware_profile href='http://localhost:3001/api/hardware_profiles/66'
id='66'>
</hardware_profile>
<actions>
<link href='http://localhost:3001/api/instances/122188/start'
method='post' rel='start' />
<link href='http://localhost:3001/api/instances/122188' method='delete'
rel='destroy' />
</actions>
<public_addresses><address
type='ipv4'>198.211.110.177</address></public_addresses>
<private_addresses></private_addresses>
<storage_volumes></storage_volumes>
<authentication type='key'>
</authentication>
</instance>
</instances>
Now delete it ...
>> curl -v -X DELETE --user "un:pw"
>> "localhost:3001/api/instances/122188?format=xml"
> DELETE /api/instances/122188?format=xml HTTP/1.1
< HTTP/1.1 204 No Content
> Digitalocean driver: Can't delete an STOPPED instance - delete op advertized
> on a RUNNING instance only
> --------------------------------------------------------------------------------------------------------
>
> Key: DTACLOUD-481
> URL: https://issues.apache.org/jira/browse/DTACLOUD-481
> Project: DeltaCloud
> Issue Type: Bug
> Components: Native/Frontend
> Environment: Deltacloud 1.1.1 - gem under test
> Digitalocean driver
> Reporter: Ronelle Landy
> Assignee: Michal Fojtik
>
> Note that the only op returned for a STOPPED instance below is /start:
> >> curl -X GET --user "un:pw"
> >> "intel-canoepass-09.lab.bos.redhat.com:3001/api/instances/102465?format=xml"
> <?xml version='1.0' encoding='utf-8' ?>
> <instance
> href='http://intel-canoepass-09.lab.bos.redhat.com:3001/api/instances/102465'
> id='102465'>
> <name>inst1360936592</name>
> <owner_id>....</owner_id>
> <image
> href='http://intel-canoepass-09.lab.bos.redhat.com:3001/api/images/43462'
> id='43462'></image>
> <realm
> href='http://intel-canoepass-09.lab.bos.redhat.com:3001/api/realms/1'
> id='1'></realm>
> <state>STOPPED</state>
> <hardware_profile
> href='http://intel-canoepass-09.lab.bos.redhat.com:3001/api/hardware_profiles/70'
> id='70'>
> </hardware_profile>
> <actions>
> <link
> href='http://intel-canoepass-09.lab.bos.redhat.com:3001/api/instances/102465/start'
> method='post' rel='start' />
> </actions>
> <public_addresses><address
> type='ipv4'>192.81.218.93</address></public_addresses>
> <private_addresses></private_addresses>
> <storage_volumes></storage_volumes>
> </instance>
> Error when attempting to delete a stopped instance:
> >> curl -X DELETE --user "un:pw"
> >> "intel-canoepass-09.lab.bos.redhat.com:3001/api/instances/102465?format=xml"
> <error status='405' url='/api/instances/102465'>
> <message>
> Requested method not allowed
> </message>
> <method>
> DELETE
> </method>
> </error>
> Note that the RUNNING instance advertises the destroy op:
> .........
> <state>RUNNING</state>
> <hardware_profile
> href='http://intel-canoepass-09.lab.bos.redhat.com:3001/api/hardware_profiles/70'
> id='70'>
> </hardware_profile>
> <actions>
> <link
> href='http://intel-canoepass-09.lab.bos.redhat.com:3001/api/instances/102465/reboot'
> method='post' rel='reboot' />
> <link
> href='http://intel-canoepass-09.lab.bos.redhat.com:3001/api/instances/102465/stop'
> method='post' rel='stop' />
> <link
> href='http://intel-canoepass-09.lab.bos.redhat.com:3001/api/instances/102465'
> method='delete' rel='destroy' />
> </actions>
> .........
--
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