Search in sources :

Example 1 with PcepEntityIdStatsAug

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stateful.stats.rev171113.PcepEntityIdStatsAug in project bgpcep by opendaylight.

the class PcepStateUtils method displayNodeState.

private static void displayNodeState(final String topologyId, final String nodeId, final PcepSessionState pcepSessionState, final PrintStream stream) {
    final ShellTable table = new ShellTable();
    table.column("Attribute").alignLeft();
    table.column("Value").alignLeft();
    showNodeState(table, topologyId, nodeId, pcepSessionState);
    addHeader(table, "Local preferences");
    final LocalPref localPref = pcepSessionState.getLocalPref();
    showPreferences(table, localPref);
    final PcepEntityIdStatsAug entAug = localPref.getAugmentation(PcepEntityIdStatsAug.class);
    if (entAug != null) {
        table.addRow().addContent("Speaker Entity Identifier", Arrays.toString(entAug.getSpeakerEntityIdValue()));
    }
    addHeader(table, "Peer preferences");
    final PeerPref peerPref = pcepSessionState.getPeerPref();
    showPreferences(table, peerPref);
    showCapabilities(table, pcepSessionState.getPeerCapabilities());
    final Messages messages = pcepSessionState.getMessages();
    showMessages(table, messages);
    final ErrorMessages error = messages.getErrorMessages();
    showErrorMessages(table, error);
    final ReplyTime reply = messages.getReplyTime();
    showReplyMessages(table, reply);
    table.print(stream);
}
Also used : ErrorMessages(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.error.messages.grouping.ErrorMessages) PcepEntityIdStatsAug(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stateful.stats.rev171113.PcepEntityIdStatsAug) ShellTable(org.apache.karaf.shell.table.ShellTable) 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) LocalPref(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.LocalPref) PeerPref(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.PeerPref) ReplyTime(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.reply.time.grouping.ReplyTime)

Aggregations

ShellTable (org.apache.karaf.shell.table.ShellTable)1 PcepEntityIdStatsAug (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stateful.stats.rev171113.PcepEntityIdStatsAug)1 ErrorMessages (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.error.messages.grouping.ErrorMessages)1 LocalPref (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.LocalPref)1 Messages (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.Messages)1 PeerPref (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.pcep.session.state.PeerPref)1 ReplyTime (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.stats.rev171113.reply.time.grouping.ReplyTime)1