]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/volumes/fs/operations: fix various flake8 issues
authorGokcen Iskender <gokceng@gmail.com>
Fri, 1 Oct 2021 21:59:06 +0000 (14:59 -0700)
committerGokcen Iskender <gokceng@gmail.com>
Fri, 1 Oct 2021 22:09:07 +0000 (15:09 -0700)
Fixes: https://tracker.ceph.com/issues/51398
Signed-off-by: Gokcen Iskender <gokceng@gmail.com>
src/pybind/mgr/volumes/fs/operations/subvolume.py

index dc36477b54ed6112fe4c89041fafa6bf6311872c..eed34db6ee2e5050492977ce9ea7fad480a6b8b2 100644 (file)
@@ -1,8 +1,5 @@
-import os
-import errno
 from contextlib import contextmanager
 
-from ..exception import VolumeException
 from .template import SubvolumeOpType
 
 from .versions import loaded_subvolumes
@@ -25,6 +22,7 @@ def create_subvol(mgr, fs, vol_spec, group, subvolname, size, isolate_nspace, po
     subvolume = loaded_subvolumes.get_subvolume_object_max(mgr, fs, vol_spec, group, subvolname)
     subvolume.create(size, isolate_nspace, pool, mode, uid, gid)
 
+
 def create_clone(mgr, fs, vol_spec, group, subvolname, pool, source_volume, source_subvolume, snapname):
     """
     create a cloned subvolume.
@@ -42,6 +40,7 @@ def create_clone(mgr, fs, vol_spec, group, subvolname, pool, source_volume, sour
     subvolume = loaded_subvolumes.get_subvolume_object_max(mgr, fs, vol_spec, group, subvolname)
     subvolume.create_clone(pool, source_volume, source_subvolume, snapname)
 
+
 def remove_subvol(mgr, fs, vol_spec, group, subvolname, force=False, retainsnaps=False):
     """
     remove a subvolume.
@@ -57,6 +56,7 @@ def remove_subvol(mgr, fs, vol_spec, group, subvolname, force=False, retainsnaps
     with open_subvol(mgr, fs, vol_spec, group, subvolname, op_type) as subvolume:
         subvolume.remove(retainsnaps)
 
+
 @contextmanager
 def open_subvol(mgr, fs, vol_spec, group, subvolname, op_type):
     """