Difference between revisions of "VPP/VPPHostStack/TestHttpServer"

From fd.io
< VPP
Jump to: navigation, search
(Created page with "This is a simple http server app that executes GET requests as CLI commands and returns the result. It can also return a static reply for CPS testing. To start the server do...")
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is a simple http server app that executes GET requests as CLI commands and returns the result. It can also return a static reply for CPS testing.  
+
= HTTP Server Test App =
 +
 
 +
This is a simple HTTP server app that executes GET requests as CLI commands and returns the result. It can also return a static reply for CPS testing. For a full list of options see the [https://docs.fd.io/vpp/18.04/clicmd_src_vnet_session-apps.html#clicmd_test_http_server CLI docs].
 +
 
 +
== Run the app ==
  
 
To start the server do:
 
To start the server do:
  
  # test echo server uri tcp://local-ip/port
+
  # test http server uri tcp://local-ip/port
  
In a browser that has connectivity to the server run: <code>http://vpp_ip/port/sh/run</code>
+
In a browser that has connectivity to the server execute
 +
 
 +
<code>http://vpp_ip/port/sh/run</code>
  
 
If all went well, vpp should have returned the results of the <code>show run</code> command.
 
If all went well, vpp should have returned the results of the <code>show run</code> command.
 +
 +
The server can use TLS as transport as well. Note however that for testing purposes it uses a builtin self-signed certificate so the browser will most probably complain about the validity of the certificate. To test this out, start the server with TLS as transport and use https to connect from the browser.

Latest revision as of 00:50, 7 March 2018

HTTP Server Test App

This is a simple HTTP server app that executes GET requests as CLI commands and returns the result. It can also return a static reply for CPS testing. For a full list of options see the CLI docs.

Run the app

To start the server do:

# test http server uri tcp://local-ip/port

In a browser that has connectivity to the server execute

http://vpp_ip/port/sh/run

If all went well, vpp should have returned the results of the show run command.

The server can use TLS as transport as well. Note however that for testing purposes it uses a builtin self-signed certificate so the browser will most probably complain about the validity of the certificate. To test this out, start the server with TLS as transport and use https to connect from the browser.