Просмотр исходного кода

cmd_tcp: added command for tcp connections management

Daniel-Constantin Mierla 6 лет назад
Родитель
Сommit
4d8663d053
1 измененных файлов с 51 добавлено и 0 удалено
  1. 51 0
      kamcli/commands/cmd_tcp.py

+ 51 - 0
kamcli/commands/cmd_tcp.py

@@ -0,0 +1,51 @@
+import click
+from kamcli.cli import pass_context
+from kamcli.iorpc import command_ctl
+
+
+##
+#
+#
[email protected]('tcp', help='Manage TCP options and connections')
+@pass_context
+def cli(ctx):
+    pass
+
+
+##
+#
+#
[email protected]('options', short_help='Show details for TCP options in memory')
+@pass_context
+def tcp_options(ctx):
+    """Show details for TCP options in memory
+
+    \b
+    """
+    command_ctl(ctx, 'core.tcp_options', [ ])
+
+
+##
+#
+#
[email protected]('list', short_help='List current TCP connections')
+@pass_context
+def tcp_list(ctx):
+    """List current TCP connections
+
+    \b
+    """
+    command_ctl(ctx, 'core.tcp_list', [ ])
+
+
+##
+#
+#
[email protected]('info', short_help='Summary of TCP usage')
+@pass_context
+def tcp_info(ctx):
+    """Summary of TCP usage
+
+    \b
+    """
+    command_ctl(ctx, 'core.tcp_info', [ ])