aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnfapi/features/pom.xml7
-rw-r--r--vnfapi/features/src/main/resources/features.xml5
-rw-r--r--vnfapi/installer/src/assembly/assemble_mvnrepo_zip.xml4
-rw-r--r--vnfapi/provider/pom.xml65
-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
-rw-r--r--vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml72
-rw-r--r--vnfapi/provider/src/main/resources/org/opendaylight/blueprint/vnfapi-blueprint.xml34
-rw-r--r--vnfapi/provider/src/main/yang/vnfapi-provider-impl.yang65
-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
14 files changed, 138 insertions, 431 deletions
diff --git a/vnfapi/features/pom.xml b/vnfapi/features/pom.xml
index f9a80f08..781328ff 100644
--- a/vnfapi/features/pom.xml
+++ b/vnfapi/features/pom.xml
@@ -16,12 +16,7 @@
<artifactId>vnfapi-model</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.onap.sdnc.northbound</groupId>
- <artifactId>vnfapi-provider</artifactId>
- <classifier>config</classifier>
- <type>xml</type>
- </dependency>
+
<dependency>
<groupId>org.onap.sdnc.northbound</groupId>
<artifactId>vnfapi-provider</artifactId>
diff --git a/vnfapi/features/src/main/resources/features.xml b/vnfapi/features/src/main/resources/features.xml
index 3da86e07..2301d5a9 100644
--- a/vnfapi/features/src/main/resources/features.xml
+++ b/vnfapi/features/src/main/resources/features.xml
@@ -9,9 +9,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.
@@ -33,7 +33,6 @@
<feature>sdnc-sli</feature>
<bundle>mvn:org.onap.sdnc.northbound/vnfapi-model/${project.version}</bundle>
<bundle>mvn:org.onap.sdnc.northbound/vnfapi-provider/${project.version}</bundle>
- <configfile finalname="etc/opendaylight/karaf/200-vnfapi-provider.xml">mvn:org.openecomp.sdnc.northbound/vnfapi-provider/${project.version}/xml/config</configfile>
</feature>
</features>
diff --git a/vnfapi/installer/src/assembly/assemble_mvnrepo_zip.xml b/vnfapi/installer/src/assembly/assemble_mvnrepo_zip.xml
index 162ce109..0612e6ed 100644
--- a/vnfapi/installer/src/assembly/assemble_mvnrepo_zip.xml
+++ b/vnfapi/installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -43,10 +43,6 @@
</fileSets>
<files>
- <file>
- <source>../provider/src/main/resources/initial/${feature-name}-provider.xml</source>
- <destName>./etc/opendaylight/karaf/200-${feature-name}-provider.xml</destName>
- </file>
<file>
<source>../model/target/vnfapi.properties</source>
<destName>./configuration/vnfapi.properties</destName>
diff --git a/vnfapi/provider/pom.xml b/vnfapi/provider/pom.xml
index c603b4dd..50ceb45e 100644
--- a/vnfapi/provider/pom.xml
+++ b/vnfapi/provider/pom.xml
@@ -21,70 +21,7 @@
</instructions>
</configuration>
</plugin>
- <plugin>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>yang-maven-plugin</artifactId>
- <version>${odl.yangtools.yang.maven.plugin.version}</version>
- <executions>
- <execution>
- <id>config</id>
- <goals>
- <goal>generate-sources</goal>
- </goals>
- <configuration>
- <codeGenerators>
- <generator>
- <codeGeneratorClass>org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator</codeGeneratorClass>
- <outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
- <additionalConfiguration>
- <namespaceToPackage1>urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang</namespaceToPackage1>
- </additionalConfiguration>
- </generator>
- <generator>
- <codeGeneratorClass>org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
- <outputBaseDir>${salGeneratorPath}</outputBaseDir>
- </generator>
- </codeGenerators>
- <inspectDependencies>true</inspectDependencies>
- </configuration>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>maven-sal-api-gen-plugin</artifactId>
- <version>${odl.sal.api.gen.plugin.version}</version>
- <type>jar</type>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>yang-jmx-generator-plugin</artifactId>
- <version>${odl.yang.jmx.generator.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <phase>package</phase>
- <configuration>
- <artifacts>
- <artifact>
- <file>${project.build.directory}/classes/initial/vnfapi-provider.xml</file>
- <type>xml</type>
- <classifier>config</classifier>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
+
</plugins>
</build>
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 {
-
-}
diff --git a/vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml b/vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml
deleted file mode 100644
index 3883f674..00000000
--- a/vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ============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=========================================================
- -->
-
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<snapshot>
- <configuration>
- <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <module>
-
- <!-- This xmlns:prefix should match the namespace in the *-provider-impl.yang file
- The prefix: inside type should match the prefix of the yang file. -->
- <type xmlns:prefix="org:openecomp:sdnc:vnfapi:provider:impl">
- prefix:vnfapi-provider-impl
- </type>
- <name>vnfapi-provider-impl</name>
-
- <!-- The following sections contain bindings to services defined in the
- *-provider-impl yang file. For example the rpc-registry is required
- because we have a dependency (or augmentation) named "rpc-registry"
- and which binds to the md-sa-binding-registry. If you remove those
- dependencies from the yang file then you can remove them from here. -->
- <rpc-registry>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
- <name>binding-rpc-broker</name>
- </rpc-registry>
-
- <data-broker>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-async-data-broker</type>
- <name>binding-data-broker</name>
- </data-broker>
-
- <notification-service>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding:impl">
- binding:binding-new-notification-publish-service
- </type>
- <name>binding-notification-broker</name>
- </notification-service>
- </module>
-
- </modules>
- </data>
-
- </configuration>
-
- <!-- Required capabilities are basically a listing of all modules that need to be imported before
- our service can be resolved. Capabilities for dependencies defined above are implied which is
- why we do not have define a required capability for the data broker, for example. -->
- <required-capabilities>
- <capability>org:openecomp:sdnc:vnfapi:provider:impl?module=vnfapi-provider-impl&amp;revision=2014-05-23</capability>
- </required-capabilities>
-
-</snapshot>
diff --git a/vnfapi/provider/src/main/resources/org/opendaylight/blueprint/vnfapi-blueprint.xml b/vnfapi/provider/src/main/resources/org/opendaylight/blueprint/vnfapi-blueprint.xml
new file mode 100644
index 00000000..8741a09f
--- /dev/null
+++ b/vnfapi/provider/src/main/resources/org/opendaylight/blueprint/vnfapi-blueprint.xml
@@ -0,0 +1,34 @@
+<?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">
+
+ <reference id="svcLogicService"
+ interface="org.onap.ccsdk.sli.core.sli.provider.SvcLogicService" />
+
+ <bean id="client" class="org.onap.sdnc.vnfapi.VNFSDNSvcLogicServiceClient">
+ <argument ref="svcLogicService" />
+ </bean>
+
+ <reference id="dataBroker"
+ interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
+ odl:type="default" />
+
+ <reference id="notificationService"
+ interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"
+ odl:type="default" />
+
+ <reference id="rpcRegistry"
+ interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"
+ odl:type="default" />
+
+ <bean id="provider" class="org.onap.sdnc.vnfapi.vnfapiProvider">
+ <argument ref="dataBroker" />
+ <argument ref="notificationService" />
+ <argument ref="rpcRegistry" />
+ <argument ref="client" />
+ </bean>
+
+ <odl:rpc-implementation ref="provider"/>
+
+</blueprint> \ No newline at end of file
diff --git a/vnfapi/provider/src/main/yang/vnfapi-provider-impl.yang b/vnfapi/provider/src/main/yang/vnfapi-provider-impl.yang
deleted file mode 100644
index 183fa901..00000000
--- a/vnfapi/provider/src/main/yang/vnfapi-provider-impl.yang
+++ /dev/null
@@ -1,65 +0,0 @@
-module vnfapi-provider-impl {
-
- yang-version 1;
- namespace "org:onap:sdnc:vnfapi:provider:impl";
- prefix "vnfapi-provider-impl";
-
- import config { prefix config; revision-date 2013-04-05; }
- import opendaylight-md-sal-binding { prefix mdsal; revision-date 2013-10-28; }
- import opendaylight-sal-binding-broker-impl {
- prefix binding-impl;
- revision-date 2013-10-28;
- }
-
- description
- "This module contains the base YANG definitions for
- vnfapi-provider impl implementation.";
-
- revision "2014-05-23" {
- description
- "Initial revision.";
- }
-
- // This is the definition of the service implementation as a module identity.
- identity vnfapi-provider-impl {
- base config:module-type;
-
- // Specifies the prefix for generated java classes.
- config:java-name-prefix vnfapiProvider;
- }
-
- // Augments the 'configuration' choice node under modules/module.
- // We consume the three main services, RPCs, DataStore, and Notifications
- augment "/config:modules/config:module/config:configuration" {
- case vnfapi-provider-impl {
- when "/config:modules/config:module/config:type = 'vnfapi-provider-impl'";
-
- container rpc-registry {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity mdsal:binding-rpc-registry;
- }
- }
- }
-
- container notification-publish-adapter {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity binding-impl:binding-new-notification-publish-service;
- }
- }
- }
-
- container data-broker {
- uses config:service-ref {
- refine type {
- mandatory false;
- config:required-identity mdsal:binding-async-data-broker;
- }
- }
- }
- }
- }
-}
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