]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/nfs: 'nfs export get' -> 'nfs export info'
authorSage Weil <sage@newdream.net>
Fri, 18 Jun 2021 15:01:32 +0000 (11:01 -0400)
committerSage Weil <sage@newdream.net>
Mon, 21 Jun 2021 18:13:15 +0000 (14:13 -0400)
This is a breaking change, but aligns the CLI verbs with the rest of ceph.

Signed-off-by: Sage Weil <sage@newdream.net>
doc/cephfs/fs-nfs-exports.rst
doc/dev/vstart-ganesha.rst [new file with mode: 0644]
qa/tasks/cephfs/test_nfs.py
src/pybind/mgr/nfs/module.py

index a152be661ab6a9731606a03c0e8b7fcc6c32a3c5..76532f83304302ac8a6e7524180b6ff413872175 100644 (file)
@@ -262,7 +262,7 @@ Get CephFS Export
 
 .. code:: bash
 
-    $ ceph nfs export get <clusterid> <pseudo-path>
+    $ ceph nfs export info <clusterid> <pseudo-path>
 
 This displays export block for a cluster based on pseudo root name,
 where:
@@ -279,7 +279,7 @@ An existing export can be dumped in JSON format with:
 
 .. prompt:: bash #
 
-    ceph nfs export get *<pseudo-path>*
+    ceph nfs export info *<pseudo-path>*
 
 An export can be created or modified by importing a JSON description in the
 same format:
@@ -290,12 +290,12 @@ same format:
 
 For example,::
 
-   $ ceph nfs export get vstart /cephfs > update_cephfs_export.json
+   $ ceph nfs export info mynfs /cephfs > update_cephfs_export.json
    $ cat update_cephfs_export.json
    {
      "export_id": 1,
      "path": "/",
-     "cluster_id": "vstart",
+     "cluster_id": "mynfs",
      "pseudo": "/cephfs",
      "access_type": "RW",
      "squash": "no_root_squash",
@@ -308,7 +308,7 @@ For example,::
      ],
      "fsal": {
        "name": "CEPH",
-       "user_id": "vstart1",
+       "user_id": "nfs.mynfs.1",
        "fs_name": "a",
        "sec_label_xattr": ""
      },
@@ -323,7 +323,7 @@ and *access_type* are modified::
    {
      "export_id": 1,
      "path": "/",
-     "cluster_id": "vstart",
+     "cluster_id": "mynfs",
      "pseudo": "/cephfs_testing",
      "access_type": "RO",
      "squash": "no_root_squash",
@@ -336,7 +336,7 @@ and *access_type* are modified::
      ],
      "fsal": {
        "name": "CEPH",
-       "user_id": "vstart1",
+       "user_id": "nfs.mynfs.1",
        "fs_name": "a",
        "sec_label_xattr": ""
      },
@@ -344,29 +344,6 @@ and *access_type* are modified::
    }
 
 
-Configuring NFS Ganesha to export CephFS with vstart
-====================================================
-
-1) Using ``cephadm``
-
-    .. code:: bash
-
-        $ MDS=1 MON=1 OSD=3 NFS=1 ../src/vstart.sh -n -d --cephadm
-
-    This will deploy a single NFS Ganesha daemon using ``vstart.sh``, where
-    the daemon will listen on the default NFS Ganesha port.
-
-2) Using test orchestrator
-
-    .. code:: bash
-
-       $ MDS=1 MON=1 OSD=3 NFS=1 ../src/vstart.sh -n -d
-
-    Environment variable ``NFS`` is the number of NFS Ganesha daemons to be
-    deployed, each listening on a random port.
-
-    .. note:: NFS Ganesha packages must be pre-installed for this to work.
-
 Mount
 =====
 
diff --git a/doc/dev/vstart-ganesha.rst b/doc/dev/vstart-ganesha.rst
new file mode 100644 (file)
index 0000000..1b07ada
--- /dev/null
@@ -0,0 +1,23 @@
+Configuring NFS Ganesha to export CephFS with vstart
+====================================================
+
+1) Using ``cephadm``
+
+    .. code:: bash
+
+        $ MDS=1 MON=1 OSD=3 NFS=1 ../src/vstart.sh -n -d --cephadm
+
+    This will deploy a single NFS Ganesha daemon using ``vstart.sh``, where
+    the daemon will listen on the default NFS Ganesha port.
+
+2) Using test orchestrator
+
+    .. code:: bash
+
+       $ MDS=1 MON=1 OSD=3 NFS=1 ../src/vstart.sh -n -d
+
+    Environment variable ``NFS`` is the number of NFS Ganesha daemons to be
+    deployed, each listening on a random port.
+
+    .. note:: NFS Ganesha packages must be pre-installed for this to work.
+
index 53dd4bcd5a5def3ac61cc47874afb2f40edc3ea7..f97c4000acdfe887859b4e51c7a89c327730e235 100644 (file)
@@ -220,7 +220,7 @@ class TestNFS(MgrTestCase):
         '''
         Returns export block in json format
         '''
-        return json.loads(self._nfs_cmd('export', 'get', self.cluster_id, self.pseudo_path))
+        return json.loads(self._nfs_cmd('export', 'info', self.cluster_id, self.pseudo_path))
 
     def _test_get_export(self):
         '''
@@ -619,6 +619,6 @@ class TestNFS(MgrTestCase):
         exec_cmd_invalid('export', 'ls')
         exec_cmd_invalid('export', 'delete')
         exec_cmd_invalid('export', 'delete', 'clusterid')
-        exec_cmd_invalid('export', 'get')
-        exec_cmd_invalid('export', 'get', 'clusterid')
+        exec_cmd_invalid('export', 'info')
+        exec_cmd_invalid('export', 'info', 'clusterid')
         exec_cmd_invalid('export', 'update')
index 7039f5b2041cc5181f83fb2957c1fa718fc31bb9..a5e0c8cbdd3292dd06258043c8a37559188c7753 100644 (file)
@@ -73,8 +73,8 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
         """List exports of a NFS cluster"""
         return self.export_mgr.list_exports(cluster_id=cluster_id, detailed=detailed)
 
-    @CLICommand('nfs export get', perm='r')
-    def _cmd_nfs_export_get(self, cluster_id: str, pseudo_path: str) -> Tuple[int, str, str]:
+    @CLICommand('nfs export info', perm='r')
+    def _cmd_nfs_export_info(self, cluster_id: str, pseudo_path: str) -> Tuple[int, str, str]:
         """Fetch a export of a NFS cluster given the pseudo path/binding"""
         return self.export_mgr.get_export(cluster_id=cluster_id, pseudo_path=pseudo_path)