}
private void registerListener(final DataBroker db) {
- try {
- listenerRegistration = db.registerDataChangeListener(LogicalDatastoreType.OPERATIONAL,
- getWildCardPath(), ElanNodeListener.this, AsyncDataBroker.DataChangeScope.SUBTREE);
- } catch (final Exception e) {
- LOG.error("ElanNodeListener: DataChange listener registration fail!", e);
- throw new IllegalStateException("ElanNodeListener: registration Listener failed.", e);
- }
+ listenerRegistration = db.registerDataChangeListener(LogicalDatastoreType.OPERATIONAL,
+ getWildCardPath(), ElanNodeListener.this, AsyncDataBroker.DataChangeScope.SUBTREE);
}
private InstanceIdentifier<Node> getWildCardPath() {
return InstanceIdentifier.create(Nodes.class).child(Node.class);
}
-
@Override
protected void remove(InstanceIdentifier<Node> identifier, Node del) {
-
}
@Override
protected void update(InstanceIdentifier<Node> identifier, Node original, Node update) {
-
}
@Override
mkInstructions.add(new InstructionInfo(InstructionType.goto_table, new long[] { NwConstants.ELAN_DMAC_TABLE }));
List<MatchInfo> mkMatches = new ArrayList<>();
- FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.ELAN_SMAC_TABLE, getTableMissFlowRef(NwConstants.ELAN_SMAC_TABLE),
- 0, "ELAN sMac Table Miss Flow", 0, 0, ElanConstants.COOKIE_ELAN_KNOWN_SMAC,
- mkMatches, mkInstructions);
+ FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.ELAN_SMAC_TABLE,
+ getTableMissFlowRef(NwConstants.ELAN_SMAC_TABLE), 0, "ELAN sMac Table Miss Flow", 0, 0,
+ ElanConstants.COOKIE_ELAN_KNOWN_SMAC, mkMatches, mkInstructions);
mdsalManager.installFlow(flowEntity);
}
List<MatchInfo> mkMatches = new ArrayList<>();
List<InstructionInfo> mkInstructions = new ArrayList<>();
- mkInstructions.add(new InstructionInfo(InstructionType.goto_table, new long[] { NwConstants.ELAN_UNKNOWN_DMAC_TABLE }));
+ mkInstructions.add(
+ new InstructionInfo(InstructionType.goto_table, new long[] { NwConstants.ELAN_UNKNOWN_DMAC_TABLE }));
- FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.ELAN_DMAC_TABLE, getTableMissFlowRef(NwConstants.ELAN_DMAC_TABLE),
- 0, "ELAN dMac Table Miss Flow", 0, 0, ElanConstants.COOKIE_ELAN_KNOWN_DMAC,
- mkMatches, mkInstructions);
+ FlowEntity flowEntity = MDSALUtil.buildFlowEntity(dpId, NwConstants.ELAN_DMAC_TABLE,
+ getTableMissFlowRef(NwConstants.ELAN_DMAC_TABLE), 0, "ELAN dMac Table Miss Flow", 0, 0,
+ ElanConstants.COOKIE_ELAN_KNOWN_DMAC, mkMatches, mkInstructions);
mdsalManager.installFlow(flowEntity);
}
if (listenerRegistration != null) {
listenerRegistration.close();
}
-
}
}