Merge "OVS 2.5.1 docker image in fig.yml"
[netvirt.git] / openstack / net-virt-sfc / impl / src / main / java / org / opendaylight / yang / gen / v1 / urn / opendaylight / params / xml / ns / yang / netvirt / sfc / rev141210 / NetvirtSfcModuleFactory.java
index 6bbc36823822daa2a6278a038859a203119f3674..276a14aa20b5561f3a20ab37114fdf3c03a1b4c3 100644 (file)
@@ -1,52 +1,32 @@
 /*
-* Generated file
-*
-* Generated from: yang module name: netvirt-sfc yang module local name: netvirt-sfc
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Sep 23 15:18:24 EDT 2015
-*
-* Do not modify this file unless it is present under src/main directory
-*/
+ * Copyright © 2015 Red Hat, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+
 package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.sfc.rev141210;
 
 import org.opendaylight.controller.config.api.DependencyResolver;
-import org.opendaylight.controller.config.api.DynamicMBeanWithInstance;
-import org.opendaylight.controller.config.spi.Module;
 import org.osgi.framework.BundleContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class NetvirtSfcModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.netvirt.sfc.rev141210.AbstractNetvirtSfcModuleFactory {
-    private static final Logger LOG = LoggerFactory.getLogger(NetvirtSfcModuleFactory.class);
 
+public class NetvirtSfcModuleFactory extends AbstractNetvirtSfcModuleFactory {
     @Override
-    public Module createModule(String instanceName,
-                               DependencyResolver dependencyResolver,
-                               DynamicMBeanWithInstance old, BundleContext bundleContext)
-            throws Exception {
-        Module module =  super.createModule(instanceName, dependencyResolver, old, bundleContext);
-        LOG.info("Created NetvirtSfcModule1= {}!!", (module instanceof NetvirtSfcModule));
-        setModuleBundleContext(bundleContext, module);
+    public NetvirtSfcModule instantiateModule(String instanceName, DependencyResolver dependencyResolver,
+                                              BundleContext bundleContext) {
+        NetvirtSfcModule module = super.instantiateModule(instanceName, dependencyResolver, bundleContext);
+        module.setBundleContext(bundleContext);
         return module;
     }
 
     @Override
-    public Module createModule(String instanceName,
-                               DependencyResolver dependencyResolver, BundleContext bundleContext) {
-        Module module = super.createModule(instanceName, dependencyResolver, bundleContext);
-        LOG.info("Created NetvirtSfcModule2= {}!!", (module instanceof NetvirtSfcModule));
-        setModuleBundleContext(bundleContext, module);
+    public NetvirtSfcModule instantiateModule(String instanceName, DependencyResolver dependencyResolver,
+                                              NetvirtSfcModule oldModule, AutoCloseable oldInstance,
+                                              BundleContext bundleContext) {
+        NetvirtSfcModule module = super.instantiateModule(instanceName, dependencyResolver,
+                oldModule, oldInstance, bundleContext);
+        module.setBundleContext(bundleContext);
         return module;
     }
-
-    private void setModuleBundleContext(BundleContext bundleContext,
-                                        Module module) {
-        if (module instanceof NetvirtSfcModule) {
-            LOG.info("Setting Bundle Context for NetvirtSfcModule!!");
-            ((NetvirtSfcModule)module).setBundleContext(bundleContext);
-        } else {
-            LOG.warn("Module is of type {} expected type {}",
-                    module.getClass(), NetvirtSfcModule.class);
-        }
-    }
 }