From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mogw0807.ocn.ad.jp (mogw0807.ocn.ad.jp [153.149.234.8]) by dpdk.org (Postfix) with ESMTP id 8298A1E973 for ; Tue, 12 Jun 2018 09:03:52 +0200 (CEST) Received: from mf-smf-ucb019c1 (mf-smf-ucb019c1.ocn.ad.jp [153.153.66.130]) by mogw0807.ocn.ad.jp (Postfix) with ESMTP id 52911A0047B; Tue, 12 Jun 2018 16:03:51 +0900 (JST) Received: from ntt.pod01.mv-mta-ucb024 ([153.149.142.98]) by mf-smf-ucb019c1 with ESMTP id SdLLf3lj3Zr5uSdLLft4mW; Tue, 12 Jun 2018 16:03:51 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.133]) by ntt.pod01.mv-mta-ucb024 with id xj3r1x0082tKTyH01j3rq1; Tue, 12 Jun 2018 07:03:51 +0000 Received: from localhost.localdomain (p5164-ipngn8501marunouchi.tokyo.ocn.ne.jp [153.214.228.164]) by smtp.ocn.ne.jp (Postfix) with ESMTPA; Tue, 12 Jun 2018 16:03:51 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: ferruh.yigit@intel.com, spp@dpdk.org Cc: Yasufumi Ogawa Date: Tue, 12 Jun 2018 16:03:43 +0900 Message-Id: <20180612070343.5350-3-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180612070343.5350-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20180612070343.5350-1-ogawa.yasufumi@lab.ntt.co.jp> Subject: [spp] [PATCH 2/2] docs: update topo command manual X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jun 2018 07:03:52 -0000 From: Yasufumi Ogawa Add instructions for installing required packages and usages of 'topo http' command. Signed-off-by: Yasufumi Ogawa --- docs/guides/commands/experimental.rst | 33 +++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/docs/guides/commands/experimental.rst b/docs/guides/commands/experimental.rst index a678fe6..42ba371 100644 --- a/docs/guides/commands/experimental.rst +++ b/docs/guides/commands/experimental.rst @@ -54,15 +54,23 @@ gfor generating topology file. You can also generate a dot formatted file or image files supported by graphviz. -Here is a list of required tools for 'topo'. +Here is a list of required tools for ``topo term`` command to output +in terminal. MacOS is also supported optionally for which SPP controller runs on a remote host. * graphviz * imagemagick -* libsixel-bin (for Ubuntu) and terminal app supporting img2sixel +* libsixel-bin (for Ubuntu) * iTerm2 and imgcat (for MacOS) +To output in browser with ``topo http`` command, +install packages for websocket with pip or pip3. + +* tornado +* websocket-client + + Output to Terminal ~~~~~~~~~~~~~~~~~~ @@ -94,13 +102,30 @@ and save this script as Output to Browser ~~~~~~~~~~~~~~~~~ -Output an image of network configuration in a browser. +Output an image of network configuration in browser. .. code-block:: console spp > topo http -[TODO] Add explanation. +``topo term`` is useful to understand network configuration intuitively. +However, it should be executed on a node running SPP controller. +You cannnot see the image if you login remote node via ssh and running +SPP controller on remote. + +Websocket server is launched from ``src/controller/websocket/spp_ws.py`` +to accept client messages. +You should start it before using ``topo term`` command. +Then, open url shown in the terminal (default is +``http://127.0.0.1:8989``). + +Browser and SPP controller behave as clients, but have different roles. +Browser behaves as a viwer and SPP controller behaves as a udpater. +If you update network configuration and run ``topo http`` command, +SPP controller sends a message containing network configuration +as DOT language format. +Once the message is accepted, websocket server sends it to viewer clients +immediately. Output to File -- 2.17.1