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