BUG-113: switch BGP to proper activators
[bgpcep.git] / bgp / linkstate / src / main / java / org / opendaylight / protocol / bgp / linkstate / Activator.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.protocol.bgp.linkstate;
9
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.rev130918.LinkstateAddressFamily;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev130918.LinkstateSubsequentAddressFamily;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.MplsLabeledVpnSubsequentAddressFamily;
15
16 /**
17  *
18  */
19 public final class Activator implements BGPExtensionProviderActivator {
20         @Override
21         public void start(final BGPExtensionProviderContext context) throws Exception {
22                 context.registerAddressFamily(LinkstateAddressFamily.class, 16388);
23                 context.registerSubsequentAddressFamily(LinkstateSubsequentAddressFamily.class, 71);
24
25                 context.registerNlriParser(LinkstateAddressFamily.class, LinkstateSubsequentAddressFamily.class,
26                                 new LinkstateNlriParser(false));
27                 context.registerNlriParser(LinkstateAddressFamily.class, MplsLabeledVpnSubsequentAddressFamily.class,
28                                 new LinkstateNlriParser(true));
29
30                 context.registerAttributeParser(LinkstateAttributeParser.TYPE, new LinkstateAttributeParser());
31         }
32
33         @Override
34         public void stop() throws Exception {
35                 // TODO Auto-generated method stub
36         }
37 }