Bump MRI upstreams
[bgpcep.git] / pcep / impl / src / test / java / org / opendaylight / protocol / pcep / impl / TestVendorInformationActivator.java
1 /*
2  * Copyright (c) 2014 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.pcep.impl;
9
10 import java.util.ArrayList;
11 import java.util.List;
12 import org.opendaylight.protocol.pcep.impl.TestVendorInformationTlvParser.TestEnterpriseSpecificInformation;
13 import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
14 import org.opendaylight.protocol.pcep.spi.pojo.AbstractPCEPExtensionProviderActivator;
15 import org.opendaylight.yangtools.concepts.Registration;
16
17 public class TestVendorInformationActivator extends AbstractPCEPExtensionProviderActivator {
18     @Override
19     protected List<Registration> startImpl(PCEPExtensionProviderContext context) {
20         final List<Registration> regs = new ArrayList<>();
21         final TestVendorInformationTlvParser parser = new TestVendorInformationTlvParser();
22         regs.add(context.registerVendorInformationTlvParser(parser.getEnterpriseNumber(), parser));
23         regs.add(context.registerVendorInformationTlvSerializer(TestEnterpriseSpecificInformation.class, parser));
24
25         // Vendor-information object registration
26         final TestVendorInformationObjectParser objParser = new TestVendorInformationObjectParser();
27         regs.add(context.registerVendorInformationObjectParser(parser.getEnterpriseNumber(), objParser));
28         regs.add(context.registerVendorInformationObjectSerializer(TestEnterpriseSpecificInformation.class, objParser));
29         return regs;
30     }
31 }