]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes/fs: fix flake8 issues 43398/head
authorHargun Kaur <56452820+hkaur008@users.noreply.github.com>
Fri, 1 Oct 2021 22:39:33 +0000 (22:39 +0000)
committerGitHub <noreply@github.com>
Fri, 1 Oct 2021 22:39:33 +0000 (22:39 +0000)
Fixes: https://tracker.ceph.com/issues/51407
Signed-off-by: Hargun Kaur <hargunalone@gmail.com>
src/pybind/mgr/volumes/fs/operations/versions/subvolume_attrs.py

index ec7138cbdb6f291aeb03a7248564600c804c4751..f8a3c4a19af497d6a840e5f7c05d03449a62c2fe 100644 (file)
@@ -3,10 +3,11 @@ from enum import Enum, unique
 
 from ...exception import VolumeException
 
+
 @unique
 class SubvolumeTypes(Enum):
-    TYPE_NORMAL  = "subvolume"
-    TYPE_CLONE   = "clone"
+    TYPE_NORMAL = "subvolume"
+    TYPE_CLONE = "clone"
 
     @staticmethod
     def from_value(value):
@@ -17,15 +18,16 @@ class SubvolumeTypes(Enum):
 
         raise VolumeException(-errno.EINVAL, "invalid subvolume type '{0}'".format(value))
 
+
 @unique
 class SubvolumeStates(Enum):
-    STATE_INIT          = 'init'
-    STATE_PENDING       = 'pending'
-    STATE_INPROGRESS    = 'in-progress'
-    STATE_FAILED        = 'failed'
-    STATE_COMPLETE      = 'complete'
-    STATE_CANCELED      = 'canceled'
-    STATE_RETAINED      = 'snapshot-retained'
+    STATE_INIT = 'init'
+    STATE_PENDING = 'pending'
+    STATE_INPROGRESS = 'in-progress'
+    STATE_FAILED = 'failed'
+    STATE_COMPLETE = 'complete'
+    STATE_CANCELED = 'canceled'
+    STATE_RETAINED = 'snapshot-retained'
 
     @staticmethod
     def from_value(value):
@@ -46,16 +48,18 @@ class SubvolumeStates(Enum):
 
         raise VolumeException(-errno.EINVAL, "invalid state '{0}'".format(value))
 
+
 @unique
 class SubvolumeActions(Enum):
-    ACTION_NONE         = 0
-    ACTION_SUCCESS      = 1
-    ACTION_FAILED       = 2
-    ACTION_CANCELLED    = 3
-    ACTION_RETAINED     = 4
+    ACTION_NONE = 0
+    ACTION_SUCCESS = 1
+    ACTION_FAILED = 2
+    ACTION_CANCELLED = 3
+    ACTION_RETAINED = 4
+
 
 @unique
 class SubvolumeFeatures(Enum):
-    FEATURE_SNAPSHOT_CLONE          = "snapshot-clone"
-    FEATURE_SNAPSHOT_RETENTION      = "snapshot-retention"
-    FEATURE_SNAPSHOT_AUTOPROTECT    = "snapshot-autoprotect"
+    FEATURE_SNAPSHOT_CLONE = "snapshot-clone"
+    FEATURE_SNAPSHOT_RETENTION = "snapshot-retention"
+    FEATURE_SNAPSHOT_AUTOPROTECT = "snapshot-autoprotect"