use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.network.instance.protocol.bgp.neighbor_state.augmentation.messages.Received in project openflowplugin by opendaylight.
the class TableForwarder method update.
@Override
public void update(final InstanceIdentifier<TableFeatures> identifier, final TableFeatures original, final TableFeatures update, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
LOG.debug("Received the Table Update request [Tbl id, node Id, original, upd" + " " + identifier + " " + nodeIdent + " " + original + " " + update);
final TableFeatures originalTableFeatures = original;
TableFeatures updatedTableFeatures;
if (null == update) {
updatedTableFeatures = original;
} else {
updatedTableFeatures = update;
}
final UpdateTableInputBuilder builder = new UpdateTableInputBuilder();
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
// TODO: reconsider model - this particular field is not used in service
// implementation
builder.setTableRef(new TableRef(identifier));
builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
builder.setUpdatedTable(new UpdatedTableBuilder().setTableFeatures(Collections.singletonList(updatedTableFeatures)).build());
builder.setOriginalTable(new OriginalTableBuilder().setTableFeatures(Collections.singletonList(originalTableFeatures)).build());
LOG.debug("Invoking SalTableService ");
if (this.provider.getSalTableService() != null) {
LOG.debug(" Handle to SalTableServices" + this.provider.getSalTableService());
}
final Future<RpcResult<UpdateTableOutput>> resultFuture = this.provider.getSalTableService().updateTable(builder.build());
JdkFutures.addErrorLogging(resultFuture, LOG, "updateTable");
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.network.instance.protocol.bgp.neighbor_state.augmentation.messages.Received in project openflowplugin by opendaylight.
the class DeviceMastershipManager method onNodeRemoved.
@Override
public void onNodeRemoved(NodeRemoved notification) {
LOG.debug("NodeRemoved notification received : {}", notification);
NodeId nodeId = notification.getNodeRef().getValue().firstKeyOf(Node.class).getId();
final DeviceMastership mastership = deviceMasterships.remove(nodeId);
if (mastership != null) {
mastership.close();
LOG.info("Unregistered FRM cluster singleton service for service id : {}", nodeId.getValue());
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.network.instance.protocol.bgp.neighbor_state.augmentation.messages.Received in project openflowplugin by opendaylight.
the class OpenflowProtocolListenerInitialImpl method onEchoRequestMessage.
@Override
public void onEchoRequestMessage(final EchoRequestMessage echoRequestMessage) {
if (LOG.isDebugEnabled()) {
LOG.debug("echo request received: {}", echoRequestMessage.getXid());
}
EchoReplyInputBuilder builder = new EchoReplyInputBuilder();
builder.setVersion(echoRequestMessage.getVersion());
builder.setXid(echoRequestMessage.getXid());
builder.setData(echoRequestMessage.getData());
connectionContext.getConnectionAdapter().echoReply(builder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.network.instance.protocol.bgp.neighbor_state.augmentation.messages.Received in project openflowplugin by opendaylight.
the class SwitchConnectionProviderImpl method createAndConfigureServer.
private ServerFacade createAndConfigureServer() {
LOG.debug("Configuring ..");
ServerFacade server = null;
final ChannelInitializerFactory factory = new ChannelInitializerFactory();
factory.setSwitchConnectionHandler(switchConnectionHandler);
factory.setSwitchIdleTimeout(connConfig.getSwitchIdleTimeout());
factory.setTlsConfig(connConfig.getTlsConfiguration());
factory.setSerializationFactory(serializationFactory);
factory.setDeserializationFactory(deserializationFactory);
factory.setUseBarrier(connConfig.useBarrier());
factory.setChannelOutboundQueueSize(connConfig.getChannelOutboundQueueSize());
final TransportProtocol transportProtocol = (TransportProtocol) connConfig.getTransferProtocol();
// Check if Epoll native transport is available.
// TODO : Add option to disable Epoll.
boolean isEpollEnabled = Epoll.isAvailable();
if (TransportProtocol.TCP.equals(transportProtocol) || TransportProtocol.TLS.equals(transportProtocol)) {
server = new TcpHandler(connConfig.getAddress(), connConfig.getPort());
final TcpChannelInitializer channelInitializer = factory.createPublishingChannelInitializer();
((TcpHandler) server).setChannelInitializer(channelInitializer);
((TcpHandler) server).initiateEventLoopGroups(connConfig.getThreadConfiguration(), isEpollEnabled);
final EventLoopGroup workerGroupFromTcpHandler = ((TcpHandler) server).getWorkerGroup();
connectionInitializer = new TcpConnectionInitializer(workerGroupFromTcpHandler, isEpollEnabled);
connectionInitializer.setChannelInitializer(channelInitializer);
connectionInitializer.run();
} else if (TransportProtocol.UDP.equals(transportProtocol)) {
server = new UdpHandler(connConfig.getAddress(), connConfig.getPort());
((UdpHandler) server).initiateEventLoopGroups(connConfig.getThreadConfiguration(), isEpollEnabled);
((UdpHandler) server).setChannelInitializer(factory.createUdpChannelInitializer());
} else {
throw new IllegalStateException("Unknown transport protocol received: " + transportProtocol);
}
server.setThreadConfig(connConfig.getThreadConfiguration());
return server;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.network.instance.protocol.bgp.neighbor_state.augmentation.messages.Received in project openflowplugin by opendaylight.
the class AggregateFlowsInTableService method transformToNotification.
@Override
public AggregateFlowStatisticsUpdate transformToNotification(List<MultipartReply> result, TransactionId emulatedTxId) {
final int mpSize = result.size();
Preconditions.checkArgument(mpSize == 1, "unexpected (!=1) mp-reply size received: {}", mpSize);
MultipartReply mpReply = result.get(0);
final TranslatorKey translatorKey = new TranslatorKey(mpReply.getVersion(), MultipartReplyAggregateCase.class.getName());
final MessageTranslator<MultipartReply, AggregatedFlowStatistics> messageTranslator = translatorLibrary.lookupTranslator(translatorKey);
final AggregatedFlowStatistics flowStatistics = messageTranslator.translate(mpReply, getDeviceInfo(), null);
final AggregateFlowStatisticsUpdateBuilder notification = new AggregateFlowStatisticsUpdateBuilder(flowStatistics).setId(getDeviceInfo().getNodeId()).setMoreReplies(Boolean.FALSE).setTransactionId(emulatedTxId);
return notification.build();
}
Aggregations