Selaa lähdekoodia

cfg_rpc: documentation update - group instances

The module documentation is updated with the following changes:
- group parameter can be in the form of group[id].
- "cfg_rpc" -> "cfg" command prefix is corrected.
- cfg.add_group_inst and cfg.del_group_inst command are added.
Miklos Tirpak 15 vuotta sitten
vanhempi
commit
1490f65967
2 muutettua tiedostoa jossa 65 lisäystä ja 32 poistoa
  1. 31 17
      modules/cfg_rpc/README
  2. 34 15
      modules/cfg_rpc/doc/rpc.xml

+ 31 - 17
modules/cfg_rpc/README

@@ -4,7 +4,7 @@ Miklos Tirpak
 
 
    <[email protected]>
    <[email protected]>
 
 
-   Copyright © 2007 iptelorg GmbH
+   Copyright © 2007 iptelorg GmbH
      __________________________________________________________________
      __________________________________________________________________
 
 
    1.1. Overview
    1.1. Overview
@@ -20,27 +20,41 @@ Miklos Tirpak
 1.2. RPC Interface
 1.2. RPC Interface
 
 
    The module implements the following RPC interface commands:
    The module implements the following RPC interface commands:
-     * cfg_rpc.set_now_int - Set the value of a configuration variable and
+     * cfg.set_now_int - Set the value of a configuration variable and
        commit the change immediately. The function accepts three
        commit the change immediately. The function accepts three
-       parameters: group name, variable name, integer value.
-     * cfg_rpc.set_now_string - Set the value of a configuration variable
-       and commit the change immediately. The function accepts three
-       parameters: group name, variable name, string value.
-     * cfg_rpc.set_delayed_int - Prepare the change of a configuration
+       parameters: group name, variable name, integer value. The group
+       name can optionally contain the group instance id, for example
+       foo[5].
+     * cfg.set_now_string - Set the value of a configuration variable and
+       commit the change immediately. The function accepts three
+       parameters: group name, variable name, string value. The group name
+       can optionally contain the group instance id, for example foo[5].
+     * cfg.set_delayed_int - Prepare the change of a configuration
        variable, but does not commit the new value yet. The function
        variable, but does not commit the new value yet. The function
        accepts three parameters: group name, variable name, integer value.
        accepts three parameters: group name, variable name, integer value.
-     * cfg_rpc.set_delayed_string - Prepare the change of a configuration
+       The group name can optionally contain the group instance id, for
+       example foo[5].
+     * cfg.set_delayed_string - Prepare the change of a configuration
        variable, but does not commit the new value yet. The function
        variable, but does not commit the new value yet. The function
        accepts three parameters: group name, variable name, string value.
        accepts three parameters: group name, variable name, string value.
-     * cfg_rpc.commit - Commit the previously prepared configuration
-       changes. The function does not have any parameters.
-     * cfg_rpc.rollback - Drop the prepared configuration changes. The
+       The group name can optionally contain the group instance id, for
+       example foo[5].
+     * cfg.commit - Commit the previously prepared configuration changes.
+       The function does not have any parameters.
+     * cfg.rollback - Drop the prepared configuration changes. The
        function does not have any parameters.
        function does not have any parameters.
-     * cfg_rpc.get - Get the value of a configuration variable. The
+     * cfg.get - Get the value of a configuration variable. The function
+       accepts two parameters: group name, variable name. The group name
+       can optionally contain the group instance id, for example foo[5].
+     * cfg.help - Print the description of a configuration variable. The
        function accepts two parameters: group name, variable name.
        function accepts two parameters: group name, variable name.
-     * cfg_rpc.help - Print the description of a configuration variable.
-       The function accepts two parameters: group name, variable name.
-     * cfg_rpc.list - List the configuration variables. The function does
-       not have any parameters.
-     * cfg_rpc.diff - List the pending configuration changes that have not
+     * cfg.list - List the configuration variables. The function does not
+       have any parameters.
+     * cfg.diff - List the pending configuration changes that have not
        been committed yet. The function does not have any parameters.
        been committed yet. The function does not have any parameters.
+     * cfg.add_group_inst - Add a new instance to an existing
+       configuration group. The function accepts one parameter: group
+       name[instance id], for example foo[5].
+     * cfg.del_group_inst - Delete an instance of an existing
+       configuration group. The function accepts one parameter: group
+       name[instance id], for example foo[5].

+ 34 - 15
modules/cfg_rpc/doc/rpc.xml

@@ -12,76 +12,95 @@
     <itemizedlist>
     <itemizedlist>
 	<listitem>
 	<listitem>
 	    <para>
 	    <para>
-		<emphasis>cfg_rpc.set_now_int</emphasis> - Set the value of
+		<emphasis>cfg.set_now_int</emphasis> - Set the value of
 		a configuration variable and commit the change immediately.
 		a configuration variable and commit the change immediately.
 		The function accepts three parameters: group name, variable
 		The function accepts three parameters: group name, variable
-		name, integer value.
+		name, integer value. The group name can optionally contain the
+		group instance id, for example foo[5].
 	    </para>
 	    </para>
 	</listitem>
 	</listitem>
 	<listitem>
 	<listitem>
 	    <para>
 	    <para>
-		<emphasis>cfg_rpc.set_now_string</emphasis> - Set the value of
+		<emphasis>cfg.set_now_string</emphasis> - Set the value of
 		a configuration variable and commit the change immediately.
 		a configuration variable and commit the change immediately.
 		The function accepts three parameters: group name, variable
 		The function accepts three parameters: group name, variable
-		name, string value.
+		name, string value. The group name can optionally contain the
+		group instance id, for example foo[5].
 	    </para>
 	    </para>
 	</listitem>
 	</listitem>
 	<listitem>
 	<listitem>
 	    <para>
 	    <para>
-		<emphasis>cfg_rpc.set_delayed_int</emphasis> - Prepare the change of
+		<emphasis>cfg.set_delayed_int</emphasis> - Prepare the change of
 		a configuration variable, but does not commit the new value yet.
 		a configuration variable, but does not commit the new value yet.
 		The function accepts three parameters: group name, variable
 		The function accepts three parameters: group name, variable
-		name, integer value.
+		name, integer value. The group name can optionally contain the
+		group instance id, for example foo[5].
 	    </para>
 	    </para>
 	</listitem>
 	</listitem>
 	<listitem>
 	<listitem>
 	    <para>
 	    <para>
-		<emphasis>cfg_rpc.set_delayed_string</emphasis> - Prepare the change of
+		<emphasis>cfg.set_delayed_string</emphasis> - Prepare the change of
 		a configuration variable, but does not commit the new value yet.
 		a configuration variable, but does not commit the new value yet.
 		The function accepts three parameters: group name, variable
 		The function accepts three parameters: group name, variable
-		name, string value.
+		name, string value. The group name can optionally contain the
+		group instance id, for example foo[5].
 	    </para>
 	    </para>
 	</listitem>
 	</listitem>
 	<listitem>
 	<listitem>
 	    <para>
 	    <para>
-		<emphasis>cfg_rpc.commit</emphasis> - Commit the previously
+		<emphasis>cfg.commit</emphasis> - Commit the previously
 		prepared configuration changes. The function does not have
 		prepared configuration changes. The function does not have
 		any parameters.
 		any parameters.
 	    </para>
 	    </para>
 	</listitem>
 	</listitem>
 	<listitem>
 	<listitem>
 	    <para>
 	    <para>
-		<emphasis>cfg_rpc.rollback</emphasis> - Drop the prepared
+		<emphasis>cfg.rollback</emphasis> - Drop the prepared
 		configuration changes. The function does not have any
 		configuration changes. The function does not have any
 		parameters.
 		parameters.
 	    </para>
 	    </para>
 	</listitem>
 	</listitem>
 	<listitem>
 	<listitem>
 	    <para>
 	    <para>
-		<emphasis>cfg_rpc.get</emphasis> - Get the value of
+		<emphasis>cfg.get</emphasis> - Get the value of
 		a configuration variable. The function accepts two parameters:
 		a configuration variable. The function accepts two parameters:
-		group name, variable name.
+		group name, variable name. The group name can optionally contain the
+		group instance id, for example foo[5].
 	    </para>
 	    </para>
 	</listitem>
 	</listitem>
 	<listitem>
 	<listitem>
 	    <para>
 	    <para>
-		<emphasis>cfg_rpc.help</emphasis> - Print the description of
+		<emphasis>cfg.help</emphasis> - Print the description of
 		a configuration variable. The function accepts two parameters:
 		a configuration variable. The function accepts two parameters:
 		group name, variable name.
 		group name, variable name.
 	    </para>
 	    </para>
 	</listitem>
 	</listitem>
 	<listitem>
 	<listitem>
 	    <para>
 	    <para>
-		<emphasis>cfg_rpc.list</emphasis> - List the configuration
+		<emphasis>cfg.list</emphasis> - List the configuration
 		variables. The function does not have any parameters.
 		variables. The function does not have any parameters.
 	    </para>
 	    </para>
 	</listitem>
 	</listitem>
 	<listitem>
 	<listitem>
 	    <para>
 	    <para>
-		<emphasis>cfg_rpc.diff</emphasis> - List the pending
+		<emphasis>cfg.diff</emphasis> - List the pending
 		configuration changes that have not been committed yet.
 		configuration changes that have not been committed yet.
 		The function does not have any parameters.
 		The function does not have any parameters.
 	    </para>
 	    </para>
 	</listitem>
 	</listitem>
+	<listitem>
+	    <para>
+		<emphasis>cfg.add_group_inst</emphasis> - Add a new instance
+		to an existing configuration group. The function accepts one parameter:
+		group name[instance id], for example foo[5].
+	    </para>
+	</listitem>
+	<listitem>
+	    <para>
+		<emphasis>cfg.del_group_inst</emphasis> - Delete an instance
+		of an existing configuration group. The function accepts one parameter:
+		group name[instance id], for example foo[5].
+	    </para>
+	</listitem>
     </itemizedlist>
     </itemizedlist>
 </section>
 </section>