Open Kilda Java Documentation
org.openkilda.topo.TopologyPrinter Class Reference

Static Public Member Functions

static final String toJson (ITopology topo, boolean pretty) throws IOException
 
static final String toMininetJson (ITopology topo) throws IOException
 
static final String toMininetJson (ITopology topo, String host, String name, String port)
 
static final String makeControllerSection (String host, String name, String port)
 
static final String makeSwitchSection (ITopology topo)
 
static final String convertSwitchId2Name (String id)
 
static final String makeLinkSection (ITopology topo)
 
static void main (String[] args) throws IOException
 

Detailed Description

This class will convert ITopology objects to other representations

Definition at line 31 of file TopologyPrinter.java.

Member Function Documentation

◆ convertSwitchId2Name()

static final String org.openkilda.topo.TopologyPrinter.convertSwitchId2Name ( String  id)
static
Parameters
idie dpid .. 8 bytes as string, eg ".. :12:34:56:78"
Returns
the truncated, last 4 bytes, as a string "12345678"

Definition at line 99 of file TopologyPrinter.java.

◆ main()

static void org.openkilda.topo.TopologyPrinter.main ( String []  args) throws IOException
static

Definition at line 120 of file TopologyPrinter.java.

◆ makeControllerSection()

static final String org.openkilda.topo.TopologyPrinter.makeControllerSection ( String  host,
String  name,
String  port 
)
static

Definition at line 71 of file TopologyPrinter.java.

◆ makeLinkSection()

static final String org.openkilda.topo.TopologyPrinter.makeLinkSection ( ITopology  topo)
static

Definition at line 103 of file TopologyPrinter.java.

◆ makeSwitchSection()

static final String org.openkilda.topo.TopologyPrinter.makeSwitchSection ( ITopology  topo)
static

Definition at line 81 of file TopologyPrinter.java.

◆ toJson()

static final String org.openkilda.topo.TopologyPrinter.toJson ( ITopology  topo,
boolean  pretty 
) throws IOException
static
Returns
A json representation of the topology. Intended for printing only.

Definition at line 36 of file TopologyPrinter.java.

◆ toMininetJson() [1/2]

static final String org.openkilda.topo.TopologyPrinter.toMininetJson ( ITopology  topo) throws IOException
static

Definition at line 55 of file TopologyPrinter.java.

◆ toMininetJson() [2/2]

static final String org.openkilda.topo.TopologyPrinter.toMininetJson ( ITopology  topo,
String  host,
String  name,
String  port 
)
static
Returns
A json representation of the topology. Intended for mininet only.

Definition at line 63 of file TopologyPrinter.java.


The documentation for this class was generated from the following file: