added feature odl-openflowplugin-new-southbound
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / yang / gen / v1 / urn / opendaylight / params / xml / ns / yang / config / openflow / plugin / impl / rev150327 / OpenFlowProviderModule.java
1 package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.config.openflow.plugin.impl.rev150327;
2
3 import org.opendaylight.openflowplugin.api.openflow.OpenFlowPluginProvider;
4 import org.opendaylight.openflowplugin.impl.OpenFlowPluginProviderImpl;
5 import org.slf4j.Logger;
6 import org.slf4j.LoggerFactory;
7
8 public class OpenFlowProviderModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.config.openflow.plugin.impl.rev150327.AbstractOpenFlowProviderModule {
9
10     private static Logger LOG = LoggerFactory.getLogger(OpenFlowProviderModule.class);
11
12     public OpenFlowProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
13         super(identifier, dependencyResolver);
14     }
15
16     public OpenFlowProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.config.openflow.plugin.impl.rev150327.OpenFlowProviderModule oldModule, java.lang.AutoCloseable oldInstance) {
17         super(identifier, dependencyResolver, oldModule, oldInstance);
18     }
19
20     @Override
21     public void customValidation() {
22         // add custom validation form module attributes here.
23     }
24
25     @Override
26     public java.lang.AutoCloseable createInstance() {
27         LOG.info("Initializing new OFP southbound.");
28         OpenFlowPluginProvider openflowPluginProvider = new OpenFlowPluginProviderImpl();
29
30         openflowPluginProvider.setSwitchConnectionProviders(getOpenflowSwitchConnectionProviderDependency());
31         openflowPluginProvider.setRole(getRole());
32         openflowPluginProvider.initialize();
33
34         return openflowPluginProvider;
35     }
36
37 }