3. Common Commands

3.1. status

Show the number of connected primary and secondary processes. It also show a list of secondary IDs

spp > status
Soft Patch Panel Status :
primary: 1
secondary count: 2
Connected secondary id: 1
Connected secondary id: 2

3.2. playback

Restore network configuration from a recipe file which defines a set of SPP commands. You can prepare a recipe file by using record command or editing file by hand.

It is recommended to use extension .rcp to be self-sxplanatory as a recipe, although you can use any of extensions such as .txt or .log.

spp > playback /path/to/my.rcp

3.3. record

Start recording user’s input and create a recipe file for loading from playback commnad. Recording recipe is stopped by executing exit or playback command.

spp > record /path/to/my.rcp

Note

It is not supported to stop recording without exit or playback command. It is planned to support stop command for stopping record in next relase.

3.4. history

Show command history. Command history is recorded in a file named $HOME/.spp_history. It does not add some command which are no meaning for history, bye, exit, history and redo.

spp > history
  1  ls
  2  cat file.txt

3.5. redo

Execute command of index of history.

spp > redo 5  # exec 5th command in the history

3.6. pwd

Show current path.

spp> pwd
/path/to/curdir

3.7. cd

Change current directory.

spp> cd /path/to/dir

3.8. ls

Show a list of directory contents.

spp> ls /path/to/dir

3.9. mkdir

Make a directory.

spp> mkdir /path/to/dir

3.10. cat

Show contents of a file.

spp> cat /path/to/file

3.11. less

Show contents of a file.

spp> less /path/to/file

3.12. bye

bye command is for terminating SPP processes. It supports two types of termination as sub commands.

  • sec
  • all

First one is for terminating only secondary processes at once.

spp > bye sec
closing:<socket._socketobject object at 0x105750910>
closing:<socket._socketobject object at 0x105750a60>

Second one is for all SPP processes other than controller.

spp > bye all
closing:<socket._socketobject object at 0x10bd95910>
closing:<socket._socketobject object at 0x10bd95a60>
closing:('127.0.0.1', 53620)

3.13. exit

Same as bye command but just for terminating SPP controller and not for other processes.

spp > exit
Thank you for using Soft Patch Panel

3.14. help

Show help message for SPP commands.

spp > help

Documented commands (type help <topic>):
========================================
bye  cd    help  load_cmd  mkdir     pri  record  status  topo_subgraph
cat  exit  less  ls        playback  pwd  sec     topo

spp > help status
Display status info of SPP processes

    spp > status

spp > help sec
Send command to secondary process

    SPP secondary process is specified with secondary ID and takes
    sub commands.

    spp > sec 1;status
    spp > sec 1;add ring 0
    spp > sec 1;patch 0 2