Pārlūkot izejas kodu

cmd_htable: added reload subcommand

Daniel-Constantin Mierla 5 gadi atpakaļ
vecāks
revīzija
8df1825abe
1 mainītis faili ar 16 papildinājumiem un 0 dzēšanām
  1. 16 0
      kamcli/commands/cmd_htable.py

+ 16 - 0
kamcli/commands/cmd_htable.py

@@ -103,3 +103,19 @@ def htable_flush(ctx, htname):
         <htname> - the name of hash table
     """
     command_ctl(ctx, "htable.flush", [htname])
+
+
[email protected](
+    "reload",
+    short_help="Reload the content from database for hash table named htname",
+)
[email protected]("htname", metavar="<htname>")
+@pass_context
+def htable_reload(ctx, htname):
+    """Remove the content from database for hash table named htname
+
+    \b
+    Parameters:
+        <htname> - the name of hash table
+    """
+    command_ctl(ctx, "htable.reload", [htname])