net.clackrouter.topology.core
Class TopoParser

java.lang.Object
  extended by net.clackrouter.topology.core.TopoParser

public class TopoParser
extends java.lang.Object

This is a static class that parses the VNS topology file from the VNS server.

Fills a list of provides ArrayLists with a lists of TopologyModel.Host and TopologyModel.Link based on the contents of the topology file.


Field Summary
static java.lang.String FIREWALL_NAME
           
static java.lang.String FW_IFACE_ID
           
static java.lang.String INET_IFACE_ID
           
static java.lang.String INTERNET_NAME
           
 
Constructor Summary
TopoParser()
           
 
Method Summary
static void addInternetBlock(java.util.ArrayList hosts, java.util.ArrayList links, TopologyModel.Host fw)
           
static void getHostAndWireLists(org.w3c.dom.Element topo_element, java.util.ArrayList hosts, java.util.ArrayList links, boolean isLocal)
           
static TopologyModel.Host getHostFromElement(org.w3c.dom.Element elem, java.util.Hashtable ifaceIDToHostMap)
           
static TopologyModel.Interface getInterfaceFromPhysicalIfaceElement(org.w3c.dom.Element elem, java.lang.String parentName)
           
static TopologyModel.Interface getInterfaceFromVirtualIfaceElement(org.w3c.dom.Element elem, java.lang.String parentName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIREWALL_NAME

public static java.lang.String FIREWALL_NAME

INTERNET_NAME

public static java.lang.String INTERNET_NAME

FW_IFACE_ID

public static java.lang.String FW_IFACE_ID

INET_IFACE_ID

public static java.lang.String INET_IFACE_ID
Constructor Detail

TopoParser

public TopoParser()
Method Detail

getHostAndWireLists

public static void getHostAndWireLists(org.w3c.dom.Element topo_element,
                                       java.util.ArrayList hosts,
                                       java.util.ArrayList links,
                                       boolean isLocal)
                                throws java.lang.Exception
Throws:
java.lang.Exception

addInternetBlock

public static void addInternetBlock(java.util.ArrayList hosts,
                                    java.util.ArrayList links,
                                    TopologyModel.Host fw)

getHostFromElement

public static TopologyModel.Host getHostFromElement(org.w3c.dom.Element elem,
                                                    java.util.Hashtable ifaceIDToHostMap)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

getInterfaceFromVirtualIfaceElement

public static TopologyModel.Interface getInterfaceFromVirtualIfaceElement(org.w3c.dom.Element elem,
                                                                          java.lang.String parentName)
                                                                   throws java.lang.Exception
Throws:
java.lang.Exception

getInterfaceFromPhysicalIfaceElement

public static TopologyModel.Interface getInterfaceFromPhysicalIfaceElement(org.w3c.dom.Element elem,
                                                                           java.lang.String parentName)
                                                                    throws java.lang.Exception
Throws:
java.lang.Exception