2 * Copyright (c) 2016 Brocade Communications 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.l3vpn.ipv6;
10 import java.util.ArrayList;
11 import java.util.List;
12 import org.opendaylight.protocol.bgp.parser.spi.AbstractBGPExtensionProviderActivator;
13 import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.Ipv6AddressFamily;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.MplsLabeledVpnSubsequentAddressFamily;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.next.hop.c.next.hop.Ipv6NextHopCase;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.vpn.ipv6.rev180329.l3vpn.ipv6.routes.VpnIpv6Routes;
19 public final class BgpIpv6Activator extends AbstractBGPExtensionProviderActivator {
22 protected List<AutoCloseable> startImpl(final BGPExtensionProviderContext context) {
23 final List<AutoCloseable> regs = new ArrayList<>();
25 final VpnIpv6NlriParser nlriParser = new VpnIpv6NlriParser();
26 final VpnIpv6NextHopParserSerializer nextHopParser = new VpnIpv6NextHopParserSerializer();
28 regs.add(context.registerNlriParser(Ipv6AddressFamily.class, MplsLabeledVpnSubsequentAddressFamily.class,
29 nlriParser, nextHopParser, Ipv6NextHopCase.class));
30 regs.add(context.registerNlriSerializer(VpnIpv6Routes.class, nlriParser));