2 * Copyright (c) 2013 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.linkstate;
10 import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderActivator;
11 import org.opendaylight.protocol.bgp.parser.spi.BGPExtensionProviderContext;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.LinkstateAddressFamily;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev131125.LinkstateSubsequentAddressFamily;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.MplsLabeledVpnSubsequentAddressFamily;
16 public final class BGPActivator implements BGPExtensionProviderActivator {
18 public void start(final BGPExtensionProviderContext context) {
19 context.registerAddressFamily(LinkstateAddressFamily.class, 16388);
20 context.registerSubsequentAddressFamily(LinkstateSubsequentAddressFamily.class, 71);
22 context.registerNlriParser(LinkstateAddressFamily.class, LinkstateSubsequentAddressFamily.class, new LinkstateNlriParser(false));
23 context.registerNlriParser(LinkstateAddressFamily.class, MplsLabeledVpnSubsequentAddressFamily.class, new LinkstateNlriParser(true));
25 context.registerAttributeParser(LinkstateAttributeParser.TYPE, new LinkstateAttributeParser());