Skip to content

Commit

Permalink
mgr/nfs: fix flake8 missing whitespace around parameter equals error
Browse files Browse the repository at this point in the history
Signed-off-by: Varsha Rao <[email protected]>
  • Loading branch information
varshar16 committed May 14, 2021
1 parent 1ec90c8 commit 57dba10
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/pybind/mgr/nfs/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ def __init__(self, *args, **kwargs):
self.inited = True

@CLICommand('nfs export create cephfs', perm='rw')
def _cmd_nfs_export_create_cephfs(self, fsname: str, clusterid: str, binding: str,
readonly: bool=False, path: str='/') -> Tuple[int, str, str]:
def _cmd_nfs_export_create_cephfs(self,
fsname: str,
clusterid: str,
binding: str,
readonly: bool = False,
path: str = '/') -> Tuple[int, str, str]:
"""Create a cephfs export"""
# TODO Extend export creation for rgw.
return self.export_mgr.create_export(fsal_type='cephfs', fs_name=fsname,
Expand All @@ -38,7 +42,7 @@ def _cmd_nfs_export_delete(self, clusterid: str, binding: str) -> Tuple[int, str
return self.export_mgr.delete_export(cluster_id=clusterid, pseudo_path=binding)

@CLICommand('nfs export ls', perm='r')
def _cmd_nfs_export_ls(self, clusterid: str, detailed: bool=False) -> Tuple[int, str, str]:
def _cmd_nfs_export_ls(self, clusterid: str, detailed: bool = False) -> Tuple[int, str, str]:
"""List exports of a NFS cluster"""
return self.export_mgr.list_exports(cluster_id=clusterid, detailed=detailed)

Expand All @@ -54,7 +58,8 @@ def _cmd_nfs_export_update(self, inbuf: str) -> Tuple[int, str, str]:
return self.export_mgr.update_export(export_config=inbuf)

@CLICommand('nfs cluster create', perm='rw')
def _cmd_nfs_cluster_create(self, clusterid: str, placement: str=None) -> Tuple[int, str, str]:
def _cmd_nfs_cluster_create(self, clusterid: str,
placement: str = None) -> Tuple[int, str, str]:
"""Create an NFS Cluster"""
return self.nfs.create_nfs_cluster(cluster_id=clusterid, placement=placement)

Expand All @@ -74,7 +79,7 @@ def _cmd_nfs_cluster_ls(self) -> Tuple[int, str, str]:
return self.nfs.list_nfs_cluster()

@CLICommand('nfs cluster info', perm='r')
def _cmd_nfs_cluster_info(self, clusterid: str=None) -> Tuple[int, str, str]:
def _cmd_nfs_cluster_info(self, clusterid: str = None) -> Tuple[int, str, str]:
"""Displays NFS Cluster info"""
return self.nfs.show_nfs_cluster_info(cluster_id=clusterid)

Expand Down

0 comments on commit 57dba10

Please sign in to comment.