BGPVPN delete is throwing NPE 88/83188/9
authorKarthikeyan Krishnan <karthikeyangceb007@gmail.com>
Mon, 22 Jul 2019 06:55:06 +0000 (12:25 +0530)
committerAbhinav Gupta <abhinav.gupta@ericsson.com>
Wed, 27 Nov 2019 10:06:08 +0000 (10:06 +0000)
commit248f2e3e7d2a05ee7240bf23e36403d03d267419
tree65ff1ad0962b7267ac87192d5dfb0b909c9c0c6c
parentc01f90847a398fa6d3043965ab4f5782ee1e4217
BGPVPN delete is throwing NPE

Issue Description:
=================
BGPVPN not getting Deleted and remaining stale due to the
exception[0] from CSC

[0]
<h3>Caused by:</h3><pre>java.lang.NullPointerException
at
org.opendaylight.netvirt.neutronvpn.NeutronvpnManager.removeVpn(NeutronvpnManager.java:2191)
at
org.opendaylight.netvirt.neutronvpn.NeutronvpnManager.deleteL3VPN(NeutronvpnManager.java:1443)

Solution:
=========
If BGPVPN instance has already disassociated from
Network(s), later user is trying to delete the BGPVPN
instance using REST API call, we should handle
proper null check to avoid the exceptions from
NeutronVpnManager. Since vpnmaps querying is causing
this Nullpointer Exception

Change-Id: I17037a52862cf851985931eff94a88bcfc951476
Signed-off-by: Karthikeyan Krishnan <karthikeyangceb007@gmail.com>
neutronvpn/impl/src/main/java/org/opendaylight/netvirt/neutronvpn/NeutronvpnManager.java