From 439d502cd260eee25052f8b6caa911462548dcc7 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Fri, 2 Sep 2022 11:33:43 -0400 Subject: [PATCH] mgr/nfs: reformat long function calls to one line per arg Using a hand rolled version of the long function call style similar to that produced by the "Black" tool, put every argument to the create_export function on a line of its own. This makes the code easier to read and, importantly for an upcoming change, easier to add new arguments. Signed-off-by: John Mulligan --- src/pybind/mgr/nfs/module.py | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/pybind/mgr/nfs/module.py b/src/pybind/mgr/nfs/module.py index 403f89f3a973..ef4868d42e71 100644 --- a/src/pybind/mgr/nfs/module.py +++ b/src/pybind/mgr/nfs/module.py @@ -36,10 +36,16 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): squash: str = 'none', ) -> Tuple[int, str, str]: """Create a CephFS export""" - return self.export_mgr.create_export(fsal_type='cephfs', fs_name=fsname, - cluster_id=cluster_id, pseudo_path=pseudo_path, - read_only=readonly, path=path, - squash=squash, addr=client_addr) + return self.export_mgr.create_export( + fsal_type='cephfs', + fs_name=fsname, + cluster_id=cluster_id, + pseudo_path=pseudo_path, + read_only=readonly, + path=path, + squash=squash, + addr=client_addr, + ) @CLICommand('nfs export create rgw', perm='rw') def _cmd_nfs_export_create_rgw( @@ -53,11 +59,16 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule): squash: str = 'none', ) -> Tuple[int, str, str]: """Create an RGW export""" - return self.export_mgr.create_export(fsal_type='rgw', bucket=bucket, - user_id=user_id, - cluster_id=cluster_id, pseudo_path=pseudo_path, - read_only=readonly, squash=squash, - addr=client_addr) + return self.export_mgr.create_export( + fsal_type='rgw', + bucket=bucket, + user_id=user_id, + cluster_id=cluster_id, + pseudo_path=pseudo_path, + read_only=readonly, + squash=squash, + addr=client_addr, + ) @CLICommand('nfs export rm', perm='rw') def _cmd_nfs_export_rm(self, cluster_id: str, pseudo_path: str) -> Tuple[int, str, str]: -- 2.47.3