ac4149db84d87e60f1e0d9f37473dcfb357330e7
[bgpcep.git] / bgp / topology-provider / src / main / java / org / opendaylight / bgpcep / bgp / topology / provider / Ipv6ReachabilityTopologyBuilder.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.bgpcep.bgp.topology.provider;
9
10 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
11 import org.opendaylight.protocol.bgp.rib.LocRibReference;
12 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpPrefix;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.rib.tables.routes.ipv6.routes._case.ipv6.routes.Ipv6Route;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.route.Attributes;
15 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
16
17 public final class Ipv6ReachabilityTopologyBuilder extends AbstractReachabilityTopologyBuilder<Ipv6Route> {
18         public Ipv6ReachabilityTopologyBuilder(final DataProviderService dataProvider, final LocRibReference locRibReference, final TopologyId topologyId) {
19                 super(dataProvider, locRibReference, topologyId, Ipv6Route.class);
20         }
21
22         @Override
23         protected Attributes getAttributes(final Ipv6Route value) {
24                 return value.getAttributes();
25         }
26
27         @Override
28         protected IpPrefix getPrefix(final Ipv6Route value) {
29                 return new IpPrefix(value.getKey().getPrefix());
30         }
31 }