Browse Source

added rpcmethods command

Daniel-Constantin Mierla 8 năm trước cách đây
mục cha
commit
c333fb0d9d
2 tập tin đã thay đổi với 23 bổ sung1 xóa
  1. 1 1
      kamcli/commands/cmd_ps.py
  2. 22 0
      kamcli/commands/cmd_rpcmethods.py

+ 1 - 1
kamcli/commands/cmd_ps.py

@@ -11,7 +11,7 @@ from kamcli.iorpc import command_ctl
 @click.command('ps', short_help='Print the list of kamailio processes')
 @pass_context
 def cli(ctx):
-    """Print details about running kamailio processes
+    """Show details about running kamailio processes
 
     \b
     """

+ 22 - 0
kamcli/commands/cmd_rpcmethods.py

@@ -0,0 +1,22 @@
+import os
+import time
+import click
+from kamcli.cli import pass_context
+from kamcli.iorpc import command_ctl
+
+
+##
+#
+#
[email protected]('rpcmethods', short_help='Print the list of available raw RPC methods')
+@pass_context
+def cli(ctx):
+    """Print the list of available raw RPC methods
+
+    \b
+    Show all available methods that can be executed with command 'rpc'.
+    Examples:
+        - kamcli rpcmethods
+        - kamcli rpc <method> <params>
+    """
+    command_ctl(ctx, 'system.listMethods', [])