Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
storagedriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
4
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8cf3e80b
authored
Apr 13, 2016
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storagedriver: rework delete_dump() with Ceph block device support
parent
4812fcce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
storagedriver.py
+7
-1
No files found.
storagedriver.py
View file @
8cf3e80b
...
@@ -76,8 +76,14 @@ def delete(disk_desc):
...
@@ -76,8 +76,14 @@ def delete(disk_desc):
@celery.task
()
@celery.task
()
def
delete_dump
(
data_store_type
,
di
sk_path
):
def
delete_dump
(
data_store_type
,
di
r
,
filename
):
if
data_store_type
==
"ceph_block"
:
with
CephConnection
(
str
(
dir
))
as
conn
:
rbd_inst
=
rbd
.
RBD
()
rbd_inst
.
remove
(
conn
.
ioctx
,
str
(
filename
))
else
:
disk_path
=
dir
+
"/"
+
filename
if
disk_path
.
endswith
(
".dump"
)
and
os
.
path
.
isfile
(
disk_path
):
if
disk_path
.
endswith
(
".dump"
)
and
os
.
path
.
isfile
(
disk_path
):
unlink
(
disk_path
)
unlink
(
disk_path
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment