Fix: resolve a NPE when removing VLAN typed openstack network
Change-Id: I55c4f215211a2ecc5353ea9033dca41cbbd81edf
diff --git a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java
index c3e0329..68fe4df 100644
--- a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java
+++ b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java
@@ -481,7 +481,7 @@
.matchEthType(EthType.EtherType.ARP.ethType().toShort())
.matchArpOp(ARP.OP_REQUEST)
.matchArpTpa(port.ipAddress().getIp4Address())
- .matchTunnelId(Long.valueOf(segId))
+ .matchTunnelId(Long.parseLong(segId))
.build();
setRemoteArpTreatmentForTunnel(selector, port, localNode, install);
@@ -954,7 +954,7 @@
if (netType != NetworkType.LOCAL && netType != NetworkType.FLAT
&& netType != NetworkType.VLAN) {
- String segId = osNetworkService.segmentId(netId);
+ String segId = network.getProviderSegID();
osNodeService.completeNodes(COMPUTE)
.forEach(node -> {
setBaseVnetArpRuleForBroadcastMode(node, segId,
@@ -962,7 +962,7 @@
});
}
if (netType == NetworkType.VLAN) {
- String segId = osNetworkService.segmentId(netId);
+ String segId = network.getProviderSegID();
osNodeService.completeNodes(COMPUTE)
.forEach(node -> {
setBaseVnetArpRuleForBroadcastMode(