summaryrefslogtreecommitdiffstats
path: root/vnfapi/provider/src/main/java
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-10-12 16:01:06 -0400
committerDan Timoney <dtimoney@att.com>2017-10-12 16:08:50 -0400
commitdd3f74074787dfd14e8aec0b48883b780dd8ccba (patch)
treec84ba953f28e9997d87f8fce055e831392f37014 /vnfapi/provider/src/main/java
parent93a3119b6922b16ad7b3f41e16427c99b5eac371 (diff)
Fixed vnfapi install issue
Fixed issues with vnfapi install: - Resolved issue installing vnftools by converting to blueprint - Resolved issue not finding RPC implementation of vnfapi by fixing dependency feature vnftools, and by converting vnfapi to blueprint. The root cause in both cases was probably something wrong with the provider configuration, but it was simpler (not to mention more maintainable) to just convert from config to blueprint. Change-Id: I7010a845687673c932457774f3103834d328ab84 Issue-ID: SDNC-119 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'vnfapi/provider/src/main/java')
-rw-r--r--vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java22
-rw-r--r--vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/vnfapiProvider.java16
-rw-r--r--vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java56
-rw-r--r--vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java34
4 files changed, 11 insertions, 117 deletions
diff --git a/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java b/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java
index 9f8696fe..a9f051a2 100644
--- a/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java
+++ b/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.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.
@@ -43,24 +43,12 @@ public class VNFSDNSvcLogicServiceClient {
private static final Logger LOG = LoggerFactory
.getLogger(VNFSDNSvcLogicServiceClient.class);
- private SvcLogicService svcLogic = null;
+ private final SvcLogicService svcLogic;
- public VNFSDNSvcLogicServiceClient()
+ public VNFSDNSvcLogicServiceClient(final SvcLogicService svcLogicService)
{
- BundleContext bctx = FrameworkUtil.getBundle(SvcLogicService.class).getBundleContext();
+ this.svcLogic = svcLogicService;
- // Get SvcLogicService reference
- ServiceReference sref = bctx.getServiceReference(SvcLogicService.NAME);
- if (sref != null)
- {
- svcLogic = (SvcLogicService) bctx.getService(sref);
-
- }
- else
- {
- LOG.warn("Cannot find service reference for "+SvcLogicService.NAME);
-
- }
}
public boolean hasGraph(String module, String rpc, String version, String mode) throws SvcLogicException
diff --git a/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/vnfapiProvider.java b/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/vnfapiProvider.java
index 9dd1a2a2..f64cb0be 100644
--- a/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/vnfapiProvider.java
+++ b/vnfapi/provider/src/main/java/org/onap/sdnc/vnfapi/vnfapiProvider.java
@@ -169,15 +169,18 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
protected RpcProviderRegistry rpcRegistry;
protected BindingAwareBroker.RpcRegistration<VNFAPIService> rpcRegistration;
+ private VNFSDNSvcLogicServiceClient svcLogicClient;
+
public vnfapiProvider(DataBroker dataBroker2, NotificationPublishService notificationPublishService,
- RpcProviderRegistry rpcProviderRegistry) {
+ RpcProviderRegistry rpcProviderRegistry, VNFSDNSvcLogicServiceClient client) {
this.log.info( "Creating provider for " + appName );
executor = Executors.newFixedThreadPool(1);
dataBroker = dataBroker2;
notificationService = notificationPublishService;
rpcRegistry = rpcProviderRegistry;
+ this.svcLogicClient = client;
initialize();
}
@@ -191,7 +194,7 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
} catch (Exception e) {
log.error("Caught Exception while trying to load properties file: ", e);
}
- rpcRegistration = rpcRegistry.addRpcImplementation(VNFAPIService.class, this);
+ // rpcRegistration = rpcRegistry.addRpcImplementation(VNFAPIService.class, this);
log.info( "Initialization complete for " + appName );
}
@@ -1104,7 +1107,6 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
// Call SLI sync method
// Get SvcLogicService reference
- VNFSDNSvcLogicServiceClient svcLogicClient = new VNFSDNSvcLogicServiceClient();
Properties respProps = null;
String errorCode = "200";
@@ -1357,7 +1359,6 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
// Call SLI sync method
// Get SvcLogicService reference
- VNFSDNSvcLogicServiceClient svcLogicClient = new VNFSDNSvcLogicServiceClient();
Properties respProps = null;
String errorCode = "200";
@@ -1587,7 +1588,6 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
// Call SLI sync method
// Get SvcLogicService reference
- VNFSDNSvcLogicServiceClient svcLogicClient = new VNFSDNSvcLogicServiceClient();
Properties respProps = null;
String errorCode = "200";
@@ -1797,7 +1797,6 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
// Call SLI sync method
// Get SvcLogicService reference
- VNFSDNSvcLogicServiceClient svcLogicClient = new VNFSDNSvcLogicServiceClient();
Properties respProps = null;
String errorCode = "200";
@@ -1973,7 +1972,6 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
// Call SLI sync method
// Get SvcLogicService reference
- VNFSDNSvcLogicServiceClient svcLogicClient = new VNFSDNSvcLogicServiceClient();
Properties respProps = null;
String errorCode = "200";
@@ -2168,7 +2166,6 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
// Call SLI sync method
// Get SvcLogicService reference
- VNFSDNSvcLogicServiceClient svcLogicClient = new VNFSDNSvcLogicServiceClient();
Properties respProps = null;
String errorCode = "200";
@@ -2364,7 +2361,7 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
// Call SLI sync method
// Get SvcLogicService reference
- VNFSDNSvcLogicServiceClient svcLogicClient = new VNFSDNSvcLogicServiceClient();
+
Properties respProps = null;
String errorCode = "200";
@@ -2554,7 +2551,6 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
// Call SLI sync method
// Get SvcLogicService reference
- VNFSDNSvcLogicServiceClient svcLogicClient = new VNFSDNSvcLogicServiceClient();
Properties respProps = null;
String errorCode = "200";
diff --git a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java b/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java
deleted file mode 100644
index 5150d085..00000000
--- a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * openECOMP : SDN-C
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
- * ================================================================================
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.opendaylight.yang.gen.v1.org.onap.sdnc.vnfapi.provider.impl.rev140523;
-
-import org.onap.sdnc.vnfapi.vnfapiProvider;
-
-public class VnfapiProviderModule extends org.opendaylight.yang.gen.v1.org.onap.sdnc.vnfapi.provider.impl.rev140523.AbstractVnfapiProviderModule {
- public VnfapiProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public VnfapiProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.org.onap.sdnc.vnfapi.provider.impl.rev140523.VnfapiProviderModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- final vnfapiProvider provider = new vnfapiProvider(getDataBrokerDependency()
- , getNotificationPublishAdapterDependency()
- , getRpcRegistryDependency());
-
- return new AutoCloseable() {
-
- @Override
- public void close() throws Exception {
- provider.close();
- }
- };
-
- }
-
-}
diff --git a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java b/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java
deleted file mode 100644
index bb8eac5a..00000000
--- a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * openECOMP : SDN-C
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
- * ================================================================================
- * 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.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-/*
-* Generated file
-*
-* Generated from: yang module name: vnfapi-provider-impl yang module local name: vnfapi-provider-impl
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Tue Nov 08 09:03:40 EST 2016
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.org.onap.sdnc.vnfapi.provider.impl.rev140523;
-public class VnfapiProviderModuleFactory extends org.opendaylight.yang.gen.v1.org.onap.sdnc.vnfapi.provider.impl.rev140523.AbstractVnfapiProviderModuleFactory {
-
-}