Revert "cinder backup force-delete when backup is error"

force-delete feature is backend specific and not implemented by ceph.
It return 405 in case of ceph.
http://logs.openstack.org/01/458201/2/check/gate-tempest-dsvm-full-ceph-plugin-src-glance_store-ubuntu-xenial/d058f29/logs/testr_results.html.gz

Currently it block the glance_store gate where ceph job is voting.
Let's revert this for now and discuss such backend specific feature
should be tested on Tempest side or not.

This reverts commit 31169e21d6.

Related-Bug: #1687538
Change-Id: I81c0911812945f8ada7c09fe98690aabacb0eda1
This commit is contained in:
Ghanshyam Mann 2017-05-02 04:55:47 +00:00
parent 31169e21d6
commit b0d15bfefb
4 changed files with 5 additions and 29 deletions

View File

@ -1,9 +0,0 @@
---
features:
- |
As in the [doc]:
https://developer.openstack.org/api-ref/block-storage/v3/
#force-delete-a-backup.
* Force-deletes a backup(v2)

View File

@ -121,7 +121,7 @@ class VolumesBackupsAdminV2Test(base.BaseVolumeAdminTest):
'available')
@decorators.idempotent_id('47a35425-a891-4e13-961c-c45deea21e94')
def test_volume_backup_reset_status_force_delete(self):
def test_volume_backup_reset_status(self):
# Create a volume
volume = self.create_volume()
# Create a backup
@ -136,6 +136,3 @@ class VolumesBackupsAdminV2Test(base.BaseVolumeAdminTest):
status="error")
waiters.wait_for_volume_resource_status(self.admin_backups_client,
backup['id'], 'error')
# Force delete a backup volume when backup is in error state.
self.admin_backups_client.force_delete_backup(backup['id'])
self.admin_backups_client.wait_for_resource_deletion(backup['id'])

View File

@ -125,20 +125,16 @@ class BaseVolumeTest(tempest.test.BaseTestCase):
snapshot['id'], 'available')
return snapshot
def create_backup(self, volume_id, backup_client=None,
wait_until="available", **kwargs):
def create_backup(self, volume_id, backup_client=None, **kwargs):
"""Wrapper utility that returns a test backup."""
if backup_client is None:
backup_client = self.backups_client
backup = backup_client.create_backup(
volume_id=volume_id, **kwargs)['backup']
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
backup_client.delete_backup, backup['id'])
waiters.wait_for_volume_resource_status(backup_client,
backup['id'],
wait_until)
self.addCleanup(backup_client.delete_backup, backup['id'])
waiters.wait_for_volume_resource_status(backup_client, backup['id'],
'available')
return backup
# NOTE(afazekas): these create_* and clean_* could be defined

View File

@ -55,14 +55,6 @@ class BackupsClient(rest_client.RestClient):
self.expected_success(202, resp.status)
return rest_client.ResponseBody(resp, body)
def force_delete_backup(self, backup_id):
"""Force delete a backup volume."""
post_body = json.dumps({'os-force_delete': {}})
url = 'backups/%s/action' % backup_id
resp, body = self.post(url, post_body)
self.expected_success(202, resp.status)
return rest_client.ResponseBody(resp)
def show_backup(self, backup_id):
"""Returns the details of a single backup."""
url = "backups/%s" % backup_id