瀏覽代碼

added rpcmethods command

Daniel-Constantin Mierla 8 年之前
父節點
當前提交
c333fb0d9d
共有 2 個文件被更改,包括 23 次插入1 次删除
  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', [])