Search in sources :

Example 16 with Messages

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 in project openflowplugin by opendaylight.

the class SalBundleServiceImplTest method testAddBundleMessages.

@Test
public void testAddBundleMessages() throws Exception {
    final List<Message> innerMessages = createMessages();
    final Messages messages = new MessagesBuilder().setMessage(innerMessages).build();
    final AddBundleMessagesInput input = new AddBundleMessagesInputBuilder().setNode(NODE_REF).setBundleId(BUNDLE_ID).setFlags(BUNDLE_FLAGS).setBundleProperty(properties).setMessages(messages).build();
    final SalAddMessageDataBuilder dataBuilder = new SalAddMessageDataBuilder();
    dataBuilder.setBundleId(BUNDLE_ID).setFlags(BUNDLE_FLAGS).setBundleProperty(properties);
    final BundleAddMessageSalBuilder addMessageBuilder = new BundleAddMessageSalBuilder();
    final SendExperimenterInputBuilder experimenterBuilder = new SendExperimenterInputBuilder().setNode(NODE_REF);
    Mockito.when(experimenterMessageService.sendExperimenter(Matchers.any())).thenReturn(SettableFuture.create());
    service.addBundleMessages(input);
    for (Message msg : innerMessages) {
        Mockito.verify(experimenterMessageService).sendExperimenter(experimenterBuilder.setExperimenterMessageOfChoice(addMessageBuilder.setSalAddMessageData(dataBuilder.setNode(NODE_REF).setBundleInnerMessage(msg.getBundleInnerMessage()).build()).build()).build());
    }
}
Also used : AddBundleMessagesInput(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInput) BundleAddMessageSalBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.send.experimenter.input.experimenter.message.of.choice.BundleAddMessageSalBuilder) Messages(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.Messages) Message(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.messages.Message) AddBundleMessagesInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInputBuilder) SalAddMessageDataBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.send.experimenter.input.experimenter.message.of.choice.bundle.add.message.sal.SalAddMessageDataBuilder) SendExperimenterInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.message.service.rev151020.SendExperimenterInputBuilder) MessagesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.MessagesBuilder) Test(org.junit.Test)

Example 17 with Messages

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 in project openflowplugin by opendaylight.

the class ConnectionAdapterImplStatisticsTest method testMessagePassCounter.

/**
 * Test counter for pass messages to consumer (counter US_MESSAGE_PASS has to be enabled).
 */
@Test
public void testMessagePassCounter() {
    if (!statCounters.isCounterEnabled(CounterEventTypes.US_MESSAGE_PASS)) {
        Assert.fail("Counter " + CounterEventTypes.US_MESSAGE_PASS + " is not enabled");
    }
    when(channel.pipeline()).thenReturn(pipeline);
    adapter = new ConnectionAdapterImpl(channel, InetSocketAddress.createUnresolved("10.0.0.1", 6653), true, CHANNEL_OUTBOUND_QUEUE_SIZE);
    adapter.setMessageListener(messageListener);
    adapter.setSystemListener(systemListener);
    adapter.setConnectionReadyListener(readyListener);
    cache = CacheBuilder.newBuilder().concurrencyLevel(1).expireAfterWrite(RPC_RESPONSE_EXPIRATION, TimeUnit.MINUTES).removalListener(REMOVAL_LISTENER).build();
    adapter.setResponseCache(cache);
    when(channel.disconnect()).thenReturn(channelFuture);
    DataObject message = new EchoRequestMessageBuilder().build();
    adapter.consume(message);
    message = new ErrorMessageBuilder().build();
    adapter.consume(message);
    message = new ExperimenterMessageBuilder().build();
    adapter.consume(message);
    message = new FlowRemovedMessageBuilder().build();
    adapter.consume(message);
    message = new HelloMessageBuilder().build();
    adapter.consume(message);
    message = new MultipartReplyMessageBuilder().build();
    adapter.consume(message);
    message = new PacketInMessageBuilder().build();
    adapter.consume(message);
    message = new PortStatusMessageBuilder().build();
    adapter.consume(message);
    message = new EchoRequestMessageBuilder().build();
    adapter.consume(message);
    Assert.assertEquals("Wrong - bad counter value for ConnectionAdapterImpl consume method", 9, statCounters.getCounter(CounterEventTypes.US_MESSAGE_PASS).getCounterValue());
    adapter.disconnect();
}
Also used : ErrorMessageBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ErrorMessageBuilder) ExperimenterMessageBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessageBuilder) PacketInMessageBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessageBuilder) DataObject(org.opendaylight.yangtools.yang.binding.DataObject) PortStatusMessageBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortStatusMessageBuilder) HelloMessageBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloMessageBuilder) MultipartReplyMessageBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.MultipartReplyMessageBuilder) FlowRemovedMessageBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemovedMessageBuilder) EchoRequestMessageBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.EchoRequestMessageBuilder) Test(org.junit.Test)

Example 18 with Messages

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 in project openflowplugin by opendaylight.

the class Activator method onDataTreeChanged.

@Override
public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<FlowCapableNode>> modifications) {
    for (DataTreeModification modification : modifications) {
        if (modification.getRootNode().getModificationType() == ModificationType.WRITE) {
            LOG.info("Node connected:  {}", modification.getRootPath().getRootIdentifier().firstIdentifierOf(Node.class));
            final NodeRef nodeRef = new NodeRef(modification.getRootPath().getRootIdentifier().firstIdentifierOf(Node.class));
            final ControlBundleInput openBundleInput = new ControlBundleInputBuilder().setNode(nodeRef).setBundleId(BUNDLE_ID).setFlags(BUNDLE_FLAGS).setType(BundleControlType.ONFBCTOPENREQUEST).build();
            final ControlBundleInput commitBundleInput = new ControlBundleInputBuilder().setNode(nodeRef).setBundleId(BUNDLE_ID).setFlags(BUNDLE_FLAGS).setType(BundleControlType.ONFBCTCOMMITREQUEST).build();
            final List<Message> innerMessages = createMessages(nodeRef);
            final Messages messages = new MessagesBuilder().setMessage(innerMessages).build();
            final AddBundleMessagesInput addBundleMessagesInput = new AddBundleMessagesInputBuilder().setNode(nodeRef).setBundleId(BUNDLE_ID).setFlags(BUNDLE_FLAGS).setMessages(messages).build();
            makeCompletableFuture(bundleService.controlBundle(openBundleInput)).thenComposeAsync(voidRpcResult -> {
                LOG.debug("Open successful: {}, msg: {}", voidRpcResult.isSuccessful(), voidRpcResult.getErrors());
                final CompletableFuture<RpcResult<Void>> addFuture = makeCompletableFuture(bundleService.addBundleMessages(addBundleMessagesInput));
                return addFuture;
            }).thenComposeAsync(voidRpcResult -> {
                LOG.debug("AddBundleMessages successful: {}, msg: {}", voidRpcResult.isSuccessful(), voidRpcResult.getErrors());
                final CompletableFuture<RpcResult<Void>> controlCommitFuture = makeCompletableFuture(bundleService.controlBundle(commitBundleInput));
                return controlCommitFuture;
            }).thenAccept(voidRpcResult -> {
                LOG.debug("Commit successful: {}, msg: {}", voidRpcResult.isSuccessful(), voidRpcResult.getErrors());
            });
        }
    }
}
Also used : DataTreeModification(org.opendaylight.controller.md.sal.binding.api.DataTreeModification) ControlBundleInput(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.ControlBundleInput) BundleId(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.BundleId) ClusteredDataTreeChangeListener(org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener) Messages(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.Messages) LoggerFactory(org.slf4j.LoggerFactory) Flow(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow) MessageBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.messages.MessageBuilder) InstructionsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder) SetFieldCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCaseBuilder) Ipv4Prefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix) Future(java.util.concurrent.Future) ActionKey(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionKey) BundleControlType(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.BundleControlType) PopVlanActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PopVlanActionCaseBuilder) FlowKey(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowKey) ConsumerContext(org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ConsumerContext) ControlBundleInput(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.ControlBundleInput) BigInteger(java.math.BigInteger) Bucket(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket) AddGroupCaseDataBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.bundle.inner.message.grouping.bundle.inner.message.bundle.add.group._case.AddGroupCaseDataBuilder) Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action) NodeRef(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef) ControlBundleInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.ControlBundleInputBuilder) Collection(java.util.Collection) LogicalDatastoreType(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType) GroupId(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId) Message(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.messages.Message) FlowCookie(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie) ApplyActionsCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder) ApplyActionsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder) AddBundleMessagesInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInputBuilder) Executors(java.util.concurrent.Executors) DataBroker(org.opendaylight.controller.md.sal.binding.api.DataBroker) BundleContext(org.osgi.framework.BundleContext) EthernetMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder) BindingAwareConsumer(org.opendaylight.controller.sal.binding.api.BindingAwareConsumer) BindingAwareBroker(org.opendaylight.controller.sal.binding.api.BindingAwareBroker) List(java.util.List) SetFieldBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.field._case.SetFieldBuilder) SalBundleService(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.SalBundleService) Ipv4MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder) GroupActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.group.action._case.GroupActionBuilder) InstructionKey(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionKey) BucketBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.BucketBuilder) PopVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.vlan.action._case.PopVlanActionBuilder) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) EthernetTypeBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ethernet.match.fields.EthernetTypeBuilder) CompletableFuture(java.util.concurrent.CompletableFuture) BundleFlags(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.rev170124.BundleFlags) FlowCapableNode(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode) FlowBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.FlowBuilder) EtherType(org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.EtherType) FlowId(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId) AddBundleMessagesInput(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInput) ArrayList(java.util.ArrayList) GroupKey(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.GroupKey) BucketsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.BucketsBuilder) Nonnull(javax.annotation.Nonnull) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) ExecutorService(java.util.concurrent.ExecutorService) InstructionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder) AbstractBrokerAwareActivator(org.opendaylight.controller.sal.binding.api.AbstractBrokerAwareActivator) Logger(org.slf4j.Logger) BucketId(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.BucketId) MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder) BundleAddGroupCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.bundle.inner.message.grouping.bundle.inner.message.BundleAddGroupCaseBuilder) MessagesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.MessagesBuilder) ExecutionException(java.util.concurrent.ExecutionException) ModificationType(org.opendaylight.controller.md.sal.binding.api.DataObjectModification.ModificationType) GroupBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.GroupBuilder) Nodes(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes) AddFlowCaseDataBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.bundle.inner.message.grouping.bundle.inner.message.bundle.add.flow._case.AddFlowCaseDataBuilder) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) DataTreeModification(org.opendaylight.controller.md.sal.binding.api.DataTreeModification) GroupActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.GroupActionCaseBuilder) GroupTypes(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupTypes) DataTreeIdentifier(org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier) ActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction) BundleAddFlowCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.bundle.inner.message.grouping.bundle.inner.message.BundleAddFlowCaseBuilder) Group(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.Group) AddBundleMessagesInput(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInput) Messages(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.Messages) Message(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.messages.Message) AddBundleMessagesInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInputBuilder) FlowCapableNode(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) MessagesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.MessagesBuilder) NodeRef(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef) ControlBundleInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.ControlBundleInputBuilder) CompletableFuture(java.util.concurrent.CompletableFuture)

Example 19 with Messages

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 in project bgpcep by opendaylight.

the class TopologyStatsRpcServiceImplTest method createTopologySessionState.

private static PcepSessionState createTopologySessionState() {
    final ReplyTime replyTime = new ReplyTimeBuilder().setAverageTime(Uint32.ONE).setMaxTime(Uint32.valueOf(3)).setMinTime(Uint32.TWO).build();
    final ErrorMessages errorMsg = new ErrorMessagesBuilder().setReceivedErrorMsgCount(Uint32.ONE).setSentErrorMsgCount(Uint32.valueOf(2)).build();
    final StatefulMessagesStatsAug statefulMsg = new StatefulMessagesStatsAugBuilder().setLastReceivedRptMsgTimestamp(Uint32.valueOf(1553183614L)).setSentUpdMsgCount(Uint32.ONE).setReceivedRptMsgCount(Uint32.TWO).setSentInitMsgCount(Uint32.valueOf(3)).build();
    final Messages messages = new MessagesBuilder().setLastSentMsgTimestamp(Uint32.valueOf(1553183734L)).setUnknownMsgReceived(Uint16.ONE).setSentMsgCount(Uint32.valueOf(5)).setReceivedMsgCount(Uint32.valueOf(4)).setReplyTime(replyTime).setErrorMessages(errorMsg).addAugmentation(statefulMsg).build();
    final PeerCapabilities capabilities = new PeerCapabilitiesBuilder().addAugmentation(new StatefulCapabilitiesStatsAugBuilder().setStateful(true).setInstantiation(true).setActive(true).build()).build();
    final LocalPref localPref = new LocalPrefBuilder().setKeepalive(Uint8.valueOf(30)).setDeadtimer(Uint8.valueOf(120)).setIpAddress("127.0.0.1").setSessionId(Uint16.ZERO).addAugmentation(new PcepEntityIdStatsAugBuilder().setSpeakerEntityIdValue(new byte[] { 0x01, 0x02, 0x03, 0x04 }).build()).build();
    return new PcepSessionStateBuilder().setSynchronized(true).setSessionDuration("0:00:05:18").setDelegatedLspsCount(Uint16.ONE).setLocalPref(localPref).setPeerPref(new PeerPrefBuilder(localPref).build()).setPeerCapabilities(capabilities).setMessages(messages).build();
}
Also used : LocalPrefBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.LocalPrefBuilder) Messages(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.Messages) ErrorMessages(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.error.messages.grouping.ErrorMessages) StatefulMessagesStatsAugBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stateful.stats.rev181109.StatefulMessagesStatsAugBuilder) PeerPrefBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.PeerPrefBuilder) ReplyTime(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.reply.time.grouping.ReplyTime) MessagesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.MessagesBuilder) ErrorMessagesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.error.messages.grouping.ErrorMessagesBuilder) ErrorMessages(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.error.messages.grouping.ErrorMessages) PcepEntityIdStatsAugBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stateful.stats.rev181109.PcepEntityIdStatsAugBuilder) ReplyTimeBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.reply.time.grouping.ReplyTimeBuilder) LocalPref(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.LocalPref) PcepSessionStateBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.grouping.PcepSessionStateBuilder) ErrorMessagesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.error.messages.grouping.ErrorMessagesBuilder) PeerCapabilities(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.PeerCapabilities) StatefulCapabilitiesStatsAugBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stateful.stats.rev181109.StatefulCapabilitiesStatsAugBuilder) PeerCapabilitiesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.PeerCapabilitiesBuilder) StatefulMessagesStatsAug(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stateful.stats.rev181109.StatefulMessagesStatsAug)

Example 20 with Messages

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 in project bgpcep by opendaylight.

the class NeighborStateCliUtils method printMessagesState.

private static void printMessagesState(final State neighborState, final ShellTable table) {
    final BgpNeighborStateAugmentation state = neighborState.augmentation(BgpNeighborStateAugmentation.class);
    if (state == null) {
        return;
    }
    addHeader(table, "Messages state");
    final Messages messages = state.getMessages();
    table.addRow().addContent("Messages Received", "");
    final Received received = messages.getReceived();
    table.addRow().addContent("NOTIFICATION", received.getNOTIFICATION());
    table.addRow().addContent("UPDATE", received.getUPDATE());
    final Sent sent = messages.getSent();
    table.addRow().addContent("Messages Sent", "");
    table.addRow().addContent("NOTIFICATION", sent.getNOTIFICATION());
    table.addRow().addContent("UPDATE", sent.getUPDATE());
}
Also used : Messages(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.network.instance.protocol.bgp.neighbor_state.augmentation.Messages) Received(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.network.instance.protocol.bgp.neighbor_state.augmentation.messages.Received) BgpNeighborStateAugmentation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.network.instance.protocol.BgpNeighborStateAugmentation) Sent(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180329.network.instance.protocol.bgp.neighbor_state.augmentation.messages.Sent)

Aggregations

ArrayList (java.util.ArrayList)8 LocalPref (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.LocalPref)6 Messages (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.Messages)6 ErrorMessages (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.error.messages.grouping.ErrorMessages)5 Test (org.junit.Test)4 LocalPrefBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.LocalPrefBuilder)4 MessagesBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.MessagesBuilder)4 PeerCapabilities (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.PeerCapabilities)4 PeerCapabilitiesBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.PeerCapabilitiesBuilder)4 PcepSessionStateBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.grouping.PcepSessionStateBuilder)4 ReplyTime (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.reply.time.grouping.ReplyTime)4 MessagesBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.MessagesBuilder)3 Message (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.add.bundle.messages.input.messages.Message)3 BigInteger (java.math.BigInteger)2 HashSet (java.util.HashSet)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 ExecutionException (java.util.concurrent.ExecutionException)2 NonNull (org.eclipse.jdt.annotation.NonNull)2 IpVersionChoice (org.opendaylight.netvirt.neutronvpn.api.enums.IpVersionChoice)2 Uuid (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid)2