2 * Copyright (c) 2016 Cisco Systems, Inc. and others. 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
9 package org.opendaylight.protocol.bgp.rib.impl.spi;
11 import com.google.common.util.concurrent.ListenableFuture;
12 import org.opendaylight.protocol.bgp.openconfig.spi.BGPOpenConfigMappingService;
13 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.neighbors.Neighbor;
14 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.top.Bgp;
15 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.top.bgp.Global;
16 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.network.instance.rev151018.network.instance.top.network.instances.NetworkInstance;
17 import org.opendaylight.yangtools.yang.binding.DataObject;
18 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
21 * The BgpDeployer service is managing RIB, Peer, Application Peer instances based on the OpenConfig BGP
22 * configuration status.
23 * BGP configuration is held under the specific OpenConfig's NetworkInstance subtree.
25 public interface BgpDeployer {
27 interface WriteConfiguration {
32 * Get pointer to NetworkInstance instance where this particular BGP deployer is binded.
34 * @return InstanceIdentifier
36 InstanceIdentifier<NetworkInstance> getInstanceIdentifier();
38 BGPOpenConfigMappingService getMappingService();
40 <T extends DataObject> ListenableFuture<Void> writeConfiguration(T data, InstanceIdentifier<T> identifier);
42 <T extends DataObject> ListenableFuture<Void> removeConfiguration(InstanceIdentifier<T> identifier);
45 * Create, start and register rib instance
46 * @param rootIdentifier
48 * @param configurationWriter
50 void onGlobalModified(InstanceIdentifier<Bgp> rootIdentifier, Global global, WriteConfiguration configurationWriter);
53 * Destroy rib instance
54 * @param rootIdentifier
56 void onGlobalRemoved(InstanceIdentifier<Bgp> rootIdentifier);
59 * Create, start and register peer instance
60 * @param rootIdentifier
63 void onNeighborModified(InstanceIdentifier<Bgp> rootIdentifier, Neighbor neighbor, WriteConfiguration configurationWriter);
66 * Destroy peer instance
67 * @param rootIdentifier
70 void onNeighborRemoved(InstanceIdentifier<Bgp> rootIdentifier, Neighbor neighbor);