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.spi;
10 import java.util.Collection;
11 import javax.annotation.Nonnull;
12 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
13 import org.opendaylight.yangtools.yang.binding.DataObject;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
15 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
16 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
17 import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
18 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
19 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode;
22 * Interface implemented for AFI/SAFI-specific RIB extensions. The extensions need
23 * to register an implementation of this class and the RIB core then calls into it
24 * to inquire about details specific to that particular model.
26 public interface RIBSupport {
28 * Return the table-type-specific empty routes container, as augmented into the
29 * bgp-rib model under /rib/tables/routes choice node. This needs to include all
30 * the skeleton nodes under which the individual routes will be stored.
32 * @return Protocol-specific case in the routes choice, may not be null.
34 @Nonnull ChoiceNode emptyRoutes();
37 * Return the localized identifier of the attributes route member, as expanded
38 * from the route grouping in the specific augmentation of the base routes choice.
40 * @return The attributes identifier, may not be null.
42 @Nonnull NodeIdentifier routeAttributesIdentifier();
44 @Nonnull Collection<Class<? extends DataObject>> cacheableAttributeObjects();
45 @Nonnull Collection<Class<? extends DataObject>> cacheableNlriObjects();
46 void deleteRoutes(@Nonnull DOMDataWriteTransaction tx, @Nonnull YangInstanceIdentifier tablePath, @Nonnull ContainerNode nlri);
47 void putRoutes(@Nonnull DOMDataWriteTransaction tx, @Nonnull YangInstanceIdentifier tablePath, @Nonnull ContainerNode nlri, @Nonnull ContainerNode attributes);
49 @Nonnull Collection<DataTreeCandidateNode> changedRoutes(@Nonnull DataTreeCandidateNode routes);
50 @Nonnull YangInstanceIdentifier routePath(@Nonnull YangInstanceIdentifier routesPath, @Nonnull PathArgument routeId);