Merge "BUG-1690: catch wildcard InstanceIdentifiers"
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / main / java / org / opendaylight / controller / config / yang / md / sal / rest / connector / RestConnectorModule.java
index 582c657868d5d16e0b2213aba36216e59538cb4e..fe20e3a441590b14f658d025567102977dd97d51 100644 (file)
@@ -1,9 +1,12 @@
 package org.opendaylight.controller.config.yang.md.sal.rest.connector;
 
-import org.opendaylight.controller.sal.rest.impl.RestconfProviderImpl;
+import org.opendaylight.controller.sal.restconf.impl.RestconfProviderImpl;
+
 
 public class RestConnectorModule extends org.opendaylight.controller.config.yang.md.sal.rest.connector.AbstractRestConnectorModule {
 
+    private static RestConnectorRuntimeRegistration runtimeRegistration;
+
     public RestConnectorModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
         super(identifier, dependencyResolver);
     }
@@ -25,6 +28,15 @@ public class RestConnectorModule extends org.opendaylight.controller.config.yang
         instance.setWebsocketPort(getWebsocketPort());
         // Register it with the Broker
         getDomBrokerDependency().registerProvider(instance);
+
+        if(runtimeRegistration != null){
+            runtimeRegistration.close();
+        }
+
+        runtimeRegistration =
+            getRootRuntimeBeanRegistratorWrapper().register(instance);
+
         return instance;
     }
 }
+