2 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.protocol.bgp.mode.impl;
10 import org.opendaylight.protocol.bgp.rib.spi.Peer;
11 import org.opendaylight.protocol.bgp.rib.spi.policy.BGPRouteEntryExportParameters;
12 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.PeerId;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.PeerRole;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.ClusterIdentifier;
17 public final class BGPRouteEntryExportParametersImpl implements BGPRouteEntryExportParameters {
18 private final Peer fromPeer;
19 private final Peer toPeer;
21 public BGPRouteEntryExportParametersImpl(final Peer fromPeer, final Peer toPeer) {
22 this.fromPeer = fromPeer;
27 public PeerRole getFromPeerRole() {
28 return this.fromPeer.getRole();
32 public PeerId getFromPeerId() {
33 return this.fromPeer.getPeerId();
37 public ClusterIdentifier getFromClusterId() {
38 return this.fromPeer.getClusterId();
42 public AsNumber getFromPeerLocalAs() {
43 return this.fromPeer.getLocalAs();
47 public PeerRole getToPeerRole() {
48 return this.toPeer.getRole();
52 public AsNumber getToPeerLocalAs() {
53 return this.toPeer.getLocalAs();
57 public PeerId getToPeerId() {
58 return this.toPeer.getPeerId();