2 * Copyright (c) 2015 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
8 package org.opendaylight.protocol.bgp.rib.impl.spi;
10 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
11 import org.opendaylight.protocol.bgp.rib.spi.RIBSupport;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.Attributes;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
15 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
19 * {@link RIBSupport} wrapper which provides additional functionality
20 * such as logic to update / remove routes using Binding DTOs
24 public abstract class RIBSupportContext {
28 * Create specified Rib table structure using supplied transaction.
30 * @param tx Transaction to to be used
31 * @param tableId Instance Identifier of table to be cleared.
33 public abstract void createEmptyTableStructure(DOMDataWriteTransaction tx, YangInstanceIdentifier tableId);
36 * Removes supplied routes from RIB table using supplied transaction.
38 * @param tx Transaction to be used
39 * @param tableId Instance Identifier of table to be updated
40 * @param nlri UnreachNlri which contains routes to be removed.
42 public abstract void deleteRoutes(DOMDataWriteTransaction tx, YangInstanceIdentifier tableId, MpUnreachNlri nlri);
46 * Writes supplied routes and attributes to RIB table using supplied transaction.
49 * @param tx Transaction to be used
50 * @param tableId Instance Identifier of table to be updated
51 * @param nlri ReachNlri which contains routes to be written.
52 * @param attributes Attributes which should be written.
54 public abstract void writeRoutes(DOMDataWriteTransaction tx, YangInstanceIdentifier tableId, MpReachNlri nlri,
55 Attributes attributes);
58 * Returns backing RIB support.
62 public abstract RIBSupport getRibSupport();