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.spi;
11 import java.util.Collection;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerId;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.PeerRole;
15 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
16 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
19 * A collection of peers sharing the same export policy.
21 public interface PeerExportGroup {
22 final class PeerExporTuple {
23 private final YangInstanceIdentifier yii;
24 private final PeerRole role;
26 public PeerExporTuple(final YangInstanceIdentifier yii, final PeerRole role) {
31 public YangInstanceIdentifier getYii() {
35 public PeerRole getRole() {
41 * Transform outgoing attributes according to policy per Peer
43 * @param role root Peer role
44 * @param attributes attributes container
45 * @return return attributes container after apply policy
47 ContainerNode effectiveAttributes(PeerRole role, ContainerNode attributes);
52 Collection<Map.Entry<PeerId, PeerExporTuple>> getPeers();
54 boolean containsPeer(PeerId routePeerId);