use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.DatapathId in project openflowplugin by opendaylight.
the class InventoryDataServiceUtilTest method testNodeConnectorUpdatedBuilderFromDatapathIdPortNo.
/**
* Test method for {@link InventoryDataServiceUtil#nodeConnectorUpdatedBuilderFromDatapathIdPortNo(
* BigInteger datapathId, Long portNo, OpenflowVersion ofVersion)}.
*/
@Test
public void testNodeConnectorUpdatedBuilderFromDatapathIdPortNo() {
NodeConnectorUpdatedBuilder nodeConnectorUpdatedBuilder = InventoryDataServiceUtil.nodeConnectorUpdatedBuilderFromDatapathIdPortNo(PATH_ID, PORT_NO, OpenflowVersion.OF10);
assertNotNull(nodeConnectorUpdatedBuilder);
nodeConnectorUpdatedBuilder = InventoryDataServiceUtil.nodeConnectorUpdatedBuilderFromDatapathIdPortNo(PATH_ID, PORT_NO, OpenflowVersion.OF13);
assertNotNull(nodeConnectorUpdatedBuilder);
nodeConnectorUpdatedBuilder = InventoryDataServiceUtil.nodeConnectorUpdatedBuilderFromDatapathIdPortNo(PATH_ID, PORT_NO, OpenflowVersion.UNSUPPORTED);
assertNotNull(nodeConnectorUpdatedBuilder);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.DatapathId in project genius by opendaylight.
the class InterfaceTopologyStateListener method update.
@Override
protected void update(InstanceIdentifier<OvsdbBridgeAugmentation> identifier, OvsdbBridgeAugmentation bridgeOld, OvsdbBridgeAugmentation bridgeNew) {
LOG.debug("Received Update DataChange Notification for identifier: {}, ovsdbBridgeAugmentation old: {}, new: {}.", identifier, bridgeOld, bridgeNew);
InstanceIdentifier<Node> nodeIid = identifier.firstIdentifierOf(Node.class);
interfaceMgrProvider.addBridgeForNodeIid(nodeIid, bridgeNew);
runOnlyInOwnerNode("OVSDB bridge updated", () -> {
DatapathId oldDpid = bridgeOld.getDatapathId();
DatapathId newDpid = bridgeNew.getDatapathId();
if (oldDpid == null && newDpid != null) {
RendererStateAddWorker rendererStateAddWorker = new RendererStateAddWorker(identifier, bridgeNew);
coordinator.enqueueJob(bridgeNew.getBridgeName().getValue(), rendererStateAddWorker, IfmConstants.JOB_MAX_RETRIES);
} else if (oldDpid != null && !oldDpid.equals(newDpid)) {
RendererStateUpdateWorker rendererStateAddWorker = new RendererStateUpdateWorker(identifier, bridgeNew, bridgeOld);
coordinator.enqueueJob(bridgeNew.getBridgeName().getValue(), rendererStateAddWorker, IfmConstants.JOB_MAX_RETRIES);
}
});
}
Aggregations