net.clackrouter.topology.core
Class TopoParser
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
TopoParser
public TopoParser()
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