Node node = getNodeFromDataStore(delInterface);
if((node != null) &&(node.getNodeConnector().isEmpty())) {
dbDpnEndpoints.remove(node.getId());
+ LOG.trace("dbDpnEndpoints: {}",dbDpnEndpoints);
}
}
}
void processPortUpdate(NodeConnector oldPort, NodeConnector update) {
//TODO: Currently nothing to do here.
- LOG.trace("ifMap: {}, dpnMap: {}", mapNcToInterfaceName, dbDpnEndpoints);
}
void processPortDelete(NodeConnector port) {
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceBuilder ifaceBuilder =
new org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.InterfaceBuilder();
if (stateIf.isPresent()) {
- stateIface = ifaceBuilder.setOperStatus(opStatus).build();
+ stateIface = ifaceBuilder.setOperStatus(opStatus).setKey(IfmUtil.getStateInterfaceKeyFromName(ifName)).build();
LOG.trace("Setting OperStatus for {} to {} in OPERATIONAL DS", ifName, opStatus);
asyncUpdate(LogicalDatastoreType.OPERATIONAL, id, stateIface, DEFAULT_CALLBACK);
}
//TODO: This should be an MDSAL Util method
return Long.parseLong(IfmUtil.getDpnFromNodeConnectorId(port.getId()));
} catch (NullPointerException e) {
- LOG.error("OFPort for Interface {} not found", ifName);
+ LOG.error("dpn for Interface {} not found", ifName);
}
return 0L;
}
Class<? extends InterfaceType> ifType = iface.getType();
long dpn = this.getDpnForInterface(ifName);
long portNo = this.getPortNumForInterface(iface).longValue();
-
if (iface.isEnabled()) {
if(ifType.isAssignableFrom(L2vlan.class)) {
IfL2vlan vlanIface = iface.getAugmentation(IfL2vlan.class);
- long vlanVid = vlanIface.getVlanId();
LOG.trace("L2Vlan: {}",vlanIface);
+ long vlanVid = (vlanIface == null) ? 0 : vlanIface.getVlanId();
if (vlanVid != 0) {
listActionInfo.add(new ActionInfo(ActionType.push_vlan, new String[] {}));
listActionInfo.add(new ActionInfo(ActionType.set_field_vlan_vid,
} catch (Exception e) {
LOG.error("OFPort for Interface {} not found", iface.getName());
}
- return null;
+ return 0L;
}
}