last child of the parent
Change-Id: If6dfb7a35ae1d382e3540a49b2c85bdf492772fd
Signed-off-by: Faseela K <faseela.k@ericsson.com>
+ //Delete the interface child information
List<InterfaceChildEntry> interfaceChildEntries = interfaceParentEntry.getInterfaceChildEntry();
List<InterfaceChildEntry> interfaceChildEntries = interfaceParentEntry.getInterfaceChildEntry();
- if (interfaceChildEntries.size() <= 1) {
- // FIXME..some boundary problem during vlan member deletion..need to revisit
- //t.delete(LogicalDatastoreType.CONFIGURATION, interfaceParentEntryIid);
- } else {
- InterfaceChildEntryKey interfaceChildEntryKey = new InterfaceChildEntryKey(interfaceOld.getName());
- InstanceIdentifier<InterfaceChildEntry> interfaceChildEntryIid =
+ InterfaceChildEntryKey interfaceChildEntryKey = new InterfaceChildEntryKey(interfaceOld.getName());
+ InstanceIdentifier<InterfaceChildEntry> interfaceChildEntryIid =
InterfaceMetaUtils.getInterfaceChildEntryIdentifier(interfaceParentEntryKey, interfaceChildEntryKey);
InterfaceMetaUtils.getInterfaceChildEntryIdentifier(interfaceParentEntryKey, interfaceChildEntryKey);
- t.delete(LogicalDatastoreType.CONFIGURATION, interfaceChildEntryIid);
+ t.delete(LogicalDatastoreType.CONFIGURATION, interfaceChildEntryIid);
+ //If this is the last child, remove the interface parent info as well.
+ if (interfaceChildEntries.size() <= 1) {
+ t.delete(LogicalDatastoreType.CONFIGURATION, interfaceParentEntryIid);
}
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface ifState =
}
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface ifState =