Merge pull request #42483 from Astroakanksha24/master

mgr/volumes/fs/operations/group.py: add extra blank lines

Reviewed-by: Varsha Rao <varao@redhat.com>
This commit is contained in:
Kefu Chai 2021-07-27 10:32:29 +08:00 committed by GitHub
commit 03ac43a4b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ from ..exception import VolumeException
log = logging.getLogger(__name__)
class Group(GroupTemplate):
# Reserved subvolume group name which we use in paths for subvolumes
# that are not assigned to a group (i.e. created with group=None)
@ -87,6 +88,7 @@ class Group(GroupTemplate):
return []
raise
def create_group(fs, vol_spec, groupname, pool, mode, uid, gid):
"""
create a subvolume group.
@ -141,6 +143,7 @@ def create_group(fs, vol_spec, groupname, pool, mode, uid, gid):
e = VolumeException(-e.args[0], e.args[1])
raise e
def remove_group(fs, vol_spec, groupname):
"""
remove a subvolume group.
@ -158,6 +161,7 @@ def remove_group(fs, vol_spec, groupname):
raise VolumeException(-errno.ENOENT, "subvolume group '{0}' does not exist".format(groupname))
raise VolumeException(-e.args[0], e.args[1])
@contextmanager
def open_group(fs, vol_spec, groupname):
"""
@ -181,6 +185,7 @@ def open_group(fs, vol_spec, groupname):
raise VolumeException(-e.args[0], e.args[1])
yield group
@contextmanager
def open_group_unique(fs, vol_spec, groupname, c_group, c_groupname):
if groupname == c_groupname: