6adbbbd3879e9f35aa71397b5343bf84588eda9d
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / config / PeerGroupConfigLoader.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.rib.impl.config;
10
11 import javax.annotation.Nonnull;
12 import javax.annotation.Nullable;
13 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.neighbor.group.Config;
14 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.peer.group.PeerGroup;
15 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.top.Bgp;
16 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
17
18 /**
19  * Loads Peer GROUP configuration from CONFIG DS.
20  */
21 public interface PeerGroupConfigLoader {
22     /**
23      * Loads Peer GROUP configuration from CONFIG DS.
24      *
25      * @param instanceIdentifier Protocol BGP Instance identifier.
26      * @param neighbor           neighbor configuration containing possibly peer group config path.
27      * @return peer group or null.
28      */
29     @Nullable
30     PeerGroup getPeerGroup(@Nonnull InstanceIdentifier<Bgp> instanceIdentifier, @Nullable Config neighbor);
31 }