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

Classes

enum  Type
 

Public Member Functions

 TopoSlug (String slug)
 
String toString ()
 

Static Public Member Functions

static final String toString (Switch aSwitch)
 
static final String toString (Port port)
 
static final String toString (PortQueue portQueue)
 
static final String toString (LinkEndpoint ep)
 
static final String toString (Link link, boolean abbreviate)
 
static final Link toLink (TopoSlug slug)
 
static void main (String[] args)
 

Static Public Attributes

static final String DELIM = ":"
 
static final String EP_DELIM = "->"
 
static final String NULL_SWITCH = "S.0"
 
static final String NULL_PORT = NULL_SWITCH + DELIM + "P.0"
 
static final String NULL_ENDPOINT = NULL_PORT + DELIM + "Q.0"
 
static final String NULL_LINK = "L" + DELIM + NULL_ENDPOINT + EP_DELIM + NULL_ENDPOINT
 

Detailed Description

Topology Slug - used to identify a topology element.

Definition at line 25 of file TopoSlug.java.

Constructor & Destructor Documentation

◆ TopoSlug()

org.openkilda.topo.TopoSlug.TopoSlug ( String  slug)

Definition at line 112 of file TopoSlug.java.

Member Function Documentation

◆ main()

static void org.openkilda.topo.TopoSlug.main ( String []  args)
static

Definition at line 146 of file TopoSlug.java.

◆ toLink()

static final Link org.openkilda.topo.TopoSlug.toLink ( TopoSlug  slug)
static

toLink will convert any slug into a link, possibly with a bunch of null values. It depends on the type of the slug:

  • LINK: This should be fully formed, no nulls.
  • QUEUE: Only the source endpoint is fully formed (endpoint is equivalent)
  • PORT: The source endpoint will be partially formed.
  • SWITCH: The source endpoint will be partially formed. This method can be used as a shortcut to parse the slug.

Definition at line 132 of file TopoSlug.java.

◆ toString() [1/6]

static final String org.openkilda.topo.TopoSlug.toString ( Switch  aSwitch)
static

Definition at line 34 of file TopoSlug.java.

◆ toString() [2/6]

static final String org.openkilda.topo.TopoSlug.toString ( Port  port)
static

Definition at line 38 of file TopoSlug.java.

◆ toString() [3/6]

static final String org.openkilda.topo.TopoSlug.toString ( PortQueue  portQueue)
static

Definition at line 44 of file TopoSlug.java.

◆ toString() [4/6]

static final String org.openkilda.topo.TopoSlug.toString ( LinkEndpoint  ep)
static

Definition at line 50 of file TopoSlug.java.

◆ toString() [5/6]

static final String org.openkilda.topo.TopoSlug.toString ( Link  link,
boolean  abbreviate 
)
static

Definition at line 55 of file TopoSlug.java.

◆ toString() [6/6]

String org.openkilda.topo.TopoSlug.toString ( )

Definition at line 139 of file TopoSlug.java.

Member Data Documentation

◆ DELIM

final String org.openkilda.topo.TopoSlug.DELIM = ":"
static

Definition at line 27 of file TopoSlug.java.

◆ EP_DELIM

final String org.openkilda.topo.TopoSlug.EP_DELIM = "->"
static

Definition at line 28 of file TopoSlug.java.

◆ NULL_ENDPOINT

final String org.openkilda.topo.TopoSlug.NULL_ENDPOINT = NULL_PORT + DELIM + "Q.0"
static

Definition at line 31 of file TopoSlug.java.

◆ NULL_LINK

final String org.openkilda.topo.TopoSlug.NULL_LINK = "L" + DELIM + NULL_ENDPOINT + EP_DELIM + NULL_ENDPOINT
static

Definition at line 32 of file TopoSlug.java.

◆ NULL_PORT

final String org.openkilda.topo.TopoSlug.NULL_PORT = NULL_SWITCH + DELIM + "P.0"
static

Definition at line 30 of file TopoSlug.java.

◆ NULL_SWITCH

final String org.openkilda.topo.TopoSlug.NULL_SWITCH = "S.0"
static

Definition at line 29 of file TopoSlug.java.


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