Add SfcClassifier to pipeline
[netvirt.git] / openstack / net-virt-sfc / impl / src / main / java / org / opendaylight / yang / gen / v1 / urn / opendaylight / params / xml / ns / yang / netvirt / sfc / rev141210 / NetvirtSfcModule.java
1 /*
2  * Copyright © 2015 Red Hat, 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
9 package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.sfc.rev141210;
10
11 import org.opendaylight.controller.config.api.DependencyResolver;
12 import org.opendaylight.controller.config.api.ModuleIdentifier;
13 import org.opendaylight.ovsdb.openstack.netvirt.sfc.NetvirtSfcProvider;
14 import org.osgi.framework.BundleContext;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
17
18 public class NetvirtSfcModule extends AbstractNetvirtSfcModule {
19     private static final Logger LOG = LoggerFactory.getLogger(NetvirtSfcModule.class);
20     private BundleContext bundleContext;
21
22     public NetvirtSfcModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver) {
23         super(identifier, dependencyResolver);
24     }
25
26     public NetvirtSfcModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver,
27                             NetvirtSfcModule oldModule, java.lang.AutoCloseable oldInstance) {
28         super(identifier, dependencyResolver, oldModule, oldInstance);
29     }
30
31     @Override
32     public void customValidation() {
33         // add custom validation form module attributes here.
34     }
35
36     @Override
37     public java.lang.AutoCloseable createInstance() {
38         LOG.info("Netvirt SFC module initialization.");
39         NetvirtSfcProvider sfcProvider = new NetvirtSfcProvider(bundleContext);
40         getBrokerDependency().registerProvider(sfcProvider);
41         return sfcProvider;
42     }
43
44     public void setBundleContext(BundleContext bundleContext) {
45         this.bundleContext = bundleContext;
46     }
47 }