Browse Source

small adjustments to comments and devel docs

Daniel-Constantin Mierla 8 years ago
parent
commit
5d2e280912
3 changed files with 14 additions and 7 deletions
  1. 12 5
      docs/Devel.md
  2. 1 1
      kamcli/commands/cmd_ps.py
  3. 1 1
      kamcli/ioutils.py

+ 12 - 5
docs/Devel.md

@@ -7,7 +7,7 @@ Kamailio Command Line Interface Control Tool
 
 
 #### Indentation
 #### Indentation
 
 
-  * user 4 whitespaces for indentation
+  * user 4 whitespaces (no tabs) for indentation
 
 
 #### Used Frameworks
 #### Used Frameworks
 
 
@@ -28,7 +28,9 @@ Kamcli prototype is:
 kamcli <command> [params]
 kamcli <command> [params]
 ```
 ```
 
 
-Each command is implemented as a plugin, its code residing in a single Python file located in *kamcli/commands/*. The filename is prefixed by **cmd_**, followed by command name and then the extension **.py**.
+Each command is implemented as a plugin, its code residing in a single Python
+file located in *kamcli/commands/*. The filename is prefixed by **cmd_**,
+followed by command name and then the extension **.py**.
 
 
 Development of kamcli has its starting point in the *complex* example of Click:
 Development of kamcli has its starting point in the *complex* example of Click:
 
 
@@ -40,7 +42,7 @@ Other examples provided by Click are good source of inspiration:
 
 
 ##### Adding a new command
 ##### Adding a new command
 
 
-In short, the steps for adding a new command (refered also as plugin):
+In short, the steps for adding a new command (refered also as plugin or module):
 
 
   * create a new file file for your new comand in **kamcli/commands/** folder
   * create a new file file for your new comand in **kamcli/commands/** folder
   * name the file **cmd_newcommand.py**
   * name the file **cmd_newcommand.py**
@@ -52,6 +54,11 @@ Once implemented, the new command should be immediately available as:
  kamcli newcommand ...
  kamcli newcommand ...
  ```
  ```
 
 
-The commands **dispatcher** (kamcli/commands/cmd_dispatcher.py) or **address** (kamcli/commands/cmd_address.py) can be a good reference to look at and reuse for implementing new commands.
+The commands **dispatcher** (kamcli/commands/cmd_dispatcher.py) or **address**
+(kamcli/commands/cmd_address.py) can be a good reference to look at and reuse
+for implementing new commands.
 
 
-If the new command is executing MI or JSONRPC commands to kamailio, add the appropriate mapping inside the **kamcli/iorpc.py** file to the variable **COMMAND_NAMES**. The recommendation is to use the RPC command as the common name and then map the MI variant.
+If the new command is executing MI or JSONRPC commands to kamailio, add the
+appropriate mapping inside the **kamcli/iorpc.py** file to the variable
+**COMMAND_NAMES**. The recommendation is to use the RPC command as the common
+name and then map the MI variant - MI is obsoleted and scheduled to be removed.

+ 1 - 1
kamcli/commands/cmd_ps.py

@@ -19,7 +19,7 @@ def cli(ctx):
 
 
 
 
 ##
 ##
-#
+# callback to print the result of the rpc command
 #
 #
 def cmd_ps_result_print(ctx, response, params=None):
 def cmd_ps_result_print(ctx, response, params=None):
     ctx.vlog("formatting the response for command ps")
     ctx.vlog("formatting the response for command ps")

+ 1 - 1
kamcli/ioutils.py

@@ -14,7 +14,7 @@ except ImportError, e:
 ioutils_formats_list = ['raw', 'json', 'table', 'dict']
 ioutils_formats_list = ['raw', 'json', 'table', 'dict']
 
 
 ##
 ##
-#
+# print a database result using different formats and styles
 #
 #
 def ioutils_dbres_print(ctx, oformat, ostyle, res):
 def ioutils_dbres_print(ctx, oformat, ostyle, res):
     if oformat is None:
     if oformat is None: