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.top.Bgp;
14 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.bgp.rev151009.bgp.top.bgp.Global;
15 import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.network.instance.rev151018.network.instance.top.network.instances.NetworkInstance;
16 import org.opendaylight.yangtools.yang.binding.DataObject;
17 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
20 * The BgpDeployer service is managing RIB, Peer, Application Peer instances based on the OpenConfig BGP
21 * configuration status.
22 * BGP configuration is held under the specific OpenConfig's NetworkInstance subtree.
24 public interface BgpDeployer {
26 interface WriteConfiguration {
31 * Get pointer to NetworkInstance instance where this particular BGP deployer is binded.
33 * @return InstanceIdentifier
35 InstanceIdentifier<NetworkInstance> getInstanceIdentifier();
37 BGPOpenConfigMappingService getMappingService();
39 <T extends DataObject> ListenableFuture<Void> writeConfiguration(T data, InstanceIdentifier<T> identifier);
41 <T extends DataObject> ListenableFuture<Void> removeConfiguration(InstanceIdentifier<T> identifier);
44 * Create, start and register rib instance
45 * @param rootIdentifier
47 * @param configurationWriter
49 void onGlobalCreated(InstanceIdentifier<Bgp> rootIdentifier, Global global, WriteConfiguration configurationWriter);
52 * Destroy rib instance
53 * @param rootIdentifier
55 void onGlobalRemoved(InstanceIdentifier<Bgp> rootIdentifier);