Renamed *NetworkGraph* references to *Topology*.
Change-Id: Iec01c47086e1518592c0753e75395d3fe5abcde3
diff --git a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
index e9a29c0..9dc840b 100644
--- a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
+++ b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
@@ -33,9 +33,9 @@
import net.onrc.onos.core.packet.Ethernet;
import net.onrc.onos.core.registry.IControllerRegistryService;
import net.onrc.onos.core.topology.Device;
-import net.onrc.onos.core.topology.INetworkGraphService;
+import net.onrc.onos.core.topology.ITopologyService;
import net.onrc.onos.core.topology.LinkEvent;
-import net.onrc.onos.core.topology.NetworkGraph;
+import net.onrc.onos.core.topology.Topology;
import net.onrc.onos.core.topology.Port;
import net.onrc.onos.core.topology.Switch;
import net.onrc.onos.core.util.Dpid;
@@ -65,8 +65,8 @@
private IPacketService packetService;
private IControllerRegistryService controllerRegistryService;
- private INetworkGraphService networkGraphService;
- private NetworkGraph networkGraph;
+ private ITopologyService topologyService;
+ private Topology topology;
private IPathCalcRuntimeService pathRuntime;
private IntentMap intentMap;
@@ -154,7 +154,7 @@
dependencies.add(IControllerRegistryService.class);
dependencies.add(IOnosDeviceService.class);
dependencies.add(IDatagridService.class);
- dependencies.add(INetworkGraphService.class);
+ dependencies.add(ITopologyService.class);
dependencies.add(IPathCalcRuntimeService.class);
// We don't use the IProxyArpService directly, but reactive forwarding
// requires it to be loaded and answering ARP requests
@@ -167,7 +167,7 @@
public void init(FloodlightModuleContext context) {
datagrid = context.getServiceImpl(IDatagridService.class);
controllerRegistryService = context.getServiceImpl(IControllerRegistryService.class);
- networkGraphService = context.getServiceImpl(INetworkGraphService.class);
+ topologyService = context.getServiceImpl(ITopologyService.class);
pathRuntime = context.getServiceImpl(IPathCalcRuntimeService.class);
packetService = context.getServiceImpl(IPacketService.class);
@@ -179,7 +179,7 @@
public void startUp(FloodlightModuleContext context) {
packetService.registerPacketListener(this);
- networkGraph = networkGraphService.getNetworkGraph();
+ topology = topologyService.getTopology();
intentMap = pathRuntime.getPathIntents();
datagrid.addListener("onos.pathintent_state", this, Long.class, IntentStateList.class);
}
@@ -217,7 +217,7 @@
HexString.toHexString(eth.getDestinationMACAddress());
//FIXME getDeviceByMac() is a blocking call, so it may be better way to handle it to avoid the condition.
- Device deviceObject = networkGraph.getDeviceByMac(MACAddress.valueOf(destinationMac));
+ Device deviceObject = topology.getDeviceByMac(MACAddress.valueOf(destinationMac));
if (deviceObject == null) {
log.debug("No device entry found for {}",
@@ -245,7 +245,7 @@
@Override
public void run() {
- Device deviceObject = networkGraph.getDeviceByMac(MACAddress.valueOf(eth.getDestinationMACAddress()));
+ Device deviceObject = topology.getDeviceByMac(MACAddress.valueOf(eth.getDestinationMACAddress()));
if (deviceObject == null) {
log.debug("wait {}ms and device was not found. Send broadcast packet and the thread finish.", SLEEP_TIME_FOR_DB_DEVICE_INSTALLED);
handleBroadcast(sw, inPort, eth);
diff --git a/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java b/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
index a148f0a..90ec662 100644
--- a/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
+++ b/src/main/java/net/onrc/onos/apps/proxyarp/ProxyArpManager.java
@@ -31,8 +31,8 @@
import net.onrc.onos.core.packet.Ethernet;
import net.onrc.onos.core.packet.IPv4;
import net.onrc.onos.core.topology.Device;
-import net.onrc.onos.core.topology.INetworkGraphService;
-import net.onrc.onos.core.topology.NetworkGraph;
+import net.onrc.onos.core.topology.ITopologyService;
+import net.onrc.onos.core.topology.Topology;
import net.onrc.onos.core.topology.Port;
import net.onrc.onos.core.topology.Switch;
import net.onrc.onos.core.util.SwitchPort;
@@ -65,8 +65,8 @@
private IConfigInfoService configService;
private IRestApiService restApi;
- private INetworkGraphService networkGraphService;
- private NetworkGraph networkGraph;
+ private ITopologyService topologyService;
+ private Topology topology;
private IOnosDeviceService onosDeviceService;
private IPacketService packetService;
@@ -246,7 +246,7 @@
dependencies.add(IRestApiService.class);
dependencies.add(IDatagridService.class);
dependencies.add(IConfigInfoService.class);
- dependencies.add(INetworkGraphService.class);
+ dependencies.add(ITopologyService.class);
dependencies.add(IOnosDeviceService.class);
dependencies.add(IPacketService.class);
return dependencies;
@@ -257,7 +257,7 @@
this.configService = context.getServiceImpl(IConfigInfoService.class);
this.restApi = context.getServiceImpl(IRestApiService.class);
this.datagrid = context.getServiceImpl(IDatagridService.class);
- this.networkGraphService = context.getServiceImpl(INetworkGraphService.class);
+ this.topologyService = context.getServiceImpl(ITopologyService.class);
this.onosDeviceService = context.getServiceImpl(IOnosDeviceService.class);
this.packetService = context.getServiceImpl(IPacketService.class);
@@ -292,7 +292,7 @@
restApi.addRestletRoutable(new ArpWebRoutable());
packetService.registerPacketListener(this);
- networkGraph = networkGraphService.getNetworkGraph();
+ topology = topologyService.getTopology();
//
// Event notification setup: channels and event handlers
@@ -353,9 +353,9 @@
// If the ARP request is expired and then delete the device
HostArpRequester requester = (HostArpRequester) request.requester;
ARP req = requester.getArpRequest();
- networkGraph.acquireReadLock();
- Device targetDev = networkGraph.getDeviceByMac(MACAddress.valueOf(req.getTargetHardwareAddress()));
- networkGraph.releaseReadLock();
+ topology.acquireReadLock();
+ Device targetDev = topology.getDeviceByMac(MACAddress.valueOf(req.getTargetHardwareAddress()));
+ topology.releaseReadLock();
if (targetDev != null) {
onosDeviceService.deleteOnosDeviceByMac(MACAddress.valueOf(req.getTargetHardwareAddress()));
if (log.isDebugEnabled()) {
@@ -453,10 +453,10 @@
arpRequests.put(target, new ArpRequest(
new HostArpRequester(arp, dpid, inPort), false));
- networkGraph.acquireReadLock();
- Device targetDevice = networkGraph.getDeviceByMac(
+ topology.acquireReadLock();
+ Device targetDevice = topology.getDeviceByMac(
MACAddress.valueOf(arp.getTargetHardwareAddress()));
- networkGraph.releaseReadLock();
+ topology.releaseReadLock();
if (targetDevice == null) {
if (log.isTraceEnabled()) {