From ea5bf0a1c8a4e525d2cee03841b8e8f9b3563ed0 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 18 Jul 2017 20:32:15 -0400 Subject: [CCSDK-6] Populate seed code Add seed code for sli/northbound repository Update groupId to org.onap.ccsdk.sli.northbound Update to use CCSDK version of sli core Change-Id: Id3a154a53150a74f4b65060544e76f3e0cad932e Signed-off-by: Dan Timoney --- asdcApi/model/src/main/yang/ASDC-API.yang | 63 ++++ asdcApi/model/src/main/yang/asdc-api-common.yang | 53 +++ .../model/src/main/yang/asdc-license-model.yang | 369 +++++++++++++++++++++ 3 files changed, 485 insertions(+) create mode 100755 asdcApi/model/src/main/yang/ASDC-API.yang create mode 100755 asdcApi/model/src/main/yang/asdc-api-common.yang create mode 100755 asdcApi/model/src/main/yang/asdc-license-model.yang (limited to 'asdcApi/model/src/main/yang') diff --git a/asdcApi/model/src/main/yang/ASDC-API.yang b/asdcApi/model/src/main/yang/ASDC-API.yang new file mode 100755 index 000000000..401ec7da9 --- /dev/null +++ b/asdcApi/model/src/main/yang/ASDC-API.yang @@ -0,0 +1,63 @@ + +module ASDC-API { + yang-version "1"; + + namespace "org:openecomp:sdnc"; + + prefix asdc-api; + + import asdc-api-common { prefix asdc-api-common; } + + + import asdc-license-model { prefix asdc-license-model; } + + import ietf-inet-types { + prefix inet; + revision-date "2010-09-24"; + } + + organization + "OpenECOMP"; + + contact + "Dan Timoney"; + + description + "SDC Interface"; + + revision 2017-02-01 { + description "database definitions"; + } + + // Containers + container artifacts { + list artifact { + key "artifact-name artifact-version"; + + uses asdc-api-common:artifact-fields; + } + } + + + + container vf-license-model-versions { + list vf-license-model-version { + key artifact-version; + uses asdc-api-common:artifact-fields; + uses asdc-license-model:vf-license-model-grouping; + } + } + + + // RPCs + + rpc vf-license-model-update { + input { + uses asdc-api-common:artifact-fields; + uses asdc-license-model:vf-license-model-grouping; + } + output { + uses asdc-api-common:asdc-api-response; + } + } +} diff --git a/asdcApi/model/src/main/yang/asdc-api-common.yang b/asdcApi/model/src/main/yang/asdc-api-common.yang new file mode 100755 index 000000000..126368d4f --- /dev/null +++ b/asdcApi/model/src/main/yang/asdc-api-common.yang @@ -0,0 +1,53 @@ + +module asdc-api-common { + yang-version "1"; + + // Use same namespace defined for file upload in 15.12 + namespace "org:openecomp:sdnc:asdcapi:common"; + + prefix asdcapi; + + organization + "OpenECOMP"; + + contact + "Dan Timoney"; + + description + "ASDC/SDN-C API common data"; + + revision 2017-02-01 { + description "Initial release"; + } + + + + // Groupings + + grouping artifact-fields { + leaf artifact-name { + type string; + description "Name of artifact"; + } + + leaf artifact-version { + type string; + description "Version of artifact"; + } + } + + grouping asdc-api-response { + leaf asdc-api-response-code { + type string; + description "Code indicating success/failure"; + } + + leaf asdc-api-response-text { + type string; + description "Text indicating reason for failure"; + } + } + + + +} diff --git a/asdcApi/model/src/main/yang/asdc-license-model.yang b/asdcApi/model/src/main/yang/asdc-license-model.yang new file mode 100755 index 000000000..37ae869bd --- /dev/null +++ b/asdcApi/model/src/main/yang/asdc-license-model.yang @@ -0,0 +1,369 @@ +module asdc-license-model { + + namespace "http://xmlns.openecomp.org/asdc/license-model/1.0"; + prefix le; + organization "openecomp"; + contact "asdc"; + description "schema for both vendor license and VF license models"; + revision 2016-04-27 { + description "xxxx"; + reference "xxxx"; + } + + container vendor-license-model { + description "xxxx"; + leaf vendor-name { + type string{ + length "1..200"; + } + description "xxxx"; + } + uses entitlement-pools; + uses license-key-groups; + } + + grouping entitlement-pools { + description "xxxx"; + container entitlement-pool-list { + description "xxxx"; + uses entitlement-pool; + } + } + + grouping entitlement-pool { + description "xxxx"; + list entitlement-pool { + description "xxxx"; + leaf entitlement-pool-uuid { + type string; + description "xxxx"; + } + leaf name { + type string{ + length "1..120"; + } + description "xxxx"; + } + leaf description { + type string{ + length "1..1000"; + } + description "xxxx"; + } + leaf manufacturer-reference-number { + type string{ + length "1..100"; + } + description "xxxx"; + } + uses operational-scope; + uses threshold-value; + uses entitlement-metric; + leaf increments { + type string{ + length "1..120"; + } + description "xxxx"; + } + uses aggregation-function; + uses time; + } + } + + grouping operational-scope { + description "xxxx"; + container operational-scope { + description "xxxx"; + leaf value { + type enumeration { + enum "Network_Wide"{ + description "xxxx"; + } + enum "Availability_Zone"{ + description "xxxx"; + } + enum "Data_Center"{ + description "xxxx"; + } + enum "Tenant"{ + description "xxxx"; + } + enum "VM"{ + description "xxxx"; + } + enum "CPU"{ + description "xxxx"; + } + enum "Core"{ + description "xxxx"; + } + enum "Other"{ + description "xxxx"; + } + } + description "xxxx"; + } + leaf other { + type string{ + length "1..200"; + } + description "xxxx"; + } + } + } + + grouping threshold-value { + description "xxxx"; + container threshold-value { + description "xxxx"; + leaf value { + type uint32{ + range "0..9999999"; + } //TBD Change to type number + description "xxxx"; + } + leaf unit { + type enumeration { + enum "Absolute"{ + description "xxxx"; + } + enum "Percentage"{ + description "xxxx"; + } + } + description "xxxx"; + } + } + } + + grouping entitlement-metric { + description "xxxx"; + container entitlement-metric { + description "xxxx"; + leaf value { + type enumeration { + enum "Software_Instances_Count"{ + description "xxxx"; + } + enum "CPU"{ + description "xxxx"; + } + enum "Core"{ + description "xxxx"; + } + enum "Trunks"{ + description "xxxx"; + } + enum "User"{ + description "xxxx"; + } + enum "Subscribers"{ + description "xxxx"; + } + enum "Tenants"{ + description "xxxx"; + } + enum "Tokens"{ + description "xxxx"; + } + enum "Seats"{ + description "xxxx"; + } + enum "Units_TB"{ + description "xxxx"; + } + enum "Units_GB"{ + description "xxxx"; + } + enum "Units_MB"{ + description "xxxx"; + } + enum "Other"{ + description "xxxx"; + } + } + description "xxxx"; + } + leaf other { + type string{ + length "1..200"; + } + description "xxxx"; + } + } + } + + grouping aggregation-function { + description "xxxx"; + container aggregation-function { + description "xxxx"; + leaf value { + type enumeration { + enum "Peak"{ + description "xxxx"; + } + enum "Average"{ + description "xxxx"; + } + enum "Other"{ + description "xxxx"; + } + } + description "xxxx"; + } + leaf other { + type string{ + length "1..200"; + } + description "xxxx"; + } + } + } + + grouping time { + description "xxxx"; + container time { + description "xxxx"; + leaf value { + type enumeration { + enum "Hour"{ + description "xxxx"; + } + enum "Day"{ + description "xxxx"; + } + enum "Month"{ + description "xxxx"; + } + enum "Quarter"{ + description "xxxx"; + } + enum "Year"{ + description "xxxx"; + } + enum "Other"{ + description "xxxx"; + } + } + description "xxxx"; + } + leaf other { + type string{ + length "1..200"; + } + description "xxxx"; + } + } + } + + + + grouping license-key-groups { + description "xxxx"; + container license-key-group-list { + description "xxxx"; + leaf name { + type string; + description "xxxx"; + } + uses license-key-group; + } + } + + grouping license-key-group { + description "xxxx"; + list license-key-group { + description "xxxx"; + leaf license-key-group-uuid { + type string; + description "xxxx"; + } + leaf name { + type string{ + length "1..120"; + } + description "xxxx"; + } + leaf description { + type string{ + length "1..1000"; + } + description "xxxx"; + } + uses operational-scope; + leaf type { + type enumeration { + enum "Universal"{ + description "xxxx"; + } + enum "Unique"{ + description "xxxx"; + } + enum "One_Time"{ + description "xxxx"; + } + } + description "xxxx"; + } + } + } + + grouping vf-license-model-grouping { + description "xxxx"; + container vf-license-model { + description "xxxx"; + leaf vf-id { + type string{ + length "1..200"; + } + description "xxxx"; + } + leaf vendor-name { + type string{ + length "1..200"; + } + description "xxxx"; + } + uses feature-groups; + } + } + + grouping feature-groups { + description "xxxx"; + container feature-group-list { + description "xxxx"; + uses feature-group-grouping; + } + } + + grouping feature-group-grouping { + description "xxxx"; + list feature-group { + description "xxxx"; + leaf name{ + type string{ + length "1..120"; + } + description "xxxx"; + } + leaf feature-group-uuid{ + type string; + description "xxxx"; + } + leaf description { + type string{ + length "1..1000"; + } + description "xxxx"; + } + leaf att-part-number { + type string{ + length "1..100"; + } + description "xxxx"; + } + uses entitlement-pools; + uses license-key-groups; + } + } +} -- cgit 1.2.3-korg From bfaacc8a077daa48fb85e66a80e8f2904fce59a0 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Mon, 14 Aug 2017 16:06:52 -0400 Subject: Refactor asdcApi Refactor asdcApi to replace openecomp references with onap Change-Id: Ic0d61ca75219a57331ba61908fba942a1c0dce7b Issue-ID: CCSDK-25 Signed-off-by: Dan Timoney --- asdcApi/features/src/main/resources/features.xml | 8 +- asdcApi/installer/pom.xml | 2 +- asdcApi/model/src/main/yang/ASDC-API.yang | 4 +- asdcApi/model/src/main/yang/asdc-api-common.yang | 4 +- .../model/src/main/yang/asdc-license-model.yang | 4 +- .../sli/northbound/asdcapi/AsdcApiProvider.java | 415 +++++++++++++++++++++ .../sli/northbound/asdcapi/AsdcApiSliClient.java | 111 ++++++ .../ccsdk/sli/northbound/asdcapi/AsdcApiUtil.java | 48 +++ .../impl/rev140523/AsdcApiProviderModule.java | 43 +++ .../rev140523/AsdcApiProviderModuleFactory.java | 34 ++ .../impl/rev140523/AsdcApiProviderModule.java | 57 --- .../rev140523/AsdcApiProviderModuleFactory.java | 34 -- .../openecomp/sdnc/asdcapi/AsdcApiProvider.java | 415 --------------------- .../openecomp/sdnc/asdcapi/AsdcApiSliClient.java | 111 ------ .../org/openecomp/sdnc/asdcapi/AsdcApiUtil.java | 48 --- .../main/resources/initial/asdcApi-provider.xml | 6 +- .../src/main/yang/asdcApi-provider-impl.yang | 2 +- 17 files changed, 664 insertions(+), 682 deletions(-) create mode 100644 asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java create mode 100644 asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java create mode 100644 asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtil.java create mode 100644 asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java create mode 100644 asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java delete mode 100644 asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java delete mode 100644 asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java delete mode 100644 asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiProvider.java delete mode 100644 asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiSliClient.java delete mode 100644 asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiUtil.java (limited to 'asdcApi/model/src/main/yang') diff --git a/asdcApi/features/src/main/resources/features.xml b/asdcApi/features/src/main/resources/features.xml index e72e0f653..f9aa81a66 100644 --- a/asdcApi/features/src/main/resources/features.xml +++ b/asdcApi/features/src/main/resources/features.xml @@ -9,9 +9,7 @@ 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. @@ -31,11 +29,11 @@ odl-mdsal-broker - mvn:org.openecomp.sdnc.northbound/asdcApi-model/${project.version} - mvn:org.openecomp.sdnc.northbound/asdcApi-provider/${project.version} + mvn:org.onap.ccsdk.sli.northbound/asdcApi-model/${project.version} + mvn:org.onap.ccsdk.sli.northbound/asdcApi-provider/${project.version} sdnc-sli - mvn:org.openecomp.sdnc.northbound/asdcApi-provider/${project.version}/xml/config + mvn:org.onap.ccsdk.sli.northbound/asdcApi-provider/${project.version}/xml/config diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index 94008aaaf..b4f32934a 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -100,7 +100,7 @@ true false false - org.openecomp.sdnc + org.onap.ccsdk.sli.northbound sli-common,sli-provider,dblib-provider provided diff --git a/asdcApi/model/src/main/yang/ASDC-API.yang b/asdcApi/model/src/main/yang/ASDC-API.yang index 401ec7da9..00ef4522a 100755 --- a/asdcApi/model/src/main/yang/ASDC-API.yang +++ b/asdcApi/model/src/main/yang/ASDC-API.yang @@ -2,7 +2,7 @@ module ASDC-API { yang-version "1"; - namespace "org:openecomp:sdnc"; + namespace "org:onap:ccsdk"; prefix asdc-api; @@ -17,7 +17,7 @@ module ASDC-API { } organization - "OpenECOMP"; + "ONAP"; contact "Dan Timoney"; diff --git a/asdcApi/model/src/main/yang/asdc-api-common.yang b/asdcApi/model/src/main/yang/asdc-api-common.yang index 126368d4f..1531b7b30 100755 --- a/asdcApi/model/src/main/yang/asdc-api-common.yang +++ b/asdcApi/model/src/main/yang/asdc-api-common.yang @@ -3,12 +3,12 @@ module asdc-api-common { yang-version "1"; // Use same namespace defined for file upload in 15.12 - namespace "org:openecomp:sdnc:asdcapi:common"; + namespace "org:onap:ccsdk:sli:northbound:asdcapi:common"; prefix asdcapi; organization - "OpenECOMP"; + "ONAP"; contact "Dan Timoney"; diff --git a/asdcApi/model/src/main/yang/asdc-license-model.yang b/asdcApi/model/src/main/yang/asdc-license-model.yang index 37ae869bd..33f383569 100755 --- a/asdcApi/model/src/main/yang/asdc-license-model.yang +++ b/asdcApi/model/src/main/yang/asdc-license-model.yang @@ -1,8 +1,8 @@ module asdc-license-model { - namespace "http://xmlns.openecomp.org/asdc/license-model/1.0"; + namespace "http://xmlns.onap.org/asdc/license-model/1.0"; prefix le; - organization "openecomp"; + organization "onap"; contact "asdc"; description "schema for both vendor license and VF license models"; revision 2016-04-27 { diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java new file mode 100644 index 000000000..c6e1921b7 --- /dev/null +++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java @@ -0,0 +1,415 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP 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.onap.ccsdk.sli.northbound.asdcapi; + +import java.util.Properties; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; + +import org.opendaylight.controller.md.sal.binding.api.DataBroker; +import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction; +import org.opendaylight.controller.md.sal.binding.api.WriteTransaction; +import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; +import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; +import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; +import org.opendaylight.controller.sal.binding.api.NotificationProviderService; +import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; +import org.opendaylight.yang.gen.v1.http.xmlns.onap.org.asdc.license.model._1._0.rev160427.vf.license.model.grouping.VfLicenseModel; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.ASDCAPIService; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.Artifacts; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.ArtifactsBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.VfLicenseModelUpdateInput; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.VfLicenseModelUpdateInputBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.VfLicenseModelUpdateOutput; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.VfLicenseModelUpdateOutputBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.VfLicenseModelVersions; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.VfLicenseModelVersionsBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.artifacts.Artifact; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.artifacts.ArtifactBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.artifacts.ArtifactKey; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.vf.license.model.versions.VfLicenseModelVersion; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.vf.license.model.versions.VfLicenseModelVersionBuilder; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; +import org.opendaylight.yangtools.yang.common.RpcResult; +import org.opendaylight.yangtools.yang.common.RpcResultBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.base.Optional; +import com.google.common.util.concurrent.CheckedFuture; +import com.google.common.util.concurrent.Futures; + +/** + * Defines a base implementation for your provider. This class extends from a helper class + * which provides storage for the most commonly used components of the MD-SAL. Additionally the + * base class provides some basic logging and initialization / clean up methods. + * + * To use this, copy and paste (overwrite) the following method into the TestApplicationProviderModule + * class which is auto generated under src/main/java in this project + * (created only once during first compilation): + * + *
+
+    @Override
+    public java.lang.AutoCloseable createInstance() {
+
+         final asdcApiProvider provider = new asdcApiProvider();
+         provider.setDataBroker( getDataBrokerDependency() );
+         provider.setNotificationService( getNotificationServiceDependency() );
+         provider.setRpcRegistry( getRpcRegistryDependency() );
+         provider.initialize();
+         return new AutoCloseable() {
+
+            @Override
+            public void close() throws Exception {
+                //TODO: CLOSE ANY REGISTRATION OBJECTS CREATED USING ABOVE BROKER/NOTIFICATION
+                //SERVIE/RPC REGISTRY
+                provider.close();
+            }
+        };
+    }
+
+
+    
+ */ +public class AsdcApiProvider implements AutoCloseable, ASDCAPIService { + + private static final String ACTIVE_VERSION = "active"; + + private final Logger log = LoggerFactory.getLogger( AsdcApiProvider.class ); + private final String appName = "asdcApi"; + + private final ExecutorService executor; + protected DataBroker dataBroker; + protected NotificationProviderService notificationService; + protected RpcProviderRegistry rpcRegistry; + + protected BindingAwareBroker.RpcRegistration rpcRegistration; + + public AsdcApiProvider(DataBroker dataBroker2, + NotificationProviderService notificationProviderService, + RpcProviderRegistry rpcProviderRegistry) { + this.log.info( "Creating provider for " + appName ); + executor = Executors.newFixedThreadPool(1); + dataBroker = dataBroker2; + notificationService = notificationProviderService; + rpcRegistry = rpcProviderRegistry; + initialize(); + } + + public void initialize(){ + log.info( "Initializing provider for " + appName ); + + + createContainers(); + + if (rpcRegistration == null) { + if (rpcRegistry != null) { + rpcRegistration = rpcRegistry.addRpcImplementation( + ASDCAPIService.class, this); + log.info("Initialization complete for " + appName); + } else { + log.warn("Error initializing " + appName + + " : rpcRegistry unset"); + } + } + } + + private void createContainers() { + + if (dataBroker != null) { + final WriteTransaction t = dataBroker.newReadWriteTransaction(); + + // Create the vf-model-license-versions and artifacts containers + t.merge(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.create(VfLicenseModelVersions.class), + new VfLicenseModelVersionsBuilder().build()); + + t.merge(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.create(Artifacts.class), new ArtifactsBuilder().build()); + + + try { + CheckedFuture checkedFuture = t.submit(); + checkedFuture.get(); + log.info("Create Containers succeeded!: "); + + } catch (InterruptedException | ExecutionException e) { + log.error("Create Containers Failed: " + e); + e.printStackTrace(); + } + } else { + log.warn("createContainers : cannot find dataBroker to create containers"); + } + } + protected void initializeChild() { + //Override if you have custom initialization intelligence + } + + @Override + public void close() throws Exception { + log.info( "Closing provider for " + appName ); + executor.shutdown(); + rpcRegistration.close(); + log.info( "Successfully closed provider for " + appName ); + } + + public void setDataBroker(DataBroker dataBroker) { + this.dataBroker = dataBroker; + if( log.isDebugEnabled() ){ + log.debug( "DataBroker set to " + (dataBroker==null?"null":"non-null") + "." ); + } + } + + public void setNotificationService( + NotificationProviderService notificationService) { + this.notificationService = notificationService; + if( log.isDebugEnabled() ){ + log.debug( "Notification Service set to " + (notificationService==null?"null":"non-null") + "." ); + } + } + + public void setRpcRegistry(RpcProviderRegistry rpcRegistry) { + this.rpcRegistry = rpcRegistry; + + rpcRegistration = rpcRegistry.addRpcImplementation(ASDCAPIService.class, this); + + if( log.isDebugEnabled() ){ + log.debug( "RpcRegistry set to " + (rpcRegistry==null?"null":"non-null") + "." ); + } + } + + + protected boolean artifactVersionExists(String aName, String aVersion) { + InstanceIdentifier artifactInstanceId = + InstanceIdentifier.builder(Artifacts.class) + .child(Artifact.class, new ArtifactKey(aName, aVersion)).toInstance(); + ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction(); + Optional data = null; + try { + data = (Optional) readTx.read(LogicalDatastoreType.CONFIGURATION, artifactInstanceId).get(); + } catch (InterruptedException | ExecutionException e) { + log.error("Caught Exception reading MD-SAL for ["+aName+","+ aVersion+"] " ,e); + return false; + + } + + if (data.isPresent()) { + return true; + } else { + return false; + } + } + + protected void addArtifactVersion(String aName, String aVersion) { + + + try { + ArtifactBuilder aBuilder = new ArtifactBuilder(); + + aBuilder.setArtifactName(aName); + aBuilder.setArtifactVersion(aVersion); + + Artifact artifact = aBuilder.build(); + + InstanceIdentifier.InstanceIdentifierBuilder aIdBuilder = InstanceIdentifier + . builder(Artifacts.class) + .child(Artifact.class, artifact.getKey()); + + InstanceIdentifier path = aIdBuilder + .toInstance(); + + WriteTransaction tx = dataBroker.newWriteOnlyTransaction(); + + tx.merge(LogicalDatastoreType.CONFIGURATION, path, + artifact); + tx.submit().checkedGet(); + } catch (Exception e) { + log.error("Caught exception trying to add artifact entry", e); + } + + } + + + private void applyVfLicenseModelUpdate(VfLicenseModelUpdateInput input) { + + String aName = input.getArtifactName(); + String aVersion = input.getArtifactVersion(); + VfLicenseModel vfLicenseModel = input.getVfLicenseModel(); + + + // Add new version (version = artifact-version) + try { + + VfLicenseModelVersionBuilder vBuilder = new VfLicenseModelVersionBuilder(); + vBuilder.setArtifactName(aName); + vBuilder.setArtifactVersion(aVersion); + vBuilder.setVfLicenseModel(vfLicenseModel); + + VfLicenseModelVersion version = vBuilder.build(); + + InstanceIdentifier.InstanceIdentifierBuilder versionIdBuilder = InstanceIdentifier + . builder(VfLicenseModelVersions.class) + .child(VfLicenseModelVersion.class, version.getKey()); + + InstanceIdentifier path = versionIdBuilder + .toInstance(); + + WriteTransaction tx = dataBroker.newWriteOnlyTransaction(); + tx.merge(LogicalDatastoreType.CONFIGURATION, path, + version); + tx.submit().checkedGet(); + } catch (Exception e) { + log.error( + "Caught exception trying to save entry to MD-SAL", + e); + } + + + // Add "active" version (version = "active") + try { + + VfLicenseModelVersionBuilder vBuilder = new VfLicenseModelVersionBuilder(); + vBuilder.setArtifactName(aName); + vBuilder.setArtifactVersion(ACTIVE_VERSION); + vBuilder.setVfLicenseModel(vfLicenseModel); + + VfLicenseModelVersion version = vBuilder.build(); + InstanceIdentifier.InstanceIdentifierBuilder versionIdBuilder = InstanceIdentifier + . builder(VfLicenseModelVersions.class) + .child(VfLicenseModelVersion.class, version.getKey()); + + InstanceIdentifier path = versionIdBuilder + .toInstance(); + + WriteTransaction tx = dataBroker.newWriteOnlyTransaction(); + + tx.merge(LogicalDatastoreType.CONFIGURATION, path, + version); + tx.submit().checkedGet(); + } catch (Exception e) { + log.error( + "Caught exception trying to save entry to MD-SAL", + e); + } + +} + +@Override +public Future> vfLicenseModelUpdate(VfLicenseModelUpdateInput input) { + final String SVC_OPERATION = "vf-license-model-update"; + + Properties parms = new Properties(); + + log.info( SVC_OPERATION +" called." ); + + if(input == null ) { + log.debug("exiting " +SVC_OPERATION+ " because of invalid input"); + return null; + } + + VfLicenseModelUpdateInputBuilder inputBuilder = new VfLicenseModelUpdateInputBuilder(input); + input = inputBuilder.build(); + + String errorMessage = "Success"; + String errorCode = "200"; + + // If this artifact already exists, reject this update + if (artifactVersionExists(input.getArtifactName(), input.getArtifactVersion())) { + errorCode = "409"; + errorMessage = "Artifact version already exists"; + } else { + // Translate input object into SLI-consumable properties + log.info("Adding INPUT data for "+SVC_OPERATION+" input: " + input); + AsdcApiUtil.toProperties(parms, input); + + + // Call directed graph + + Properties respProps = null; + + + AsdcApiSliClient sliClient = new AsdcApiSliClient(); + try + { + if (sliClient.hasGraph("ASDC-API", SVC_OPERATION , null, "sync")) + { + + try + { + respProps = sliClient.execute("ASDC-API", SVC_OPERATION, null, "sync", parms); + } + catch (Exception e) + { + log.error("Caught exception executing service logic for "+ SVC_OPERATION, e); + } + } else { + errorMessage = "No service logic active for ASDC-API: '" + SVC_OPERATION + "'"; + errorCode = "503"; + } + } + catch (Exception e) + { + errorCode = "500"; + errorMessage = e.getMessage(); + log.error("Caught exception looking for service logic", e); + } + + + if (respProps != null) + { + errorCode = respProps.getProperty("error-code"); + errorMessage = respProps.getProperty("error-message", ""); + } + } + + + if ("200".equals(errorCode)) { + log.info("ASDC update succeeded"); + + // Update config tree + applyVfLicenseModelUpdate(input); + addArtifactVersion(input.getArtifactName(), input.getArtifactVersion()); + + } else { + log.info("ASDC update failed ("+errorCode+" : "+errorMessage); + } + + // Send response + VfLicenseModelUpdateOutputBuilder respBuilder = new VfLicenseModelUpdateOutputBuilder(); + respBuilder.setAsdcApiResponseCode(errorCode); + if (errorMessage != null && errorMessage.length() > 0) { + respBuilder.setAsdcApiResponseText(errorMessage); + } + + RpcResult rpcResult; + + + rpcResult = RpcResultBuilder. status(true).withResult(respBuilder.build()).build(); + + + + return Futures.immediateFuture(rpcResult); +} + + +} diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java new file mode 100644 index 000000000..0fa90ea7e --- /dev/null +++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiSliClient.java @@ -0,0 +1,111 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP 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.onap.ccsdk.sli.northbound.asdcapi; + +import java.util.Properties; + +import org.onap.ccsdk.sli.core.sli.SvcLogicException; +import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; +import org.osgi.framework.BundleContext; +import org.osgi.framework.FrameworkUtil; +import org.osgi.framework.ServiceReference; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class AsdcApiSliClient { + + private static final Logger LOG = LoggerFactory + .getLogger(AsdcApiSliClient.class); + + private SvcLogicService svcLogic = null; + + public AsdcApiSliClient() + { + BundleContext bctx = FrameworkUtil.getBundle(SvcLogicService.class).getBundleContext(); + + // 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 + { + return(svcLogic.hasGraph(module, rpc, version, mode)); + } + + + public Properties execute(String module, String rpc, String version, String mode, Properties parms) + throws SvcLogicException { + + + if (LOG.isDebugEnabled()) + { + LOG.debug("Parameters passed to SLI"); + + for (Object key : parms.keySet()) { + String parmName = (String) key; + String parmValue = parms.getProperty(parmName); + + LOG.debug(parmName+" = "+parmValue); + + } + } + + Properties respProps = svcLogic.execute(module, rpc, version, mode, parms); + + if (LOG.isDebugEnabled()) + { + LOG.debug("Parameters returned by SLI"); + + for (Object key : respProps.keySet()) { + String parmName = (String) key; + String parmValue = respProps.getProperty(parmName); + + LOG.debug(parmName+" = "+parmValue); + + } + } + + if ("failure".equalsIgnoreCase(respProps.getProperty("SvcLogic.status"))) { + + if (!respProps.containsKey("error-code")) { + respProps.setProperty("error-code", "500"); + } + } else { + if (!respProps.containsKey("error-code")) { + respProps.setProperty("error-code", "200"); + } + } + + + return (respProps); + } + +} diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtil.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtil.java new file mode 100644 index 000000000..6498f13b5 --- /dev/null +++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiUtil.java @@ -0,0 +1,48 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP 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.onap.ccsdk.sli.northbound.asdcapi; + +import org.onap.ccsdk.sli.core.sli.provider.MdsalHelper; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.ArtifactsBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.VfLicenseModelUpdateInput; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.VfLicenseModelUpdateInputBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.VfLicenseModelVersionsBuilder; +import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev170201.vf.license.model.versions.VfLicenseModelVersionBuilder; + +public class AsdcApiUtil extends MdsalHelper { + + static { + + // Input objects + + VfLicenseModelUpdateInput i13 = new VfLicenseModelUpdateInputBuilder().build(); + + + // Other builders + ArtifactsBuilder b1 = new ArtifactsBuilder(); + + VfLicenseModelVersionsBuilder b14a = new VfLicenseModelVersionsBuilder(); + VfLicenseModelVersionBuilder b26a = new VfLicenseModelVersionBuilder(); + + + } +} 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 new file mode 100644 index 000000000..0a2272d35 --- /dev/null +++ b/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java @@ -0,0 +1,43 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP 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.ccsdk.sli.northbound.asdcapi.provider.impl.rev140523; +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); + } + + public AsdcApiProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.asdcapi.provider.impl.rev140523.AsdcApiProviderModule 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() { + // TODO:implement + throw new java.lang.UnsupportedOperationException(); + } + +} diff --git a/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java b/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java new file mode 100644 index 000000000..c2d15b890 --- /dev/null +++ b/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/onap/ccsdk/sli/northbound/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 ONAP 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: asdcApi-provider-impl yang module local name: asdcApi-provider-impl +* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator +* Generated at: Mon Aug 14 15:34:51 EDT 2017 +* +* Do not modify this file unless it is present under src/main directory +*/ +package org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.asdcapi.provider.impl.rev140523; +public class AsdcApiProviderModuleFactory extends org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.asdcapi.provider.impl.rev140523.AbstractAsdcApiProviderModuleFactory { + +} diff --git a/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java b/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java deleted file mode 100644 index c9223a15c..000000000 --- a/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/asdcapi/provider/impl/rev140523/AsdcApiProviderModule.java +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP 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.openecomp.sdnc.asdcapi.provider.impl.rev140523; - -import org.openecomp.sdnc.asdcapi.AsdcApiProvider; - -public class AsdcApiProviderModule extends org.opendaylight.yang.gen.v1.org.openecomp.sdnc.asdcapi.provider.impl.rev140523.AbstractAsdcApiProviderModule { - public AsdcApiProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public AsdcApiProviderModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.org.openecomp.sdnc.asdcapi.provider.impl.rev140523.AsdcApiProviderModule 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 AsdcApiProvider provider = new AsdcApiProvider(getDataBrokerDependency() - , getNotificationServiceDependency() - , getRpcRegistryDependency()); - - return new AutoCloseable() { - - @Override - public void close() throws Exception { - - provider.close(); - } - }; - } - -} diff --git a/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java b/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java deleted file mode 100644 index 6a1d8068e..000000000 --- a/asdcApi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/asdcapi/provider/impl/rev140523/AsdcApiProviderModuleFactory.java +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP 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: asdcApi-provider-impl yang module local name: asdcApi-provider-impl -* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator -* Generated at: Wed Nov 02 03:46:08 EDT 2016 -* -* Do not modify this file unless it is present under src/main directory -*/ -package org.opendaylight.yang.gen.v1.org.openecomp.sdnc.asdcapi.provider.impl.rev140523; -public class AsdcApiProviderModuleFactory extends org.opendaylight.yang.gen.v1.org.openecomp.sdnc.asdcapi.provider.impl.rev140523.AbstractAsdcApiProviderModuleFactory { - -} diff --git a/asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiProvider.java b/asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiProvider.java deleted file mode 100644 index 28e59c8d7..000000000 --- a/asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiProvider.java +++ /dev/null @@ -1,415 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP 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.openecomp.sdnc.asdcapi; - -import java.util.Properties; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; - -import org.opendaylight.controller.md.sal.binding.api.DataBroker; -import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction; -import org.opendaylight.controller.md.sal.binding.api.WriteTransaction; -import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType; -import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException; -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; -import org.opendaylight.controller.sal.binding.api.NotificationProviderService; -import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; -import org.opendaylight.yang.gen.v1.http.xmlns.openecomp.org.asdc.license.model._1._0.rev160427.vf.license.model.grouping.VfLicenseModel; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.ASDCAPIService; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.Artifacts; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.ArtifactsBuilder; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.VfLicenseModelUpdateInput; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.VfLicenseModelUpdateInputBuilder; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.VfLicenseModelUpdateOutput; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.VfLicenseModelUpdateOutputBuilder; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.VfLicenseModelVersions; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.VfLicenseModelVersionsBuilder; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.artifacts.Artifact; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.artifacts.ArtifactBuilder; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.artifacts.ArtifactKey; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.vf.license.model.versions.VfLicenseModelVersion; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.vf.license.model.versions.VfLicenseModelVersionBuilder; -import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -import org.opendaylight.yangtools.yang.common.RpcResult; -import org.opendaylight.yangtools.yang.common.RpcResultBuilder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.common.base.Optional; -import com.google.common.util.concurrent.CheckedFuture; -import com.google.common.util.concurrent.Futures; - -/** - * Defines a base implementation for your provider. This class extends from a helper class - * which provides storage for the most commonly used components of the MD-SAL. Additionally the - * base class provides some basic logging and initialization / clean up methods. - * - * To use this, copy and paste (overwrite) the following method into the TestApplicationProviderModule - * class which is auto generated under src/main/java in this project - * (created only once during first compilation): - * - *
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-
-         final asdcApiProvider provider = new asdcApiProvider();
-         provider.setDataBroker( getDataBrokerDependency() );
-         provider.setNotificationService( getNotificationServiceDependency() );
-         provider.setRpcRegistry( getRpcRegistryDependency() );
-         provider.initialize();
-         return new AutoCloseable() {
-
-            @Override
-            public void close() throws Exception {
-                //TODO: CLOSE ANY REGISTRATION OBJECTS CREATED USING ABOVE BROKER/NOTIFICATION
-                //SERVIE/RPC REGISTRY
-                provider.close();
-            }
-        };
-    }
-
-
-    
- */ -public class AsdcApiProvider implements AutoCloseable, ASDCAPIService { - - private static final String ACTIVE_VERSION = "active"; - - private final Logger log = LoggerFactory.getLogger( AsdcApiProvider.class ); - private final String appName = "asdcApi"; - - private final ExecutorService executor; - protected DataBroker dataBroker; - protected NotificationProviderService notificationService; - protected RpcProviderRegistry rpcRegistry; - - protected BindingAwareBroker.RpcRegistration rpcRegistration; - - public AsdcApiProvider(DataBroker dataBroker2, - NotificationProviderService notificationProviderService, - RpcProviderRegistry rpcProviderRegistry) { - this.log.info( "Creating provider for " + appName ); - executor = Executors.newFixedThreadPool(1); - dataBroker = dataBroker2; - notificationService = notificationProviderService; - rpcRegistry = rpcProviderRegistry; - initialize(); - } - - public void initialize(){ - log.info( "Initializing provider for " + appName ); - - - createContainers(); - - if (rpcRegistration == null) { - if (rpcRegistry != null) { - rpcRegistration = rpcRegistry.addRpcImplementation( - ASDCAPIService.class, this); - log.info("Initialization complete for " + appName); - } else { - log.warn("Error initializing " + appName - + " : rpcRegistry unset"); - } - } - } - - private void createContainers() { - - if (dataBroker != null) { - final WriteTransaction t = dataBroker.newReadWriteTransaction(); - - // Create the vf-model-license-versions and artifacts containers - t.merge(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.create(VfLicenseModelVersions.class), - new VfLicenseModelVersionsBuilder().build()); - - t.merge(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier.create(Artifacts.class), new ArtifactsBuilder().build()); - - - try { - CheckedFuture checkedFuture = t.submit(); - checkedFuture.get(); - log.info("Create Containers succeeded!: "); - - } catch (InterruptedException | ExecutionException e) { - log.error("Create Containers Failed: " + e); - e.printStackTrace(); - } - } else { - log.warn("createContainers : cannot find dataBroker to create containers"); - } - } - protected void initializeChild() { - //Override if you have custom initialization intelligence - } - - @Override - public void close() throws Exception { - log.info( "Closing provider for " + appName ); - executor.shutdown(); - rpcRegistration.close(); - log.info( "Successfully closed provider for " + appName ); - } - - public void setDataBroker(DataBroker dataBroker) { - this.dataBroker = dataBroker; - if( log.isDebugEnabled() ){ - log.debug( "DataBroker set to " + (dataBroker==null?"null":"non-null") + "." ); - } - } - - public void setNotificationService( - NotificationProviderService notificationService) { - this.notificationService = notificationService; - if( log.isDebugEnabled() ){ - log.debug( "Notification Service set to " + (notificationService==null?"null":"non-null") + "." ); - } - } - - public void setRpcRegistry(RpcProviderRegistry rpcRegistry) { - this.rpcRegistry = rpcRegistry; - - rpcRegistration = rpcRegistry.addRpcImplementation(ASDCAPIService.class, this); - - if( log.isDebugEnabled() ){ - log.debug( "RpcRegistry set to " + (rpcRegistry==null?"null":"non-null") + "." ); - } - } - - - protected boolean artifactVersionExists(String aName, String aVersion) { - InstanceIdentifier artifactInstanceId = - InstanceIdentifier.builder(Artifacts.class) - .child(Artifact.class, new ArtifactKey(aName, aVersion)).toInstance(); - ReadOnlyTransaction readTx = dataBroker.newReadOnlyTransaction(); - Optional data = null; - try { - data = (Optional) readTx.read(LogicalDatastoreType.CONFIGURATION, artifactInstanceId).get(); - } catch (InterruptedException | ExecutionException e) { - log.error("Caught Exception reading MD-SAL for ["+aName+","+ aVersion+"] " ,e); - return false; - - } - - if (data.isPresent()) { - return true; - } else { - return false; - } - } - - protected void addArtifactVersion(String aName, String aVersion) { - - - try { - ArtifactBuilder aBuilder = new ArtifactBuilder(); - - aBuilder.setArtifactName(aName); - aBuilder.setArtifactVersion(aVersion); - - Artifact artifact = aBuilder.build(); - - InstanceIdentifier.InstanceIdentifierBuilder aIdBuilder = InstanceIdentifier - . builder(Artifacts.class) - .child(Artifact.class, artifact.getKey()); - - InstanceIdentifier path = aIdBuilder - .toInstance(); - - WriteTransaction tx = dataBroker.newWriteOnlyTransaction(); - - tx.merge(LogicalDatastoreType.CONFIGURATION, path, - artifact); - tx.submit().checkedGet(); - } catch (Exception e) { - log.error("Caught exception trying to add artifact entry", e); - } - - } - - - private void applyVfLicenseModelUpdate(VfLicenseModelUpdateInput input) { - - String aName = input.getArtifactName(); - String aVersion = input.getArtifactVersion(); - VfLicenseModel vfLicenseModel = input.getVfLicenseModel(); - - - // Add new version (version = artifact-version) - try { - - VfLicenseModelVersionBuilder vBuilder = new VfLicenseModelVersionBuilder(); - vBuilder.setArtifactName(aName); - vBuilder.setArtifactVersion(aVersion); - vBuilder.setVfLicenseModel(vfLicenseModel); - - VfLicenseModelVersion version = vBuilder.build(); - - InstanceIdentifier.InstanceIdentifierBuilder versionIdBuilder = InstanceIdentifier - . builder(VfLicenseModelVersions.class) - .child(VfLicenseModelVersion.class, version.getKey()); - - InstanceIdentifier path = versionIdBuilder - .toInstance(); - - WriteTransaction tx = dataBroker.newWriteOnlyTransaction(); - tx.merge(LogicalDatastoreType.CONFIGURATION, path, - version); - tx.submit().checkedGet(); - } catch (Exception e) { - log.error( - "Caught exception trying to save entry to MD-SAL", - e); - } - - - // Add "active" version (version = "active") - try { - - VfLicenseModelVersionBuilder vBuilder = new VfLicenseModelVersionBuilder(); - vBuilder.setArtifactName(aName); - vBuilder.setArtifactVersion(ACTIVE_VERSION); - vBuilder.setVfLicenseModel(vfLicenseModel); - - VfLicenseModelVersion version = vBuilder.build(); - InstanceIdentifier.InstanceIdentifierBuilder versionIdBuilder = InstanceIdentifier - . builder(VfLicenseModelVersions.class) - .child(VfLicenseModelVersion.class, version.getKey()); - - InstanceIdentifier path = versionIdBuilder - .toInstance(); - - WriteTransaction tx = dataBroker.newWriteOnlyTransaction(); - - tx.merge(LogicalDatastoreType.CONFIGURATION, path, - version); - tx.submit().checkedGet(); - } catch (Exception e) { - log.error( - "Caught exception trying to save entry to MD-SAL", - e); - } - -} - -@Override -public Future> vfLicenseModelUpdate(VfLicenseModelUpdateInput input) { - final String SVC_OPERATION = "vf-license-model-update"; - - Properties parms = new Properties(); - - log.info( SVC_OPERATION +" called." ); - - if(input == null ) { - log.debug("exiting " +SVC_OPERATION+ " because of invalid input"); - return null; - } - - VfLicenseModelUpdateInputBuilder inputBuilder = new VfLicenseModelUpdateInputBuilder(input); - input = inputBuilder.build(); - - String errorMessage = "Success"; - String errorCode = "200"; - - // If this artifact already exists, reject this update - if (artifactVersionExists(input.getArtifactName(), input.getArtifactVersion())) { - errorCode = "409"; - errorMessage = "Artifact version already exists"; - } else { - // Translate input object into SLI-consumable properties - log.info("Adding INPUT data for "+SVC_OPERATION+" input: " + input); - AsdcApiUtil.toProperties(parms, input); - - - // Call directed graph - - Properties respProps = null; - - - AsdcApiSliClient sliClient = new AsdcApiSliClient(); - try - { - if (sliClient.hasGraph("ASDC-API", SVC_OPERATION , null, "sync")) - { - - try - { - respProps = sliClient.execute("ASDC-API", SVC_OPERATION, null, "sync", parms); - } - catch (Exception e) - { - log.error("Caught exception executing service logic for "+ SVC_OPERATION, e); - } - } else { - errorMessage = "No service logic active for ASDC-API: '" + SVC_OPERATION + "'"; - errorCode = "503"; - } - } - catch (Exception e) - { - errorCode = "500"; - errorMessage = e.getMessage(); - log.error("Caught exception looking for service logic", e); - } - - - if (respProps != null) - { - errorCode = respProps.getProperty("error-code"); - errorMessage = respProps.getProperty("error-message", ""); - } - } - - - if ("200".equals(errorCode)) { - log.info("ASDC update succeeded"); - - // Update config tree - applyVfLicenseModelUpdate(input); - addArtifactVersion(input.getArtifactName(), input.getArtifactVersion()); - - } else { - log.info("ASDC update failed ("+errorCode+" : "+errorMessage); - } - - // Send response - VfLicenseModelUpdateOutputBuilder respBuilder = new VfLicenseModelUpdateOutputBuilder(); - respBuilder.setAsdcApiResponseCode(errorCode); - if (errorMessage != null && errorMessage.length() > 0) { - respBuilder.setAsdcApiResponseText(errorMessage); - } - - RpcResult rpcResult; - - - rpcResult = RpcResultBuilder. status(true).withResult(respBuilder.build()).build(); - - - - return Futures.immediateFuture(rpcResult); -} - - -} diff --git a/asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiSliClient.java b/asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiSliClient.java deleted file mode 100644 index 2f3a783ba..000000000 --- a/asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiSliClient.java +++ /dev/null @@ -1,111 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP 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.openecomp.sdnc.asdcapi; - -import java.util.Properties; - -import org.onap.ccsdk.sli.core.sli.SvcLogicException; -import org.onap.ccsdk.sli.core.sli.provider.SvcLogicService; -import org.osgi.framework.BundleContext; -import org.osgi.framework.FrameworkUtil; -import org.osgi.framework.ServiceReference; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class AsdcApiSliClient { - - private static final Logger LOG = LoggerFactory - .getLogger(AsdcApiSliClient.class); - - private SvcLogicService svcLogic = null; - - public AsdcApiSliClient() - { - BundleContext bctx = FrameworkUtil.getBundle(SvcLogicService.class).getBundleContext(); - - // 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 - { - return(svcLogic.hasGraph(module, rpc, version, mode)); - } - - - public Properties execute(String module, String rpc, String version, String mode, Properties parms) - throws SvcLogicException { - - - if (LOG.isDebugEnabled()) - { - LOG.debug("Parameters passed to SLI"); - - for (Object key : parms.keySet()) { - String parmName = (String) key; - String parmValue = parms.getProperty(parmName); - - LOG.debug(parmName+" = "+parmValue); - - } - } - - Properties respProps = svcLogic.execute(module, rpc, version, mode, parms); - - if (LOG.isDebugEnabled()) - { - LOG.debug("Parameters returned by SLI"); - - for (Object key : respProps.keySet()) { - String parmName = (String) key; - String parmValue = respProps.getProperty(parmName); - - LOG.debug(parmName+" = "+parmValue); - - } - } - - if ("failure".equalsIgnoreCase(respProps.getProperty("SvcLogic.status"))) { - - if (!respProps.containsKey("error-code")) { - respProps.setProperty("error-code", "500"); - } - } else { - if (!respProps.containsKey("error-code")) { - respProps.setProperty("error-code", "200"); - } - } - - - return (respProps); - } - -} diff --git a/asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiUtil.java b/asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiUtil.java deleted file mode 100644 index 240c939b4..000000000 --- a/asdcApi/provider/src/main/java/org/openecomp/sdnc/asdcapi/AsdcApiUtil.java +++ /dev/null @@ -1,48 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * openECOMP : SDN-C - * ================================================================================ - * Copyright (C) 2017 ONAP 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.openecomp.sdnc.asdcapi; - -import org.onap.ccsdk.sli.core.sli.provider.MdsalHelper; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.ArtifactsBuilder; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.VfLicenseModelUpdateInput; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.VfLicenseModelUpdateInputBuilder; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.VfLicenseModelVersionsBuilder; -import org.opendaylight.yang.gen.v1.org.openecomp.sdnc.rev170201.vf.license.model.versions.VfLicenseModelVersionBuilder; - -public class AsdcApiUtil extends MdsalHelper { - - static { - - // Input objects - - VfLicenseModelUpdateInput i13 = new VfLicenseModelUpdateInputBuilder().build(); - - - // Other builders - ArtifactsBuilder b1 = new ArtifactsBuilder(); - - VfLicenseModelVersionsBuilder b14a = new VfLicenseModelVersionsBuilder(); - VfLicenseModelVersionBuilder b26a = new VfLicenseModelVersionBuilder(); - - - } -} diff --git a/asdcApi/provider/src/main/resources/initial/asdcApi-provider.xml b/asdcApi/provider/src/main/resources/initial/asdcApi-provider.xml index ab2da905f..53f5a11d0 100644 --- a/asdcApi/provider/src/main/resources/initial/asdcApi-provider.xml +++ b/asdcApi/provider/src/main/resources/initial/asdcApi-provider.xml @@ -9,9 +9,7 @@ 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. @@ -29,7 +27,7 @@ - + prefix:asdcApi-provider-impl asdcApi-provider-impl @@ -66,7 +64,7 @@ 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. --> - org:openecomp:sdnc:asdcapi:provider:impl?module=asdcApi-provider-impl&revision=2014-05-23 + org:onap:ccsdk:sli:northbound:asdcapi:provider:impl?module=asdcApi-provider-impl&revision=2014-05-23 diff --git a/asdcApi/provider/src/main/yang/asdcApi-provider-impl.yang b/asdcApi/provider/src/main/yang/asdcApi-provider-impl.yang index 94ee88368..7a1876cc1 100755 --- a/asdcApi/provider/src/main/yang/asdcApi-provider-impl.yang +++ b/asdcApi/provider/src/main/yang/asdcApi-provider-impl.yang @@ -1,7 +1,7 @@ module asdcApi-provider-impl { yang-version 1; - namespace "org:openecomp:sdnc:asdcapi:provider:impl"; + namespace "org:onap:ccsdk:sli:northbound:asdcapi:provider:impl"; prefix "asdcApi-provider-impl"; import config { prefix config; revision-date 2013-04-05; } -- cgit 1.2.3-korg From 90adbb654c878bfc9e1ba61c75feb3cba8280733 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 20 Dec 2018 14:29:35 -0500 Subject: Code changes to sli/northbound for ODL Fluorine Code changes needed to support port to ODL Fluorine. Change-Id: If898ed120a3d03773db815f797f1eee633ca77e3 Issue-ID: CCSDK-870 Signed-off-by: Timoney, Dan (dt5972) --- artifacts/pom.xml | 4 +- asdcApi/features/ccsdk-asdcApi/pom.xml | 26 +------ asdcApi/features/features-asdcApi/pom.xml | 4 +- asdcApi/features/pom.xml | 4 +- asdcApi/installer/pom.xml | 4 +- asdcApi/model/pom.xml | 8 +-- asdcApi/model/src/main/yang/ASDC-API.yang | 2 +- asdcApi/pom.xml | 4 +- asdcApi/provider/pom.xml | 20 ++++-- .../sli/northbound/asdcapi/AsdcApiProvider.java | 10 +-- dataChange/features/ccsdk-dataChange/pom.xml | 25 +------ dataChange/features/features-dataChange/pom.xml | 4 +- dataChange/features/pom.xml | 4 +- dataChange/installer/pom.xml | 4 +- dataChange/model/pom.xml | 8 +-- dataChange/pom.xml | 4 +- dataChange/provider/pom.xml | 20 ++++-- .../ccsdk/sli/northbound/DataChangeProvider.java | 4 +- .../sdnc/northbound/dataChange/TestDataChange.java | 2 +- dmaap-listener/pom.xml | 4 +- features/ccsdk-sli-northbound-all/pom.xml | 25 +------ features/features-sli-northbound/pom.xml | 4 +- features/installer/pom.xml | 4 +- features/pom.xml | 4 +- lcm/features/ccsdk-lcm/pom.xml | 27 +------- lcm/features/features-lcm/pom.xml | 4 +- lcm/features/pom.xml | 4 +- lcm/installer/pom.xml | 4 +- lcm/model/pom.xml | 8 +-- lcm/pom.xml | 4 +- lcm/provider/pom.xml | 37 +++++----- .../org/onap/ccsdk/sli/northbound/LcmProvider.java | 81 +++++++++++----------- pom.xml | 6 +- ueb-listener/pom.xml | 4 +- version.properties | 2 +- 35 files changed, 159 insertions(+), 224 deletions(-) (limited to 'asdcApi/model/src/main/yang') diff --git a/artifacts/pom.xml b/artifacts/pom.xml index a89e19310..d15621f98 100755 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.sli.northbound sli-northbound-artifacts - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: sli-northbound-artifacts @@ -17,7 +17,7 @@ org.onap.ccsdk.parent parent - 1.2.0 + 1.2.1-SNAPSHOT diff --git a/asdcApi/features/ccsdk-asdcApi/pom.xml b/asdcApi/features/ccsdk-asdcApi/pom.xml index e538aab22..d492848f0 100644 --- a/asdcApi/features/ccsdk-asdcApi/pom.xml +++ b/asdcApi/features/ccsdk-asdcApi/pom.xml @@ -5,43 +5,21 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-asdcApi - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} - ${project.version} - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - - org.onap.ccsdk.sli.core diff --git a/asdcApi/features/features-asdcApi/pom.xml b/asdcApi/features/features-asdcApi/pom.xml index 48bff872d..312c7b71a 100644 --- a/asdcApi/features/features-asdcApi/pom.xml +++ b/asdcApi/features/features-asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-asdcApi - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/features/pom.xml b/asdcApi/features/pom.xml index a63f2ee5d..260878a2c 100755 --- a/asdcApi/features/pom.xml +++ b/asdcApi/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-features - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/installer/pom.xml b/asdcApi/installer/pom.xml index f4d1552d4..f17b7a1f7 100755 --- a/asdcApi/installer/pom.xml +++ b/asdcApi/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-installer - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} diff --git a/asdcApi/model/pom.xml b/asdcApi/model/pom.xml index 944ca8c9b..61384fd9b 100755 --- a/asdcApi/model/pom.xml +++ b/asdcApi/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-model - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} @@ -24,11 +24,11 @@ org.opendaylight.mdsal.model - ietf-inet-types + ietf-inet-types-2013-07-15 org.opendaylight.mdsal.model - ietf-yang-types + ietf-yang-types-20130715 diff --git a/asdcApi/model/src/main/yang/ASDC-API.yang b/asdcApi/model/src/main/yang/ASDC-API.yang index 00ef4522a..12cfb9a56 100755 --- a/asdcApi/model/src/main/yang/ASDC-API.yang +++ b/asdcApi/model/src/main/yang/ASDC-API.yang @@ -13,7 +13,7 @@ module ASDC-API { import ietf-inet-types { prefix inet; - revision-date "2010-09-24"; + revision-date "2013-07-15"; } organization diff --git a/asdcApi/pom.xml b/asdcApi/pom.xml index f37b06974..c724d452a 100755 --- a/asdcApi/pom.xml +++ b/asdcApi/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: asdcApi diff --git a/asdcApi/provider/pom.xml b/asdcApi/provider/pom.xml index 84ac3313e..9d41cdca8 100755 --- a/asdcApi/provider/pom.xml +++ b/asdcApi/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound asdcApi-provider - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: asdcApi :: ${project.artifactId} @@ -20,16 +20,24 @@ ${project.version} + + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + + + org.onap.ccsdk.sli.northbound asdcApi-model ${project.version} - - org.opendaylight.controller - sal-binding-config - org.opendaylight.controller diff --git a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java index 27280d2d3..1a79f8c41 100644 --- a/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java +++ b/asdcApi/provider/src/main/java/org/onap/ccsdk/sli/northbound/asdcapi/AsdcApiProvider.java @@ -25,7 +25,6 @@ import java.util.Properties; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import java.util.concurrent.Future; import org.opendaylight.controller.md.sal.binding.api.DataBroker; import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; @@ -59,6 +58,7 @@ import org.slf4j.LoggerFactory; import com.google.common.base.Optional; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; /** * Defines a base implementation for your provider. This class extends from a helper class @@ -203,7 +203,7 @@ public class AsdcApiProvider implements AutoCloseable, ASDCAPIService { InstanceIdentifier.InstanceIdentifierBuilder aIdBuilder = InstanceIdentifier . builder(Artifacts.class) - .child(Artifact.class, artifact.getKey()); + .child(Artifact.class, artifact.key()); InstanceIdentifier path = aIdBuilder.build(); @@ -238,7 +238,7 @@ public class AsdcApiProvider implements AutoCloseable, ASDCAPIService { InstanceIdentifier.InstanceIdentifierBuilder versionIdBuilder = InstanceIdentifier . builder(VfLicenseModelVersions.class) - .child(VfLicenseModelVersion.class, version.getKey()); + .child(VfLicenseModelVersion.class, version.key()); InstanceIdentifier path = versionIdBuilder.build(); @@ -264,7 +264,7 @@ public class AsdcApiProvider implements AutoCloseable, ASDCAPIService { VfLicenseModelVersion version = vBuilder.build(); InstanceIdentifier.InstanceIdentifierBuilder versionIdBuilder = InstanceIdentifier . builder(VfLicenseModelVersions.class) - .child(VfLicenseModelVersion.class, version.getKey()); + .child(VfLicenseModelVersion.class, version.key()); InstanceIdentifier path = versionIdBuilder.build(); @@ -282,7 +282,7 @@ public class AsdcApiProvider implements AutoCloseable, ASDCAPIService { } @Override -public Future> vfLicenseModelUpdate(VfLicenseModelUpdateInput input) { +public ListenableFuture> vfLicenseModelUpdate(VfLicenseModelUpdateInput input) { final String svcOperation = "vf-license-model-update"; Properties parms = new Properties(); diff --git a/dataChange/features/ccsdk-dataChange/pom.xml b/dataChange/features/ccsdk-dataChange/pom.xml index a18d2acf3..16383e8c0 100644 --- a/dataChange/features/ccsdk-dataChange/pom.xml +++ b/dataChange/features/ccsdk-dataChange/pom.xml @@ -5,42 +5,21 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-dataChange - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} - ${project.version} - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - diff --git a/dataChange/features/features-dataChange/pom.xml b/dataChange/features/features-dataChange/pom.xml index 792475095..66264cd23 100644 --- a/dataChange/features/features-dataChange/pom.xml +++ b/dataChange/features/features-dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-dataChange - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/features/pom.xml b/dataChange/features/pom.xml index 99b8b861f..02e257f89 100755 --- a/dataChange/features/pom.xml +++ b/dataChange/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-features - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/installer/pom.xml b/dataChange/installer/pom.xml index 83aaec0b1..d2d9b1547 100755 --- a/dataChange/installer/pom.xml +++ b/dataChange/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-installer - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange :: ${project.artifactId} diff --git a/dataChange/model/pom.xml b/dataChange/model/pom.xml index 5d2ce7d1e..aa987302e 100755 --- a/dataChange/model/pom.xml +++ b/dataChange/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-model - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} @@ -23,11 +23,11 @@ org.opendaylight.mdsal.model - ietf-inet-types + ietf-inet-types-2013-07-15 org.opendaylight.mdsal.model - ietf-yang-types + ietf-yang-types-20130715 diff --git a/dataChange/pom.xml b/dataChange/pom.xml index 824cd58a2..b6418f4c2 100755 --- a/dataChange/pom.xml +++ b/dataChange/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: dataChange diff --git a/dataChange/provider/pom.xml b/dataChange/provider/pom.xml index 09b7741d9..dd08e3eae 100755 --- a/dataChange/provider/pom.xml +++ b/dataChange/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dataChange-provider - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: dataChange :: ${project.artifactId} @@ -19,6 +19,18 @@ ${project.version} + + + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + + @@ -26,10 +38,6 @@ dataChange-model ${project.version} - - org.opendaylight.controller - sal-binding-config - org.opendaylight.controller diff --git a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java index f272dbbc1..3301ca8e0 100644 --- a/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java +++ b/dataChange/provider/src/main/java/org/onap/ccsdk/sli/northbound/DataChangeProvider.java @@ -25,7 +25,6 @@ package org.onap.ccsdk.sli.northbound; import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import java.util.concurrent.Future; import org.onap.ccsdk.sli.core.sli.provider.MdsalHelper; import org.opendaylight.controller.md.sal.binding.api.DataBroker; @@ -43,6 +42,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; /** * Defines a base implementation for your provider. This class extends from a helper class @@ -98,7 +98,7 @@ public class DataChangeProvider implements AutoCloseable, DataChangeService { } @Override - public Future> dataChangeNotification( + public ListenableFuture> dataChangeNotification( DataChangeNotificationInput input) { final String svcOperation = "data-change-notification"; diff --git a/dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/TestDataChange.java b/dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/TestDataChange.java index 7855375a3..f9c39b703 100644 --- a/dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/TestDataChange.java +++ b/dataChange/provider/src/test/java/org/onap/sdnc/northbound/dataChange/TestDataChange.java @@ -19,7 +19,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.sdnc.northbound; +package org.onap.sdnc.northbound.dataChange; import org.junit.Before; import org.junit.Test; diff --git a/dmaap-listener/pom.xml b/dmaap-listener/pom.xml index 86c7d54de..07c80d06f 100755 --- a/dmaap-listener/pom.xml +++ b/dmaap-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound dmaap-listener - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT jar ccsdk-sli-northbound :: dmaap-listener diff --git a/features/ccsdk-sli-northbound-all/pom.xml b/features/ccsdk-sli-northbound-all/pom.xml index 181621b92..f4d233827 100644 --- a/features/ccsdk-sli-northbound-all/pom.xml +++ b/features/ccsdk-sli-northbound-all/pom.xml @@ -5,41 +5,20 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-sli-northbound-all - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} - ${project.version} - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - ${project.groupId} diff --git a/features/features-sli-northbound/pom.xml b/features/features-sli-northbound/pom.xml index 60f8d735f..5d4433514 100644 --- a/features/features-sli-northbound/pom.xml +++ b/features/features-sli-northbound/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-sli-northbound - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 37e9a269e..644ca1c76 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-features-installer - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: features :: ${project.artifactId} diff --git a/features/pom.xml b/features/pom.xml index 2744c5cd3..f96883608 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound slinorthbound-feature-aggregator - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: features diff --git a/lcm/features/ccsdk-lcm/pom.xml b/lcm/features/ccsdk-lcm/pom.xml index 6138a3646..67fadb15d 100644 --- a/lcm/features/ccsdk-lcm/pom.xml +++ b/lcm/features/ccsdk-lcm/pom.xml @@ -5,42 +5,21 @@ org.onap.ccsdk.parent single-feature-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound ccsdk-lcm - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} - ${project.version} - - - - - - org.opendaylight.mdsal.model - mdsal-model-artifacts - ${odl.mdsal.model.version} - pom - import - - - org.opendaylight.controller - mdsal-artifacts - ${odl.mdsal.version} - pom - import - - - - + diff --git a/lcm/features/features-lcm/pom.xml b/lcm/features/features-lcm/pom.xml index 08e4fa8af..571b8e0a5 100644 --- a/lcm/features/features-lcm/pom.xml +++ b/lcm/features/features-lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent feature-repo-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound features-lcm - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT feature ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/features/pom.xml b/lcm/features/pom.xml index 27fdcefab..afde4e171 100755 --- a/lcm/features/pom.xml +++ b/lcm/features/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-features - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/installer/pom.xml b/lcm/installer/pom.xml index e51a95e37..10e7bdd30 100755 --- a/lcm/installer/pom.xml +++ b/lcm/installer/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-installer - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm :: ${project.artifactId} diff --git a/lcm/model/pom.xml b/lcm/model/pom.xml index 090ed6490..38416fe25 100755 --- a/lcm/model/pom.xml +++ b/lcm/model/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-model - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} @@ -24,11 +24,11 @@ org.opendaylight.mdsal.model - ietf-inet-types + ietf-inet-types-2013-07-15 org.opendaylight.mdsal.model - ietf-yang-types + ietf-yang-types-20130715 diff --git a/lcm/pom.xml b/lcm/pom.xml index 54f1ba6b7..4e9f1033c 100755 --- a/lcm/pom.xml +++ b/lcm/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT pom ccsdk-sli-northbound :: lcm diff --git a/lcm/provider/pom.xml b/lcm/provider/pom.xml index 188104038..a6dd8637b 100755 --- a/lcm/provider/pom.xml +++ b/lcm/provider/pom.xml @@ -5,13 +5,13 @@ org.onap.ccsdk.parent binding-parent - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound lcm-provider - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT bundle ccsdk-sli-northbound :: lcm :: ${project.artifactId} @@ -20,16 +20,17 @@ ${project.version} + - - - org.opendaylight.controller - mdsal-artifacts - 1.6.1 - pom - import - - + + + org.onap.ccsdk.sli.core + sli-core-artifacts + ${ccsdk.sli.core.version} + pom + import + + @@ -38,16 +39,15 @@ lcm-model ${project.version} - - org.opendaylight.controller - sal-binding-config - org.opendaylight.controller sal-binding-api - + + org.opendaylight.controller + sal-binding-broker-impl + org.opendaylight.controller sal-common-util @@ -95,6 +95,11 @@ 10.12.1.1 test + + org.osgi + org.osgi.core + test + diff --git a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java index 570e89ec3..d1f3ba53f 100644 --- a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java +++ b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java @@ -43,6 +43,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; import org.onap.ccsdk.sli.northbound.LcmResponseCode.*; @@ -131,7 +132,7 @@ public class LcmProvider implements AutoCloseable, LCMService { @Override - public Future> checkLock(CheckLockInput input) { + public ListenableFuture> checkLock(CheckLockInput input) { CheckLockInputBuilder iBuilder = new CheckLockInputBuilder(input); CheckLockOutputBuilder oBuilder = new CheckLockOutputBuilder(); @@ -153,7 +154,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> reboot(RebootInput input) { + public ListenableFuture> reboot(RebootInput input) { RebootInputBuilder iBuilder = new RebootInputBuilder(input); RebootOutputBuilder oBuilder = new RebootOutputBuilder(); @@ -174,7 +175,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> upgradeBackup(UpgradeBackupInput input) { + public ListenableFuture> upgradeBackup(UpgradeBackupInput input) { UpgradeBackupInputBuilder iBuilder = new UpgradeBackupInputBuilder(input); UpgradeBackupOutputBuilder oBuilder = new UpgradeBackupOutputBuilder(); @@ -196,7 +197,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> rollback(RollbackInput input) { + public ListenableFuture> rollback(RollbackInput input) { RollbackInputBuilder iBuilder = new RollbackInputBuilder(input); RollbackOutputBuilder oBuilder = new RollbackOutputBuilder(); @@ -217,7 +218,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> sync(SyncInput input) { + public ListenableFuture> sync(SyncInput input) { SyncInputBuilder iBuilder = new SyncInputBuilder(input); SyncOutputBuilder oBuilder = new SyncOutputBuilder(); @@ -238,7 +239,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> query(QueryInput input) { + public ListenableFuture> query(QueryInput input) { QueryInputBuilder iBuilder = new QueryInputBuilder(input); QueryOutputBuilder oBuilder = new QueryOutputBuilder(); @@ -259,7 +260,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configExport(ConfigExportInput input) { + public ListenableFuture> configExport(ConfigExportInput input) { ConfigExportInputBuilder iBuilder = new ConfigExportInputBuilder(input); ConfigExportOutputBuilder oBuilder = new ConfigExportOutputBuilder(); @@ -280,7 +281,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> stopApplication(StopApplicationInput input) { + public ListenableFuture> stopApplication(StopApplicationInput input) { StopApplicationInputBuilder iBuilder = new StopApplicationInputBuilder(input); StopApplicationOutputBuilder oBuilder = new StopApplicationOutputBuilder(); @@ -301,7 +302,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> softwareUpload(SoftwareUploadInput input) { + public ListenableFuture> softwareUpload(SoftwareUploadInput input) { SoftwareUploadInputBuilder iBuilder = new SoftwareUploadInputBuilder(input); SoftwareUploadOutputBuilder oBuilder = new SoftwareUploadOutputBuilder(); @@ -322,7 +323,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> resumeTraffic(ResumeTrafficInput input) { + public ListenableFuture> resumeTraffic(ResumeTrafficInput input) { ResumeTrafficInputBuilder iBuilder = new ResumeTrafficInputBuilder(input); ResumeTrafficOutputBuilder oBuilder = new ResumeTrafficOutputBuilder(); @@ -343,7 +344,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> distributeTraffic(DistributeTrafficInput input) { + public ListenableFuture> distributeTraffic(DistributeTrafficInput input) { DistributeTrafficInputBuilder iBuilder = new DistributeTrafficInputBuilder(input); DistributeTrafficOutputBuilder oBuilder = new DistributeTrafficOutputBuilder(); @@ -364,7 +365,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configure(ConfigureInput input) { + public ListenableFuture> configure(ConfigureInput input) { ConfigureInputBuilder iBuilder = new ConfigureInputBuilder(input); ConfigureOutputBuilder oBuilder = new ConfigureOutputBuilder(); @@ -385,7 +386,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> actionStatus(ActionStatusInput input) { + public ListenableFuture> actionStatus(ActionStatusInput input) { ActionStatusInputBuilder iBuilder = new ActionStatusInputBuilder(input); ActionStatusOutputBuilder oBuilder = new ActionStatusOutputBuilder(); @@ -406,7 +407,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> upgradePreCheck(UpgradePreCheckInput input) { + public ListenableFuture> upgradePreCheck(UpgradePreCheckInput input) { UpgradePreCheckInputBuilder iBuilder = new UpgradePreCheckInputBuilder(input); UpgradePreCheckOutputBuilder oBuilder = new UpgradePreCheckOutputBuilder(); @@ -427,7 +428,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> liveUpgrade(LiveUpgradeInput input) { + public ListenableFuture> liveUpgrade(LiveUpgradeInput input) { LiveUpgradeInputBuilder iBuilder = new LiveUpgradeInputBuilder(input); LiveUpgradeOutputBuilder oBuilder = new LiveUpgradeOutputBuilder(); @@ -448,7 +449,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configModify(ConfigModifyInput input) { + public ListenableFuture> configModify(ConfigModifyInput input) { ConfigModifyInputBuilder iBuilder = new ConfigModifyInputBuilder(input); ConfigModifyOutputBuilder oBuilder = new ConfigModifyOutputBuilder(); @@ -469,7 +470,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> restart(RestartInput input) { + public ListenableFuture> restart(RestartInput input) { RestartInputBuilder iBuilder = new RestartInputBuilder(input); RestartOutputBuilder oBuilder = new RestartOutputBuilder(); @@ -490,7 +491,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> healthCheck(HealthCheckInput input) { + public ListenableFuture> healthCheck(HealthCheckInput input) { HealthCheckInputBuilder iBuilder = new HealthCheckInputBuilder(input); HealthCheckOutputBuilder oBuilder = new HealthCheckOutputBuilder(); @@ -511,7 +512,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> lock(LockInput input) { + public ListenableFuture> lock(LockInput input) { LockInputBuilder iBuilder = new LockInputBuilder(input); LockOutputBuilder oBuilder = new LockOutputBuilder(); @@ -532,7 +533,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> terminate(TerminateInput input) { + public ListenableFuture> terminate(TerminateInput input) { TerminateInputBuilder iBuilder = new TerminateInputBuilder(input); TerminateOutputBuilder oBuilder = new TerminateOutputBuilder(); @@ -553,7 +554,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> attachVolume(AttachVolumeInput input) { + public ListenableFuture> attachVolume(AttachVolumeInput input) { AttachVolumeInputBuilder iBuilder = new AttachVolumeInputBuilder(input); AttachVolumeOutputBuilder oBuilder = new AttachVolumeOutputBuilder(); @@ -574,7 +575,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> migrate(MigrateInput input) { + public ListenableFuture> migrate(MigrateInput input) { MigrateInputBuilder iBuilder = new MigrateInputBuilder(input); MigrateOutputBuilder oBuilder = new MigrateOutputBuilder(); @@ -595,7 +596,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> quiesceTraffic(QuiesceTrafficInput input) { + public ListenableFuture> quiesceTraffic(QuiesceTrafficInput input) { QuiesceTrafficInputBuilder iBuilder = new QuiesceTrafficInputBuilder(input); QuiesceTrafficOutputBuilder oBuilder = new QuiesceTrafficOutputBuilder(); @@ -616,7 +617,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configRestore(ConfigRestoreInput input) { + public ListenableFuture> configRestore(ConfigRestoreInput input) { ConfigRestoreInputBuilder iBuilder = new ConfigRestoreInputBuilder(input); ConfigRestoreOutputBuilder oBuilder = new ConfigRestoreOutputBuilder(); @@ -637,7 +638,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> upgradeBackout(UpgradeBackoutInput input) { + public ListenableFuture> upgradeBackout(UpgradeBackoutInput input) { UpgradeBackoutInputBuilder iBuilder = new UpgradeBackoutInputBuilder(input); UpgradeBackoutOutputBuilder oBuilder = new UpgradeBackoutOutputBuilder(); @@ -658,7 +659,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> evacuate(EvacuateInput input) { + public ListenableFuture> evacuate(EvacuateInput input) { EvacuateInputBuilder iBuilder = new EvacuateInputBuilder(input); EvacuateOutputBuilder oBuilder = new EvacuateOutputBuilder(); @@ -679,7 +680,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> unlock(UnlockInput input) { + public ListenableFuture> unlock(UnlockInput input) { UnlockInputBuilder iBuilder = new UnlockInputBuilder(input); UnlockOutputBuilder oBuilder = new UnlockOutputBuilder(); @@ -700,7 +701,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configBackupDelete(ConfigBackupDeleteInput input) { + public ListenableFuture> configBackupDelete(ConfigBackupDeleteInput input) { ConfigBackupDeleteInputBuilder iBuilder = new ConfigBackupDeleteInputBuilder(input); ConfigBackupDeleteOutputBuilder oBuilder = new ConfigBackupDeleteOutputBuilder(); @@ -721,7 +722,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> upgradeSoftware(UpgradeSoftwareInput input) { + public ListenableFuture> upgradeSoftware(UpgradeSoftwareInput input) { UpgradeSoftwareInputBuilder iBuilder = new UpgradeSoftwareInputBuilder(input); UpgradeSoftwareOutputBuilder oBuilder = new UpgradeSoftwareOutputBuilder(); @@ -742,7 +743,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> stop(StopInput input) { + public ListenableFuture> stop(StopInput input) { StopInputBuilder iBuilder = new StopInputBuilder(input); StopOutputBuilder oBuilder = new StopOutputBuilder(); @@ -763,7 +764,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> detachVolume(DetachVolumeInput input) { + public ListenableFuture> detachVolume(DetachVolumeInput input) { DetachVolumeInputBuilder iBuilder = new DetachVolumeInputBuilder(input); DetachVolumeOutputBuilder oBuilder = new DetachVolumeOutputBuilder(); @@ -784,7 +785,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configScaleOut(ConfigScaleOutInput input) { + public ListenableFuture> configScaleOut(ConfigScaleOutInput input) { ConfigScaleOutInputBuilder iBuilder = new ConfigScaleOutInputBuilder(input); ConfigScaleOutOutputBuilder oBuilder = new ConfigScaleOutOutputBuilder(); @@ -805,7 +806,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> upgradePostCheck(UpgradePostCheckInput input) { + public ListenableFuture> upgradePostCheck(UpgradePostCheckInput input) { UpgradePostCheckInputBuilder iBuilder = new UpgradePostCheckInputBuilder(input); UpgradePostCheckOutputBuilder oBuilder = new UpgradePostCheckOutputBuilder(); @@ -826,7 +827,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> test(TestInput input) { + public ListenableFuture> test(TestInput input) { TestInputBuilder iBuilder = new TestInputBuilder(input); TestOutputBuilder oBuilder = new TestOutputBuilder(); @@ -847,7 +848,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> startApplication(StartApplicationInput input) { + public ListenableFuture> startApplication(StartApplicationInput input) { StartApplicationInputBuilder iBuilder = new StartApplicationInputBuilder(input); StartApplicationOutputBuilder oBuilder = new StartApplicationOutputBuilder(); @@ -868,7 +869,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> configBackup(ConfigBackupInput input) { + public ListenableFuture> configBackup(ConfigBackupInput input) { ConfigBackupInputBuilder iBuilder = new ConfigBackupInputBuilder(input); ConfigBackupOutputBuilder oBuilder = new ConfigBackupOutputBuilder(); @@ -889,7 +890,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> rebuild(RebuildInput input) { + public ListenableFuture> rebuild(RebuildInput input) { RebuildInputBuilder iBuilder = new RebuildInputBuilder(input); RebuildOutputBuilder oBuilder = new RebuildOutputBuilder(); @@ -910,7 +911,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> audit(AuditInput input) { + public ListenableFuture> audit(AuditInput input) { AuditInputBuilder iBuilder = new AuditInputBuilder(input); AuditOutputBuilder oBuilder = new AuditOutputBuilder(); @@ -931,7 +932,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> start(StartInput input) { + public ListenableFuture> start(StartInput input) { StartInputBuilder iBuilder = new StartInputBuilder(input); StartOutputBuilder oBuilder = new StartOutputBuilder(); @@ -952,7 +953,7 @@ public class LcmProvider implements AutoCloseable, LCMService { } @Override - public Future> snapshot(SnapshotInput input) { + public ListenableFuture> snapshot(SnapshotInput input) { SnapshotInputBuilder iBuilder = new SnapshotInputBuilder(input); SnapshotOutputBuilder oBuilder = new SnapshotOutputBuilder(); diff --git a/pom.xml b/pom.xml index bc96e012c..e170498ad 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT 4.0.0 @@ -84,7 +84,6 @@ org.apache.maven.plugins maven-surefire-plugin - 2.17 false @@ -92,7 +91,6 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.7 true https://${onap.nexus.host} @@ -115,7 +113,7 @@ ONAP - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT diff --git a/ueb-listener/pom.xml b/ueb-listener/pom.xml index 43832db85..87a9dfe97 100755 --- a/ueb-listener/pom.xml +++ b/ueb-listener/pom.xml @@ -5,12 +5,12 @@ org.onap.ccsdk.parent odlparent-lite - 1.2.0 + 1.2.1-SNAPSHOT org.onap.ccsdk.sli.northbound ueb-listener - 0.4.0-SNAPSHOT + 0.4.1-SNAPSHOT jar ccsdk-sli-northbound :: ueb-listener diff --git a/version.properties b/version.properties index e1b84eea2..2a56aedac 100644 --- a/version.properties +++ b/version.properties @@ -5,7 +5,7 @@ release_name=0 sprint_number=4 -feature_revision=0 +feature_revision=1 base_version=${release_name}.${sprint_number}.${feature_revision} -- cgit 1.2.3-korg