Browse Source

[5361] Implemented --path argument for kea-shell

Francis Dupont 7 years ago
parent
commit
a248940a7b
2 changed files with 14 additions and 0 deletions
  1. 4 0
      src/bin/shell/kea-shell.in
  2. 10 0
      src/bin/shell/kea-shell.xml

+ 4 - 0
src/bin/shell/kea-shell.in

@@ -60,6 +60,9 @@ def shell_body():
     parser.add_argument('--port', type=int, default=8000,
                         help='TCP port of the CA to connect to '
                         '(default: 8000)')
+    parser.add_argument('--path', type=str, default='',
+                        help='Path of the URL to connect to '
+                        '(default: "")')
     parser.add_argument('--timeout', type=int, default='10',
                         help='Timeout (in seconds) when attempting to '
                         'connect to CA (default: 10)')
@@ -84,6 +87,7 @@ def shell_body():
     params.service = cmd_args.service
     params.http_host = cmd_args.host
     params.http_port = cmd_args.port
+    params.path += cmd_args.path
     params.timeout = cmd_args.timeout
     params.version = VERSION
 

+ 10 - 0
src/bin/shell/kea-shell.xml

@@ -52,6 +52,7 @@
       <arg><option>-v</option></arg>
       <arg><option>--host</option></arg>
       <arg><option>--port</option></arg>
+      <arg><option>--path</option></arg>
       <arg><option>--timeout</option></arg>
       <arg><option>--service</option></arg>
       <arg><option>command</option></arg>
@@ -110,6 +111,15 @@
       </varlistentry>
 
       <varlistentry>
+        <term><option>--path</option></term>
+        <listitem><para>
+          Specifies the path in the URL to connect to. If not specified,
+          empty path is used. As Control Agent listens at the empty path
+          this parameter is useful only with a reverse proxy.
+        </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
         <term><option>--timeout</option></term>
         <listitem><para>
           Specifies the connection timeout in seconds. If not