MVPN RFC6514 Extendend communities
[bgpcep.git] / bgp / openconfig-rp-impl / src / main / java / org / opendaylight / protocol / bgp / openconfig / routing / policy / impl / PolicyRIBBaseParametersImpl.java
1 /*
2  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.protocol.bgp.openconfig.routing.policy.impl;
10
11 import static java.util.Objects.requireNonNull;
12
13 import org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.RouteEntryBaseAttributes;
14 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.ClusterIdentifier;
16
17 public final class PolicyRIBBaseParametersImpl implements RouteEntryBaseAttributes {
18     private final Long localAs;
19     private final Ipv4Address originatorId;
20     private final ClusterIdentifier clusterId;
21
22     public PolicyRIBBaseParametersImpl(final long localAs, final Ipv4Address originatorId,
23             final ClusterIdentifier clusterId) {
24         this.localAs = localAs;
25         this.originatorId = requireNonNull(originatorId);
26         this.clusterId = requireNonNull(clusterId);
27     }
28
29     @Override
30     public long getLocalAs() {
31         return this.localAs;
32     }
33
34     @Override
35     public Ipv4Address getOriginatorId() {
36         return this.originatorId;
37     }
38
39     @Override
40     public ClusterIdentifier getClusterId() {
41         return this.clusterId;
42     }
43 }