فهرست منبع

added srv commands

- implemented subcommands:
  - aliases - list server domain aliases
  - sockets - list server listen sockets
  - rpclist - list server rpc commands
Daniel-Constantin Mierla 8 سال پیش
والد
کامیت
bc284aead8
1فایلهای تغییر یافته به همراه49 افزوده شده و 0 حذف شده
  1. 49 0
      kamcli/commands/cmd_srv.py

+ 49 - 0
kamcli/commands/cmd_srv.py

@@ -0,0 +1,49 @@
+import click
+from kamcli.cli import pass_context
+from kamcli.iorpc import command_ctl
+
+
+##
+#
+#
[email protected]('srv', help='Common server interaction commands')
+@pass_context
+def cli(ctx):
+    pass
+
+##
+#
+#
[email protected]('sockets', short_help='Show the list of listen sockets')
+@pass_context
+def srv_sockets(ctx):
+    """Show the list of listen sockets
+
+    \b
+    """
+    command_ctl(ctx, 'corex.list_sockets')
+
+##
+#
+#
[email protected]('aliases', short_help='Show the list of server domain aliases')
+@pass_context
+def srv_aliases(ctx):
+    """Show the list of server domain aliases
+
+    \b
+    """
+    command_ctl(ctx, 'corex.list_aliases')
+
+##
+#
+#
[email protected]('rpclist', short_help='Show the list of server rpc commands')
+@pass_context
+def srv_rpclist(ctx):
+    """Show the list of server rpc commands
+
+    \b
+    """
+    command_ctl(ctx, 'system.listMethods')
+