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
9 package org.opendaylight.protocol.bgp.openconfig.spi.pojo;
11 import com.google.common.base.Optional;
12 import com.google.common.base.Preconditions;
13 import java.util.List;
15 import org.opendaylight.protocol.bgp.mode.api.PathSelectionMode;
16 import org.opendaylight.protocol.bgp.openconfig.spi.InstanceConfigurationIdentifier;
17 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
18 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.rib.TablesKey;
23 * POJO for holding BGP RIB module instance configuration
26 public final class BGPRibInstanceConfiguration extends AbstractInstanceConfiguration {
28 private final AsNumber localAs;
29 private final Ipv4Address bgpRibId;
30 private final Ipv4Address clusterId;
31 private final List<BgpTableType> tableTypes;
32 private final Map<TablesKey, PathSelectionMode> pathSelectionModes;
34 public BGPRibInstanceConfiguration(final InstanceConfigurationIdentifier identifier, final AsNumber localAs, final Ipv4Address bgpRibId,
35 final Ipv4Address clusterId, final List<BgpTableType> tableTypes, final Map<TablesKey, PathSelectionMode> pathSelectionModes) {
37 this.pathSelectionModes = pathSelectionModes;
38 this.localAs = Preconditions.checkNotNull(localAs);
39 this.bgpRibId = Preconditions.checkNotNull(bgpRibId);
40 this.clusterId = clusterId;
41 this.tableTypes = Preconditions.checkNotNull(tableTypes);
44 public AsNumber getLocalAs() {
48 public Ipv4Address getBgpRibId() {
52 public Optional<Ipv4Address> getClusterId() {
53 return Optional.fromNullable(clusterId);
56 public List<BgpTableType> getTableTypes() {
60 public Map<TablesKey, PathSelectionMode> getPathSelectionModes() {
61 return pathSelectionModes;