463cfc31d5445d0dd5aa6d75f717b7a2a14b3999
[bgpcep.git] / bgp / openconfig-rp-spi / src / main / java / org / opendaylight / protocol / bgp / openconfig / routing / policy / spi / BGPRibRoutingPolicyFactory.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.spi;
10
11 import javax.annotation.Nonnull;
12 import org.opendaylight.protocol.bgp.rib.spi.policy.BGPRibRoutingPolicy;
13 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.routing.policy.rev151009.apply.policy.group.apply.policy.Config;
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.rev130919.ClusterIdentifier;
16
17 /**
18  * Factory per RIB Routing Policies .
19  */
20 public interface BGPRibRoutingPolicyFactory {
21     /**
22      * Creates RIB Routing Policies from BGP Openconfig policy Configuration.
23      *
24      * @param localAs      RIB AS
25      * @param bgpId        BGP ID
26      * @param clusterId    Cluster Identifier
27      * @param policyConfig BGP Openconfig policy Configuration
28      * @return BGPRIBRoutingPolicy
29      */
30     @Nonnull
31     BGPRibRoutingPolicy buildBGPRibPolicy(
32             long localAs,
33             @Nonnull Ipv4Address bgpId,
34             @Nonnull ClusterIdentifier clusterId,
35             @Nonnull Config policyConfig);
36 }