import org.opendaylight.openflowplugin.openflow.md.core.translator.ExperimenterTranslator;
import org.opendaylight.openflowplugin.openflow.md.core.translator.FlowRemovedTranslator;
import org.opendaylight.openflowplugin.openflow.md.core.translator.MultiPartMessageDescToNodeUpdatedTranslator;
+import org.opendaylight.openflowplugin.openflow.md.core.translator.MultiPartReplyPortToNodeConnectorUpdatedTranslator;
+import org.opendaylight.openflowplugin.openflow.md.core.translator.MultipartReplyTableFeaturesToTableUpdatedTranslator;
+import org.opendaylight.openflowplugin.openflow.md.core.translator.MultipartReplyTranslator;
import org.opendaylight.openflowplugin.openflow.md.core.translator.PacketInTranslator;
+import org.opendaylight.openflowplugin.openflow.md.core.translator.PortStatusMessageToNodeConnectorUpdatedTranslator;
+import org.opendaylight.openflowplugin.openflow.md.lldp.LLDPSpeakerPopListener;
import org.opendaylight.openflowplugin.openflow.md.queue.PopListener;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorUpdated;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SwitchFlowRemoved;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.NodeErrorNotification;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.AggregateFlowStatisticsUpdate;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.statistics.rev130819.FlowsStatisticsUpdate;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.table.statistics.rev131215.FlowTableStatisticsUpdate;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupDescStatsUpdated;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupFeaturesUpdated;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.group.statistics.rev131111.GroupStatisticsUpdated;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeUpdated;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.MeterConfigStatsUpdated;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.MeterFeaturesUpdated;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.MeterStatisticsUpdated;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessage;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessage;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessage;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessage;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessage;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessage;
import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived;
import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.NodeConnectorStatisticsUpdate;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.queue.statistics.rev131216.QueueStatisticsUpdate;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.TableUpdated;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
addMessageTranslator(FlowRemovedMessage.class, OF13, new FlowRemovedTranslator());
addMessageTranslator(PacketInMessage.class,OF10, new PacketInTranslator());
addMessageTranslator(PacketInMessage.class,OF13, new PacketInTranslator());
+ addMessageTranslator(PortStatusMessage.class,OF10, new PortStatusMessageToNodeConnectorUpdatedTranslator());
+ addMessageTranslator(PortStatusMessage.class,OF13, new PortStatusMessageToNodeConnectorUpdatedTranslator());
+ addMessageTranslator(MultipartReplyMessage.class,OF13,new MultiPartReplyPortToNodeConnectorUpdatedTranslator());
addMessageTranslator(MultipartReplyMessage.class,OF13, new MultiPartMessageDescToNodeUpdatedTranslator());
addMessageTranslator(ExperimenterMessage.class, OF10, new ExperimenterTranslator());
+ addMessageTranslator(MultipartReplyMessage.class,OF10, new MultipartReplyTranslator());
+ addMessageTranslator(MultipartReplyMessage.class,OF13, new MultipartReplyTranslator());
+ addMessageTranslator(MultipartReplyMessage.class,OF13,new MultipartReplyTableFeaturesToTableUpdatedTranslator());
//TODO: move registration to factory
NotificationPopListener<DataObject> notificationPopListener = new NotificationPopListener<DataObject>();
+ addMessagePopListener(NodeErrorNotification.class, notificationPopListener);
+ addMessagePopListener(NodeConnectorUpdated.class,notificationPopListener);
addMessagePopListener(PacketReceived.class,notificationPopListener);
addMessagePopListener(TransmitPacketInput.class, notificationPopListener);
addMessagePopListener(NodeUpdated.class, notificationPopListener);
+ addMessagePopListener(SwitchFlowRemoved.class, notificationPopListener);
+ addMessagePopListener(TableUpdated.class, notificationPopListener);
+
+ //Notification registration for flow statistics
+ addMessagePopListener(FlowsStatisticsUpdate.class, notificationPopListener);
+ addMessagePopListener(AggregateFlowStatisticsUpdate.class, notificationPopListener);
+
+ //Notification registrations for group-statistics
+ addMessagePopListener(GroupStatisticsUpdated.class, notificationPopListener);
+ addMessagePopListener(GroupFeaturesUpdated.class, notificationPopListener);
+ addMessagePopListener(GroupDescStatsUpdated.class, notificationPopListener);
+
+ //Notification registrations for meter-statistics
+ addMessagePopListener(MeterStatisticsUpdated.class, notificationPopListener);
+ addMessagePopListener(MeterConfigStatsUpdated.class, notificationPopListener);
+ addMessagePopListener(MeterFeaturesUpdated.class, notificationPopListener);
+
+ //Notification registration for port-statistics
+ addMessagePopListener(NodeConnectorStatisticsUpdate.class, notificationPopListener);
+
+ //Notification registration for flow-table statistics
+ addMessagePopListener(FlowTableStatisticsUpdate.class, notificationPopListener);
+
+ //Notification registration for queue-statistics
+ addMessagePopListener(QueueStatisticsUpdate.class, notificationPopListener);
+
+ //Notification for LLDPSpeaker
+ LLDPSpeakerPopListener<DataObject> lldpPopListener = new LLDPSpeakerPopListener<DataObject>();
+ addMessagePopListener(NodeConnectorUpdated.class,lldpPopListener);
+
// Push the updated Listeners to Session Manager which will be then picked up by ConnectionConductor eventually
OFSessionUtil.getSessionManager().setTranslatorMapping(messageTranslators);
OFSessionUtil.getSessionManager().setPopListenerMapping(popListeners);
private static Collection<ConnectionConfiguration> getConnectionConfiguration() {
// TODO:: get config from state manager
ConnectionConfiguration configuration = ConnectionConfigurationFactory.getDefault();
- return Lists.newArrayList(configuration);
+ ConnectionConfiguration configurationLegacy = ConnectionConfigurationFactory.getLegacy();
+ return Lists.newArrayList(configuration, configurationLegacy);
}
/**