commit | c036627e8d8daf82e09ceb4cbda8b5884a664f4a | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@onlab.us> | Mon Feb 10 21:04:57 2014 -0800 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Mon Feb 10 21:04:57 2014 -0800 |
tree | 2cfdb23f6cabf36cc2a3cb927b262e49027ad5b9 | |
parent | c6174dfafb65fdd249cbf75fb453cc6c21e51ac2 [diff] [blame] |
Update DeviceImpl Change-Id: I85fc26c7e7c0fad315d1d9585f8c83ffb1d6e66a
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphImpl.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphImpl.java index e4efc4e..e3a3a39 100644 --- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphImpl.java +++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphImpl.java
@@ -258,6 +258,13 @@ throw new ClassCastException("PortImpl expected, but found: " + p); } + private DeviceImpl getDeviceImpl(Device d) { + if (d instanceof DeviceImpl) { + return (DeviceImpl) d; + } + throw new ClassCastException("DeviceImpl expected, but found: " + d); + } + public boolean isSwitchInstanceInTopology(Switch sw) { // check if the sw instance is valid in Topology if (sw != switches.get(sw.getDpid())) {