aboutsummaryrefslogtreecommitdiffstats
path: root/vnfapi
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-04-21 17:36:30 -0400
committerDan Timoney <dtimoney@att.com>2017-04-24 12:19:33 -0400
commit60d5ee0c6d4cc32d6181c29ee55a67575669a0cd (patch)
treeb0e3b96732935e21058eedf05fd766be5c673f40 /vnfapi
parentc8a9ad49965b6152a0c7f3f4b7d1f7993d52f082 (diff)
[SDNC-5] Split listeners
Split dmaap-listener and ueb-listener to separate artifacts Change-Id: I7b1d5b15c8ef850ace75d4da451143ba4062b817 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'vnfapi')
-rw-r--r--vnfapi/features/src/main/resources/features.xml2
-rwxr-xr-xvnfapi/installer/pom.xml2
-rw-r--r--vnfapi/installer/src/assembly/assemble_installer_zip.xml3
-rw-r--r--vnfapi/installer/src/assembly/assemble_mvnrepo_zip.xml3
-rw-r--r--vnfapi/installer/src/main/resources/scripts/install-feature.sh2
-rwxr-xr-xvnfapi/model/src/main/yang/VNF-API.yang11
-rw-r--r--vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java2
-rw-r--r--vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java2
-rw-r--r--vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java2
-rw-r--r--vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VnfSdnUtil.java2
-rw-r--r--vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/vnfapiProvider.java42
-rw-r--r--vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml2
-rw-r--r--vnfapi/provider/src/test/java/org/openecomp/sdnc/vnfapi/TestPropertyList.java2
-rw-r--r--vnfapi/provider/src/test/resources/proplist.properties2
-rw-r--r--vnfapi/provider/src/test/resources/simplelogger.properties2
15 files changed, 61 insertions, 20 deletions
diff --git a/vnfapi/features/src/main/resources/features.xml b/vnfapi/features/src/main/resources/features.xml
index 2758a482..813459de 100644
--- a/vnfapi/features/src/main/resources/features.xml
+++ b/vnfapi/features/src/main/resources/features.xml
@@ -4,7 +4,7 @@
openECOMP : SDN-C
================================================================================
Copyright (C) 2017 AT&T Intellectual Property. All rights
- reserved.
+ reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/vnfapi/installer/pom.xml b/vnfapi/installer/pom.xml
index ee681132..88b38e93 100755
--- a/vnfapi/installer/pom.xml
+++ b/vnfapi/installer/pom.xml
@@ -60,7 +60,6 @@
<descriptors>
<descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
</descriptors>
- <appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
<execution>
@@ -75,7 +74,6 @@
<descriptors>
<descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
</descriptors>
- <appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
diff --git a/vnfapi/installer/src/assembly/assemble_installer_zip.xml b/vnfapi/installer/src/assembly/assemble_installer_zip.xml
index f8bf5a26..c7fb0c16 100644
--- a/vnfapi/installer/src/assembly/assemble_installer_zip.xml
+++ b/vnfapi/installer/src/assembly/assemble_installer_zip.xml
@@ -3,7 +3,7 @@
openECOMP : SDN-C
================================================================================
Copyright (C) 2017 AT&T Intellectual Property. All rights
- reserved.
+ reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -23,7 +23,6 @@
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <id>bin</id>
<formats>
<format>zip</format>
</formats>
diff --git a/vnfapi/installer/src/assembly/assemble_mvnrepo_zip.xml b/vnfapi/installer/src/assembly/assemble_mvnrepo_zip.xml
index c2b3ecc0..b37b3f19 100644
--- a/vnfapi/installer/src/assembly/assemble_mvnrepo_zip.xml
+++ b/vnfapi/installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -3,7 +3,7 @@
openECOMP : SDN-C
================================================================================
Copyright (C) 2017 AT&T Intellectual Property. All rights
- reserved.
+ reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -23,7 +23,6 @@
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <id>bin</id>
<formats>
<format>zip</format>
</formats>
diff --git a/vnfapi/installer/src/main/resources/scripts/install-feature.sh b/vnfapi/installer/src/main/resources/scripts/install-feature.sh
index 93236c5b..6e8620e1 100644
--- a/vnfapi/installer/src/main/resources/scripts/install-feature.sh
+++ b/vnfapi/installer/src/main/resources/scripts/install-feature.sh
@@ -5,7 +5,7 @@
# openECOMP : SDN-C
# ================================================================================
# Copyright (C) 2017 AT&T Intellectual Property. All rights
-# reserved.
+# reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/vnfapi/model/src/main/yang/VNF-API.yang b/vnfapi/model/src/main/yang/VNF-API.yang
index f61b3e78..83e3e4cd 100755
--- a/vnfapi/model/src/main/yang/VNF-API.yang
+++ b/vnfapi/model/src/main/yang/VNF-API.yang
@@ -122,6 +122,17 @@ module VNF-API {
leaf vnf-request-version {
type string;
}
+ leaf model-customization-uuid {
+ type string;
+ description "customized resource, i.e. vf-module, for use within a given service";
+ }
+ leaf use-preload {
+ type enumeration {
+ enum "Y";
+ enum "N";
+ }
+ description "orchestrate vf-module with full preload data or TOSCA lookup plus EIPAM automation";
+ }
leaf vnf-id {
type string;
description "vf-module-id";
diff --git a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java b/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java
index 56a1b186..4302a175 100644
--- a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java
+++ b/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModule.java
@@ -3,7 +3,7 @@
* openECOMP : SDN-C
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
+ * reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java b/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java
index 2df2bfa9..4b07aabe 100644
--- a/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java
+++ b/vnfapi/provider/src/main/java/org/opendaylight/yang/gen/v1/org/openecomp/sdnc/vnfapi/provider/impl/rev140523/VnfapiProviderModuleFactory.java
@@ -3,7 +3,7 @@
* openECOMP : SDN-C
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
+ * reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java
index e15a9864..e356baa9 100644
--- a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java
+++ b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VNFSDNSvcLogicServiceClient.java
@@ -3,7 +3,7 @@
* openECOMP : SDN-C
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
+ * reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VnfSdnUtil.java b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VnfSdnUtil.java
index 74359630..4a41aacd 100644
--- a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VnfSdnUtil.java
+++ b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/VnfSdnUtil.java
@@ -3,7 +3,7 @@
* openECOMP : SDN-C
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
+ * reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/vnfapiProvider.java b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/vnfapiProvider.java
index 0d31c071..92ba08d0 100644
--- a/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/vnfapiProvider.java
+++ b/vnfapi/provider/src/main/java/org/openecomp/sdnc/vnfapi/vnfapiProvider.java
@@ -3,7 +3,7 @@
* openECOMP : SDN-C
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
+ * reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -797,7 +797,37 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
}
}
}
+
}
+ private void DeleteVnfList (final VnfList entry, LogicalDatastoreType storeType) throws IllegalStateException {
+ // Each entry will be identifiable by a unique key, we have to create that identifier
+ InstanceIdentifier.InstanceIdentifierBuilder<VnfList> vnfListIdBuilder =
+ InstanceIdentifier.<Vnfs>builder(Vnfs.class)
+ .child(VnfList.class, entry.getKey());
+ InstanceIdentifier<VnfList> path = vnfListIdBuilder.toInstance();
+
+ int tries = 2;
+ while (true) {
+ try {
+ WriteTransaction tx = dataBroker.newWriteOnlyTransaction();
+ tx.delete(storeType, path);
+ tx.submit().checkedGet();
+ log.debug("DataStore delete succeeded");
+ break;
+ } catch (final TransactionCommitFailedException e) {
+ if (e instanceof OptimisticLockFailedException) {
+ if (--tries <= 0) {
+ log.debug("Got OptimisticLockFailedException on last try - failing ");
+ throw new IllegalStateException(e);
+ }
+ log.debug("Got OptimisticLockFailedException - trying again ");
+ } else {
+ log.debug("Delete DataStore failed");
+ throw new IllegalStateException(e);
+ }
+ }
+ }
+ }
//1610 vnf-instance
private void SaveVnfInstanceList (final VnfInstanceList entry, boolean merge, LogicalDatastoreType storeType) throws IllegalStateException {
@@ -1630,12 +1660,16 @@ public class vnfapiProvider implements AutoCloseable, VNFAPIService, DataChangeL
if (input.getSdncRequestHeader() != null && input.getSdncRequestHeader().getSvcAction() != null)
{
// Only update operational tree on Delete or Activate
- if (input.getSdncRequestHeader().getSvcAction().equals(SvcAction.Delete) ||
- input.getSdncRequestHeader().getSvcAction().equals(SvcAction.Activate))
- {
+ if (input.getSdncRequestHeader().getSvcAction().equals(SvcAction.Activate)) {
log.info("Updating OPERATIONAL tree.");
SaveVnfList (vnfListBuilder.build(), false, LogicalDatastoreType.OPERATIONAL);
}
+ else if (input.getSdncRequestHeader().getSvcAction().equals(SvcAction.Delete) ||
+ input.getSdncRequestHeader().getSvcAction().equals(SvcAction.Rollback)) {
+ log.info("Delete OPERATIONAL tree.");
+ DeleteVnfList (vnfListBuilder.build(), LogicalDatastoreType.CONFIGURATION);
+ DeleteVnfList (vnfListBuilder.build(), LogicalDatastoreType.OPERATIONAL);
+ }
}
VnfInformationBuilder vnfInformationBuilder = new VnfInformationBuilder();
vnfInformationBuilder.setVnfId(siid);
diff --git a/vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml b/vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml
index eebba0c4..01f156d3 100644
--- a/vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml
+++ b/vnfapi/provider/src/main/resources/initial/vnfapi-provider.xml
@@ -4,7 +4,7 @@
openECOMP : SDN-C
================================================================================
Copyright (C) 2017 AT&T Intellectual Property. All rights
- reserved.
+ reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/vnfapi/provider/src/test/java/org/openecomp/sdnc/vnfapi/TestPropertyList.java b/vnfapi/provider/src/test/java/org/openecomp/sdnc/vnfapi/TestPropertyList.java
index b131f834..320f30d3 100644
--- a/vnfapi/provider/src/test/java/org/openecomp/sdnc/vnfapi/TestPropertyList.java
+++ b/vnfapi/provider/src/test/java/org/openecomp/sdnc/vnfapi/TestPropertyList.java
@@ -3,7 +3,7 @@
* openECOMP : SDN-C
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
+ * reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/vnfapi/provider/src/test/resources/proplist.properties b/vnfapi/provider/src/test/resources/proplist.properties
index 203d5654..556de910 100644
--- a/vnfapi/provider/src/test/resources/proplist.properties
+++ b/vnfapi/provider/src/test/resources/proplist.properties
@@ -3,7 +3,7 @@
# openECOMP : SDN-C
# ================================================================================
# Copyright (C) 2017 AT&T Intellectual Property. All rights
-# reserved.
+# reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
diff --git a/vnfapi/provider/src/test/resources/simplelogger.properties b/vnfapi/provider/src/test/resources/simplelogger.properties
index 9b10afdb..96a105c0 100644
--- a/vnfapi/provider/src/test/resources/simplelogger.properties
+++ b/vnfapi/provider/src/test/resources/simplelogger.properties
@@ -3,7 +3,7 @@
# openECOMP : SDN-C
# ================================================================================
# Copyright (C) 2017 AT&T Intellectual Property. All rights
-# reserved.
+# reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.