]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/cephfs-shell: drop installing packaging module 54119/head
authorVenky Shankar <vshankar@redhat.com>
Thu, 28 Sep 2023 07:55:46 +0000 (13:25 +0530)
committerJos Collin <jcollin@redhat.com>
Fri, 20 Oct 2023 10:46:56 +0000 (16:16 +0530)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 5be9213738bfbde12172b3a5158667ebe9dfa13d)

doc/man/8/cephfs-shell.rst
src/tools/cephfs/shell/cephfs-shell

index 91136f123b6cff3716ee990e6a561bba9f43e53f..974ba37d91109e516f7509df0ddb15e92cd1cb56 100644 (file)
@@ -56,7 +56,7 @@ Options
 
 .. code:: bash
 
-    [build]$ python3 -m venv venv && source venv/bin/activate && pip3 install cmd2 colorama packaging
+    [build]$ python3 -m venv venv && source venv/bin/activate && pip3 install cmd2 colorama
     [build]$ source vstart_environment.sh && source venv/bin/activate && python3 ../src/tools/cephfs/shell/cephfs-shell
 
 Commands
index ec78d111c950f86b529f5647118cd0e4868bb414..9df4f71d8198236d229f7d7b3e33ab685655b339 100755 (executable)
@@ -1700,11 +1700,11 @@ def read_shell_conf(shell, shell_conf_file):
 
     sec = 'cephfs-shell'
     opts = []
-    if version.parse(cmd2_version) >= version.parse("0.10.0"):
+    if Version(cmd2_version) >= Version("0.10.0"):
         for attr in shell.settables.keys():
             opts.append(attr)
     else:
-        if version.parse(cmd2_version) <= version.parse("0.9.13"):
+        if Version(cmd2_version) <= Version("0.9.13"):
             # hardcoding options for 0.7.9 because -
             # 1. we use cmd2 v0.7.9 with teuthology and
             # 2. there's no way distinguish between a shell setting and shell
@@ -1713,7 +1713,7 @@ def read_shell_conf(shell, shell_conf_file):
                     'continuation_prompt', 'debug', 'echo', 'editor',
                     'feedback_to_output', 'locals_in_py', 'prompt', 'quiet',
                     'timing']
-        elif version.parse(cmd2_version) >= version.parse("0.9.23"):
+        elif Version(cmd2_version) >= Version("0.9.23"):
             opts.append('allow_style')
         # no equivalent option was defined by cmd2.
         else:
@@ -1768,7 +1768,7 @@ def manage_args():
     args.exe_and_quit = False    # Execute and quit, don't launch the shell.
 
     if args.batch:
-        if version.parse(cmd2_version) <= version.parse("0.9.13"):
+        if Version(cmd2_version) <= Version("0.9.13"):
             args.commands = ['load ' + args.batch, ',quit']
         else:
             args.commands = ['run_script ' + args.batch, ',quit']
@@ -1813,7 +1813,7 @@ def execute_cmds_and_quit(args):
     # value to indicate whether the execution of the commands should stop, but
     # since 0.9.7 it returns the return value of do_* methods only if it's
     # not None. When it is None it returns False instead of None.
-    if version.parse(cmd2_version) <= version.parse("0.9.6"):
+    if Version(cmd2_version) <= Version("0.9.6"):
         stop_exec_val = None
     else:
         stop_exec_val = False