use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev180321.NeighborTransportConfig in project bgpcep by opendaylight.
the class OpenConfigMappingUtil method getPort.
@Nullable
private static PortNumber getPort(@Nullable final Transport transport) {
if (transport != null) {
final Config config = transport.getConfig();
if (config != null) {
final NeighborTransportConfig peerTc = config.getAugmentation(NeighborTransportConfig.class);
if (peerTc != null) {
return peerTc.getRemotePort();
}
final PeerGroupTransportConfig peerGroupTc = config.getAugmentation(PeerGroupTransportConfig.class);
if (peerGroupTc != null) {
return peerGroupTc.getRemotePort();
}
}
}
return null;
}
Aggregations