X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=interfacemgr%2Finterfacemgr-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fvpnservice%2Finterfacemgr%2Frenderer%2Fovs%2Fconfighelpers%2FOvsInterfaceConfigRemoveHelper.java;h=97187870bde731fdff3b71b45781c9b6a48ae454;hb=9c0e16907ffb4d6c79ea397885f9dfed738dc848;hp=fe92920478682621050574990b936134d2af373e;hpb=9c5a326cda49fd1ba17380c081e3dce70b9781a8;p=vpnservice.git diff --git a/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/renderer/ovs/confighelpers/OvsInterfaceConfigRemoveHelper.java b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/renderer/ovs/confighelpers/OvsInterfaceConfigRemoveHelper.java index fe929204..97187870 100644 --- a/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/renderer/ovs/confighelpers/OvsInterfaceConfigRemoveHelper.java +++ b/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/renderer/ovs/confighelpers/OvsInterfaceConfigRemoveHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others. All rights reserved. + * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -78,7 +78,7 @@ public class OvsInterfaceConfigRemoveHelper { private static void removeVlanConfiguration(DataBroker dataBroker, ParentRefs parentRefs, Interface interfaceOld, WriteTransaction transaction) { LOG.debug("removing vlan configuration for {}",interfaceOld.getName()); IfL2vlan ifL2vlan = interfaceOld.getAugmentation(IfL2vlan.class); - if (ifL2vlan == null || ifL2vlan.getL2vlanMode() != IfL2vlan.L2vlanMode.Trunk) { + if (ifL2vlan == null || (IfL2vlan.L2vlanMode.Trunk != ifL2vlan.getL2vlanMode() && IfL2vlan.L2vlanMode.Transparent != ifL2vlan.getL2vlanMode())) { return; } org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface ifState = @@ -88,9 +88,9 @@ public class OvsInterfaceConfigRemoveHelper { return; } - InterfaceManagerCommonUtils.updateOperStatus(interfaceOld.getName(), OperStatus.Down, transaction); - NodeConnectorId ncId = new NodeConnectorId(ifState.getLowerLayerIf().get(0)); - BigInteger dpId = new BigInteger(IfmUtil.getDpnFromNodeConnectorId(ncId)); + InterfaceManagerCommonUtils.deleteStateEntry(interfaceOld.getName(), transaction); + + BigInteger dpId = IfmUtil.getDpnFromInterface(ifState); FlowBasedServicesUtils.removeIngressFlow(interfaceOld.getName(), dpId, transaction); InterfaceManagerCommonUtils.deleteParentInterfaceEntry(transaction, parentRefs.getParentInterface()); // For Vlan-Trunk Interface, remove the trunk-member operstates as well...