aboutsummaryrefslogtreecommitdiffstats
path: root/asdcApi
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-09-06 14:04:27 -0400
committerDan Timoney <dtimoney@att.com>2017-09-06 14:04:27 -0400
commit6ece0d9a4466984c4f03852336bae09a7cd1dc8d (patch)
tree8374108da23490d2a1ae0df2544a773330cabad2 /asdcApi
parent85388e8598e765530b8752fc0bcb237d795e249a (diff)
Fix unimplemented createInstance
The createInstance() method in the provider yang-generated Module class has a default implementation that throws an UnsupportedOperationException. Replaced default implementation with correct code to create an instance of the asdcApi and dataChange provider classes. Change-Id: I1f2b199702a9094f6808ec077d6752c4c5c0c30d Issue-ID: CCSDK-77 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'asdcApi')
-rw-r--r--asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java24
1 files changed, 20 insertions, 4 deletions
diff --git a/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java b/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java
index ddf8093f..26dc9428 100644
--- a/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java
+++ b/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java
@@ -8,9 +8,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,6 +20,9 @@
*/
package org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.asdcapi.provider.impl.rev140523;
+
+import org.onap.ccsdk.sli.northbound.asdcapi.AsdcApiProvider;
+
public class AsdcApiProviderModule extends org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.asdcapi.provider.impl.rev140523.AbstractAsdcApiProviderModule {
public AsdcApiProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
super(identifier, dependencyResolver);
@@ -36,8 +39,21 @@ public class AsdcApiProviderModule extends org.opendaylight.yang.gen.v1.org.onap
@Override
public java.lang.AutoCloseable createInstance() {
- // TODO:implement
- throw new java.lang.UnsupportedOperationException();
+
+
+ final AsdcApiProvider provider = new AsdcApiProvider(getDataBrokerDependency()
+ , getNotificationServiceDependency()
+ , getRpcRegistryDependency());
+
+ return new AutoCloseable() {
+
+ @Override
+ public void close() throws Exception {
+
+ provider.close();
+ }
+ };
+
}
}