From dd3f74074787dfd14e8aec0b48883b780dd8ccba Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 12 Oct 2017 16:01:06 -0400 Subject: 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 --- vnftools/provider/pom.xml | 152 ++++++++++----------- .../org/onap/sdnc/vnftools/VnfToolsActivator.java | 27 +--- .../opendaylight/blueprint/vnftools-blueprint.xml | 10 ++ 3 files changed, 89 insertions(+), 100 deletions(-) create mode 100644 vnftools/provider/src/main/resources/org/opendaylight/blueprint/vnftools-blueprint.xml (limited to 'vnftools/provider') diff --git a/vnftools/provider/pom.xml b/vnftools/provider/pom.xml index 146453ef..05ec84a6 100644 --- a/vnftools/provider/pom.xml +++ b/vnftools/provider/pom.xml @@ -1,83 +1,83 @@ - - 4.0.0 - - org.onap.sdnc.northbound - vnftools - 1.2.0-SNAPSHOT - - vnftools-provider - bundle - VNF Tools Plugin - Provider - http://maven.apache.org - - UTF-8 - - - - junit - junit - ${junit.version} - test - - - org.onap.ccsdk.sli.core - sli-common - ${sdnctl.sli.version} - compile - - - org.onap.ccsdk.sli.core - sli-provider - ${sdnctl.sli.version} - compile - - - equinoxSDK381 - org.eclipse.osgi - ${equinox.osgi.version} - - - org.slf4j - slf4j-api - ${slf4j.version} - - - org.slf4j - jcl-over-slf4j - ${slf4j.version} - + + 4.0.0 + + org.onap.sdnc.northbound + vnftools + 1.2.0-SNAPSHOT + + vnftools-provider + bundle + VNF Tools Plugin - Provider + http://maven.apache.org + + UTF-8 + + + + junit + junit + ${junit.version} + test + + + org.onap.ccsdk.sli.core + sli-common + ${sdnctl.sli.version} + compile + + + org.onap.ccsdk.sli.core + sli-provider + ${sdnctl.sli.version} + compile + + + equinoxSDK381 + org.eclipse.osgi + ${equinox.osgi.version} + + + org.slf4j + slf4j-api + ${slf4j.version} + + + org.slf4j + jcl-over-slf4j + ${slf4j.version} + - - org.onap.ccsdk.sli.core - sliPluginUtils-provider - ${sdnctl.slipluginutils.version} - jar - compile - - + + org.onap.ccsdk.sli.core + sliPluginUtils-provider + ${sdnctl.slipluginutils.version} + jar + compile + + - - + + - - org.apache.felix - maven-bundle-plugin - ${bundle.plugin.version} - true - - - org.onap.sdnc.vnftools - org.onap.sdnc.vnftools.VnfToolsActivator - org.onap.sdnc.vnftools - org.onap.sdnc.*,org.osgi.framework.*,org.slf4j.*,java.net.*,org.apache.commons.* - *;scope=compile|runtime;artifactId=!sli-common|org.eclipse.osgi|mysql-connector-java|slf4j-api|jcl-over-slf4j|xml-apis|InetAddress|commons-lang3 - true - - - - + + org.apache.felix + maven-bundle-plugin + ${bundle.plugin.version} + true + + + org.onap.sdnc.vnftools + org.onap.sdnc.vnftools.* + org.onap.sdnc.*,org.osgi.framework.*,org.slf4j.*,java.net.*,org.apache.commons.* + *;scope=compile|runtime;artifactId=!sli-common|org.eclipse.osgi|mysql-connector-java|slf4j-api|jcl-over-slf4j|xml-apis|InetAddress|commons-lang3 + true + + + + - + diff --git a/vnftools/provider/src/main/java/org/onap/sdnc/vnftools/VnfToolsActivator.java b/vnftools/provider/src/main/java/org/onap/sdnc/vnftools/VnfToolsActivator.java index 5a06b07c..fe9f9d45 100644 --- a/vnftools/provider/src/main/java/org/onap/sdnc/vnftools/VnfToolsActivator.java +++ b/vnftools/provider/src/main/java/org/onap/sdnc/vnftools/VnfToolsActivator.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. @@ -46,29 +46,8 @@ public class VnfToolsActivator implements BundleActivator { @Override public void start(BundleContext ctx) throws Exception { - // Read properties - Properties props = new Properties(); - String propDir = System.getenv(SDNC_CONFIG_DIR); - if (propDir == null) { - propDir = "/opt/sdnc/data/properties"; - } - - String propPath = propDir + VNFTOOLS_PROP_VAR; - - File propFile = new File(propPath); - - if (!propFile.exists()) { - props = null; - } else { - - try { - props.load(new FileInputStream(propFile)); - } catch (Exception e) { - throw new ConfigurationException("Could not load properties file " + propPath, e); - } - } - VnfTools plugin = new VnfTools(props); + VnfTools plugin = new VnfTools(null); LOG.info("Registering service " + plugin.getClass().getName()); registrations.add(ctx.registerService(plugin.getClass().getName(), plugin, null)); diff --git a/vnftools/provider/src/main/resources/org/opendaylight/blueprint/vnftools-blueprint.xml b/vnftools/provider/src/main/resources/org/opendaylight/blueprint/vnftools-blueprint.xml new file mode 100644 index 00000000..d784db71 --- /dev/null +++ b/vnftools/provider/src/main/resources/org/opendaylight/blueprint/vnftools-blueprint.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file -- cgit 1.2.3-korg