1 package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.config.openflow.plugin.impl.rev150327;
3 import org.opendaylight.openflowplugin.api.openflow.OpenFlowPluginProvider;
4 import org.opendaylight.openflowplugin.impl.OpenFlowPluginProviderImpl;
5 import org.opendaylight.openflowplugin.openflow.md.util.OpenflowPortsUtil;
6 import org.slf4j.Logger;
7 import org.slf4j.LoggerFactory;
9 public class OpenFlowProviderModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.config.openflow.plugin.impl.rev150327.AbstractOpenFlowProviderModule {
11 private static final Logger LOG = LoggerFactory.getLogger(OpenFlowProviderModule.class);
13 public OpenFlowProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
14 super(identifier, dependencyResolver);
17 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) {
18 super(identifier, dependencyResolver, oldModule, oldInstance);
22 public void customValidation() {
23 // add custom validation form module attributes here.
27 public java.lang.AutoCloseable createInstance() {
28 LOG.info("Initializing new OFP southbound.");
29 OpenflowPortsUtil.init();
30 OpenFlowPluginProvider openflowPluginProvider = new OpenFlowPluginProviderImpl(getRpcRequestsQuota(), getGlobalNotificationQuota());
32 openflowPluginProvider.setSwitchConnectionProviders(getOpenflowSwitchConnectionProviderDependency());
33 openflowPluginProvider.setRole(getRole());
34 openflowPluginProvider.setDataBroker(getDataBrokerDependency());
35 openflowPluginProvider.setRpcProviderRegistry(getRpcRegistryDependency());
36 openflowPluginProvider.setNotificationProviderService(getNotificationAdapterDependency());
37 openflowPluginProvider.setNotificationPublishService(getNotificationPublishAdapterDependency());
38 openflowPluginProvider.setSwitchFeaturesMandatory(getSwitchFeaturesMandatory());
39 openflowPluginProvider.setIsStatisticsPollingOff(getIsStatisticsPollingOff());
40 openflowPluginProvider.initialize();
42 return openflowPluginProvider;