Merge PR #43390 into master

* refs/pull/43390/head:
	mgr/volumes/fs/operations : Fix flake8 issues

Reviewed-by: Varsha Rao <rvarsha016@gmail.com>
This commit is contained in:
Patrick Donnelly 2021-10-05 20:14:49 -04:00
commit 7f6aa14be5
No known key found for this signature in database
GPG Key ID: BE69BB7D36E459B4

View File

@ -1,7 +1,6 @@
import os
import uuid
import stat
import errno
import logging
from contextlib import contextmanager
@ -13,6 +12,7 @@ from ..fs_util import list_one_entry_at_a_time
log = logging.getLogger(__name__)
class CloneIndex(Index):
SUB_GROUP_NAME = "clone"
PATH_MAX = 4096
@ -81,6 +81,7 @@ class CloneIndex(Index):
except cephfs.Error as e:
raise IndexException(-e.args[0], e.args[1])
def create_clone_index(fs, vol_spec):
clone_index = CloneIndex(fs, vol_spec)
try:
@ -88,6 +89,7 @@ def create_clone_index(fs, vol_spec):
except cephfs.Error as e:
raise IndexException(-e.args[0], e.args[1])
@contextmanager
def open_clone_index(fs, vol_spec):
clone_index = CloneIndex(fs, vol_spec)