summaryrefslogtreecommitdiffstats
path: root/vnftools
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 /vnftools
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 'vnftools')
-rw-r--r--vnftools/provider/pom.xml152
-rw-r--r--vnftools/provider/src/main/java/org/onap/sdnc/vnftools/VnfToolsActivator.java27
-rw-r--r--vnftools/provider/src/main/resources/org/opendaylight/blueprint/vnftools-blueprint.xml10
3 files changed, 89 insertions, 100 deletions
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 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.sdnc.northbound</groupId>
- <artifactId>vnftools</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </parent>
- <artifactId>vnftools-provider</artifactId>
- <packaging>bundle</packaging>
- <name>VNF Tools Plugin - Provider</name>
- <url>http://maven.apache.org</url>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sli-common</artifactId>
- <version>${sdnctl.sli.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sli-provider</artifactId>
- <version>${sdnctl.sli.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>equinoxSDK381</groupId>
- <artifactId>org.eclipse.osgi</artifactId>
- <version>${equinox.osgi.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.sdnc.northbound</groupId>
+ <artifactId>vnftools</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>vnftools-provider</artifactId>
+ <packaging>bundle</packaging>
+ <name>VNF Tools Plugin - Provider</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>sli-common</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>sli-provider</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>equinoxSDK381</groupId>
+ <artifactId>org.eclipse.osgi</artifactId>
+ <version>${equinox.osgi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sliPluginUtils-provider</artifactId>
- <version>${sdnctl.slipluginutils.version}</version>
- <type>jar</type>
- <scope>compile</scope>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>sliPluginUtils-provider</artifactId>
+ <version>${sdnctl.slipluginutils.version}</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
- <build>
- <plugins>
+ <build>
+ <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>${bundle.plugin.version}</version>
- <extensions>true</extensions>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>org.onap.sdnc.vnftools</Bundle-SymbolicName>
- <Bundle-Activator>org.onap.sdnc.vnftools.VnfToolsActivator</Bundle-Activator>
- <Export-Package>org.onap.sdnc.vnftools</Export-Package>
- <Import-Package>org.onap.sdnc.*,org.osgi.framework.*,org.slf4j.*,java.net.*,org.apache.commons.*</Import-Package>
- <Embed-Dependency>*;scope=compile|runtime;artifactId=!sli-common|org.eclipse.osgi|mysql-connector-java|slf4j-api|jcl-over-slf4j|xml-apis|InetAddress|commons-lang3</Embed-Dependency>
- <Embed-Transitive>true</Embed-Transitive>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>${bundle.plugin.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>org.onap.sdnc.vnftools</Bundle-SymbolicName>
+ <Export-Package>org.onap.sdnc.vnftools.*</Export-Package>
+ <Import-Package>org.onap.sdnc.*,org.osgi.framework.*,org.slf4j.*,java.net.*,org.apache.commons.*</Import-Package>
+ <Embed-Dependency>*;scope=compile|runtime;artifactId=!sli-common|org.eclipse.osgi|mysql-connector-java|slf4j-api|jcl-over-slf4j|xml-apis|InetAddress|commons-lang3</Embed-Dependency>
+ <Embed-Transitive>true</Embed-Transitive>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
- </build>
+ </build>
</project>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+ odl:use-default-for-reference-types="true">
+
+
+ <bean id="vnftools" class="org.onap.sdnc.vnftools.VnfTools" />
+ <service ref="vnftools" interface="org.onap.sdnc.vnftools.VnfTools" />
+
+</blueprint> \ No newline at end of file