]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs: reformat long function calls to one line per arg
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 2 Sep 2022 15:33:43 +0000 (11:33 -0400)
committerAdam King <adking@redhat.com>
Mon, 30 Jan 2023 23:41:57 +0000 (18:41 -0500)
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 <jmulligan@redhat.com>
(cherry picked from commit 439d502cd260eee25052f8b6caa911462548dcc7)

src/pybind/mgr/nfs/module.py

index 403f89f3a97367061a5d9cbc1624773b84a9cec5..ef4868d42e719b83354bd399db5a6785aafcff1b 100644 (file)
@@ -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]: