aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormark.j.leonard <mark.j.leonard@gmail.com>2019-03-26 10:51:07 +0000
committermark.j.leonard <mark.j.leonard@gmail.com>2019-03-26 10:51:07 +0000
commit8a7d9a0d7782b9339810b02208620bdd2f0a12b2 (patch)
treee3cac78df7c662eee95ad17cf9a01d19158114ad
parent550216df935437b1380b6d4425fd422ea7c013f5 (diff)
Allow UUID definitions in the mappings JSON
Add support for reading the Widget invariant and version UUIDs from the TOSCA mappings JSON. In this commit the artifact-generator.properties is also read and used to provide default values. This step prevents any existing deployments (e.g. automated test integration) from failing. The redundant properties file will be deprecated in a future commit, only when the JSON configuration has been updated. Also remove two unused Java files to help with coverage stats. Change-Id: Idc82e28092a2b028214225c7974db411c9f8a173 Issue-ID: AAI-2284 Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/data/WidgetConfigurationUtil.java35
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/data/WidgetTypeConfig.java4
-rw-r--r--src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java30
-rw-r--r--src/test/java/org/onap/aai/babel/csar/fixture/ArtifactInfoBuilder.java81
-rw-r--r--src/test/java/org/onap/aai/babel/csar/fixture/TestArtifactInfoImpl.java123
-rw-r--r--src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java10
-rw-r--r--src/test/resources/artifact-generator.properties270
-rw-r--r--src/test/resources/tosca-mappings.json72
8 files changed, 95 insertions, 530 deletions
diff --git a/src/main/java/org/onap/aai/babel/xml/generator/data/WidgetConfigurationUtil.java b/src/main/java/org/onap/aai/babel/xml/generator/data/WidgetConfigurationUtil.java
index baecada..620f792 100644
--- a/src/main/java/org/onap/aai/babel/xml/generator/data/WidgetConfigurationUtil.java
+++ b/src/main/java/org/onap/aai/babel/xml/generator/data/WidgetConfigurationUtil.java
@@ -37,6 +37,9 @@ import org.onap.aai.babel.xml.generator.types.ModelType;
public class WidgetConfigurationUtil {
+ public static final String GENERATOR_AAI_CONFIGLPROP_NOT_FOUND =
+ "Cannot generate artifacts. Widget configuration not found for %s";
+
private static Properties config;
private static List<String> instanceGroups = Collections.emptyList();
private static Map<String, Resource> typeToResource = new HashMap<>();
@@ -49,10 +52,6 @@ public class WidgetConfigurationUtil {
throw new UnsupportedOperationException("This static class should not be instantiated!");
}
- public static Properties getConfig() {
- return config;
- }
-
public static void setConfig(Properties config) {
WidgetConfigurationUtil.config = config;
}
@@ -98,8 +97,14 @@ public class WidgetConfigurationUtil {
if (type.type == null || type.name == null) {
throw new IllegalArgumentException("Incomplete widget type specified: " + type);
}
- WidgetType widgetType = new WidgetType(type.type);
- Widget widget = new Widget(widgetType, type.name, type.deleteFlag);
+ if (type.modelInvariantId == null) {
+ type.modelInvariantId = WidgetConfigurationUtil.getModelInvariantId(type.name);
+ }
+ if (type.modelVersionId == null) {
+ type.modelVersionId = WidgetConfigurationUtil.getModelVersionId(type.name);
+ }
+ Widget widget = new Widget(new WidgetType(type.type), type.name, type.deleteFlag, //
+ type.modelInvariantId, type.modelVersionId);
typeToWidget.put(type.type, widget);
}
WidgetType.validateElements();
@@ -117,4 +122,22 @@ public class WidgetConfigurationUtil {
typeToResource.put(mapping.prefix, resource);
}
}
+
+ public static String getModelInvariantId(String name) {
+ String id = config.getProperty(ArtifactType.AAI.name() + ".model-invariant-id." + name);
+ if (id == null) {
+ throw new IllegalArgumentException(String.format(GENERATOR_AAI_CONFIGLPROP_NOT_FOUND,
+ ArtifactType.AAI.name() + ".model-invariant-id." + name));
+ }
+ return id;
+ }
+
+ public static String getModelVersionId(String name) {
+ String id = config.getProperty(ArtifactType.AAI.name() + ".model-version-id." + name);
+ if (id == null) {
+ throw new IllegalArgumentException(String.format(GENERATOR_AAI_CONFIGLPROP_NOT_FOUND,
+ ArtifactType.AAI.name() + ".model-version-id." + name));
+ }
+ return id;
+ }
}
diff --git a/src/main/java/org/onap/aai/babel/xml/generator/data/WidgetTypeConfig.java b/src/main/java/org/onap/aai/babel/xml/generator/data/WidgetTypeConfig.java
index 0d0fe6b..b52c7a5 100644
--- a/src/main/java/org/onap/aai/babel/xml/generator/data/WidgetTypeConfig.java
+++ b/src/main/java/org/onap/aai/babel/xml/generator/data/WidgetTypeConfig.java
@@ -22,7 +22,7 @@
package org.onap.aai.babel.xml.generator.data;
/**
- * Widget Type as configured in the TOSCA Mappings.
+ * Widget Type as configured in the TOSCA Mappings.
*
*/
public class WidgetTypeConfig {
@@ -30,5 +30,7 @@ public class WidgetTypeConfig {
String type;
String name;
boolean deleteFlag = false;
+ String modelInvariantId;
+ String modelVersionId;
}
diff --git a/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java b/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java
index 78a1e8a..ee04abc 100644
--- a/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java
+++ b/src/main/java/org/onap/aai/babel/xml/generator/model/Widget.java
@@ -24,29 +24,29 @@ package org.onap.aai.babel.xml.generator.model;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
-import java.util.Properties;
import java.util.Set;
import org.onap.aai.babel.xml.generator.XmlArtifactGenerationException;
-import org.onap.aai.babel.xml.generator.data.ArtifactType;
import org.onap.aai.babel.xml.generator.data.WidgetConfigurationUtil;
import org.onap.aai.babel.xml.generator.error.IllegalAccessException;
import org.onap.aai.babel.xml.generator.types.ModelType;
public class Widget extends Model {
- public static final String GENERATOR_AAI_CONFIGLPROP_NOT_FOUND =
- "Cannot generate artifacts. Widget configuration not found for %s";
-
private Set<String> keys = new HashSet<>();
protected String name;
protected WidgetType type;
protected boolean deleteFlag = false;
- public Widget(WidgetType widgetType, String name, boolean deleteFlag) {
+ private String modelInvariantId;
+ private String modelVersionId;
+
+ public Widget(WidgetType widgetType, String name, boolean deleteFlag, String modelInvariantId, String modelVersionId) {
type = widgetType;
this.name = name;
this.deleteFlag = deleteFlag;
+ this.modelInvariantId = modelInvariantId;
+ this.modelVersionId = modelVersionId;
}
/**
@@ -57,7 +57,7 @@ public class Widget extends Model {
* if there is no widget mapping defined for any of the VSERVER child types
*/
public Widget(Widget baseWidget) throws XmlArtifactGenerationException {
- this(baseWidget.getWidgetType(), baseWidget.getName(), baseWidget.getDeleteFlag());
+ this(baseWidget.getWidgetType(), baseWidget.getName(), baseWidget.getDeleteFlag(), baseWidget.getWidgetId(), baseWidget.getId());
if (this.hasWidgetType("VSERVER")) {
widgets.add(createWidget("FLAVOR"));
widgets.add(createWidget("IMAGE"));
@@ -97,13 +97,7 @@ public class Widget extends Model {
}
public String getId() {
- String id = WidgetConfigurationUtil.getConfig()
- .getProperty(ArtifactType.AAI.name() + ".model-version-id." + getName());
- if (id == null) {
- throw new IllegalArgumentException(String.format(GENERATOR_AAI_CONFIGLPROP_NOT_FOUND,
- ArtifactType.AAI.name() + ".model-version-id." + getName()));
- }
- return id;
+ return modelVersionId;
}
public ModelType getType() {
@@ -121,13 +115,7 @@ public class Widget extends Model {
*/
@Override
public String getWidgetId() {
- Properties properties = WidgetConfigurationUtil.getConfig();
- String id = properties.getProperty(ArtifactType.AAI.name() + ".model-invariant-id." + getName());
- if (id == null) {
- throw new IllegalArgumentException(String.format(GENERATOR_AAI_CONFIGLPROP_NOT_FOUND,
- ArtifactType.AAI.name() + ".model-invariant-id." + getName()));
- }
- return id;
+ return modelInvariantId;
}
@Override
diff --git a/src/test/java/org/onap/aai/babel/csar/fixture/ArtifactInfoBuilder.java b/src/test/java/org/onap/aai/babel/csar/fixture/ArtifactInfoBuilder.java
deleted file mode 100644
index cb70677..0000000
--- a/src/test/java/org/onap/aai/babel/csar/fixture/ArtifactInfoBuilder.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * ============LICENSE_START=======================================================
- * org.onap.aai
- * ================================================================================
- * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017-2018 European Software Marketing Ltd.
- * ================================================================================
- * 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.aai.babel.csar.fixture;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.onap.sdc.api.notification.IArtifactInfo;
-
-/**
- * This class builds an instance of IArtifactInfo for test purposes.
- */
-public class ArtifactInfoBuilder {
-
- /**
- * Builds an implementation of IArtifactInfo for test purposes.
- * <p/>
- *
- * @param type
- * type of artifact
- * @param name
- * name of artifact
- * @param description
- * description of artifact
- * @param version
- * version of artifact
- * @return IArtifactInfo implementation of IArtifactInfo from given parameters for test purposes
- */
- public static IArtifactInfo build(final String type, final String name, final String description,
- final String version) {
- IArtifactInfo artifact = new TestArtifactInfoImpl();
-
- ((TestArtifactInfoImpl) artifact).setArtifactType(type);
- ((TestArtifactInfoImpl) artifact).setArtifactName(name);
- ((TestArtifactInfoImpl) artifact).setArtifactDescription(description);
- ((TestArtifactInfoImpl) artifact).setArtifactVersion(version);
-
- return artifact;
- }
-
- /**
- * This method is responsible for building a collection of artifacts from a given set of info.
- * <p/>
- * The info supplied is a two dimensional array with each element of the first dimension representing a single
- * artifact and each element of the second dimension represents a property of the artifact.
- * <p/>
- * The method will call {@link #build(String, String, String, String)} to build each element in the first dimension
- * where the elements of the second dimension are the arguments to {@link #build(String, String, String, String)}.
- * <p/>
- *
- * @param artifactInfoBits
- * a two dimensional array of data used to build the artifacts
- * @return List&lt;IArtifactInfo&gt; a list of artifacts built from the given array of info
- */
- static List<IArtifactInfo> buildArtifacts(final String[][] artifactInfoBits) {
- List<IArtifactInfo> artifacts = new ArrayList<>();
-
- for (String[] artifactInfoBit : artifactInfoBits) {
- artifacts.add(build(artifactInfoBit[0], artifactInfoBit[1], artifactInfoBit[2], artifactInfoBit[3]));
- }
-
- return artifacts;
- }
-}
diff --git a/src/test/java/org/onap/aai/babel/csar/fixture/TestArtifactInfoImpl.java b/src/test/java/org/onap/aai/babel/csar/fixture/TestArtifactInfoImpl.java
deleted file mode 100644
index 6c0078d..0000000
--- a/src/test/java/org/onap/aai/babel/csar/fixture/TestArtifactInfoImpl.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * ============LICENSE_START=======================================================
- * org.onap.aai
- * ================================================================================
- * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017-2018 European Software Marketing Ltd.
- * ================================================================================
- * 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.aai.babel.csar.fixture;
-
-import java.util.Objects;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.onap.sdc.api.notification.IArtifactInfo;
-
-/**
- * This class is an implementation of IArtifactInfo for test purposes.
- */
-public class TestArtifactInfoImpl implements IArtifactInfo {
-
- private String artifactName;
- private String artifactType;
- private String artifactDescription;
- private String artifactVersion;
-
- @Override
- public String getArtifactName() {
- return artifactName;
- }
-
- void setArtifactName(String artifactName) {
- this.artifactName = artifactName;
- }
-
- @Override
- public String getArtifactType() {
- return artifactType;
- }
-
- void setArtifactType(String artifactType) {
- this.artifactType = artifactType;
- }
-
- @Override
- public String getArtifactURL() {
- return null;
- }
-
- @Override
- public String getArtifactChecksum() {
- return null;
- }
-
- @Override
- public String getArtifactDescription() {
- return artifactDescription;
- }
-
- void setArtifactDescription(String artifactDescription) {
- this.artifactDescription = artifactDescription;
- }
-
- @Override
- public Integer getArtifactTimeout() {
- return null;
- }
-
- @Override
- public String getArtifactVersion() {
- return artifactVersion;
- }
-
- void setArtifactVersion(String artifactVersion) {
- this.artifactVersion = artifactVersion;
- }
-
- @Override
- public String getArtifactUUID() {
- return null;
- }
-
- @Override
- public IArtifactInfo getGeneratedArtifact() {
- return null;
- }
-
- @Override
- public java.util.List<IArtifactInfo> getRelatedArtifacts() {
- return null;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!(obj instanceof TestArtifactInfoImpl)) {
- return false;
- }
- TestArtifactInfoImpl rhs = (TestArtifactInfoImpl) obj;
- return new EqualsBuilder() //
- .append(artifactType, rhs.artifactType) //
- .append(artifactDescription, rhs.artifactDescription) //
- .append(artifactVersion, rhs.artifactVersion) //
- .isEquals();
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(this.artifactType, this.artifactDescription, this.artifactVersion);
- }
-}
diff --git a/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java b/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java
index 2b64bfb..e5702ac 100644
--- a/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java
+++ b/src/test/java/org/onap/aai/babel/xml/generator/model/TestWidget.java
@@ -187,16 +187,6 @@ public class TestWidget {
Widget.createWidget("OAM_NETWORK").addResource(null);
}
- @Test(expected = IllegalArgumentException.class)
- public void testGetVersionIdForUknownWidget() {
- new Widget(new WidgetType("test"), null, false).getId();
- }
-
- @Test(expected = IllegalArgumentException.class)
- public void testGetInvariantIdForUknownWidget() {
- new Widget(new WidgetType("test"), null, false).getWidgetId();
- }
-
// Call Widget methods which are not supported, purely for code coverage.
@Test(expected = org.onap.aai.babel.xml.generator.error.IllegalAccessException.class)
diff --git a/src/test/resources/artifact-generator.properties b/src/test/resources/artifact-generator.properties
index 1a905b6..e69de29 100644
--- a/src/test/resources/artifact-generator.properties
+++ b/src/test/resources/artifact-generator.properties
@@ -1,270 +0,0 @@
-#action widget details
-AAI.model-version-id.action=action-version-id
-AAI.model-invariant-id.action=action-invariant-id
-#action-data widget details
-AAI.model-invariant-id.action-data=action-data-invariant-id
-AAI.model-version-id.action-data=action-data-version-id
-#allotted-resource widget details
-AAI.model-invariant-id.allotted-resource=allotted-resource-invariant-id
-AAI.model-version-id.allotted-resource=allotted-resource-version-id
-#availability-zone widget details
-AAI.model-version-id.availability-zone=availability-zone-version-id
-AAI.model-invariant-id.availability-zone=availability-zone-invariant-id
-#az-and-dvs-switches widget details
-AAI.model-version-id.az-and-dvs-switches=az-and-dvs-switches-version-id
-AAI.model-invariant-id.az-and-dvs-switches=az-and-dvs-switches-invariant-id
-#class-of-service widget details
-AAI.model-version-id.class-of-service=class-of-service-version-id
-AAI.model-invariant-id.class-of-service=class-of-service-invariant-id
-#cloud-region widget details
-AAI.model-version-id.cloud-region=cloud-region-version-id
-AAI.model-invariant-id.cloud-region=cloud-region-invariant-id
-#complex widget details
-AAI.model-invariant-id.complex=complex-invariant-id
-AAI.model-version-id.complex=complex-version-id
-#configuration widget details
-AAI.model-invariant-id.configuration=configuration-invariant-id
-AAI.model-version-id.configuration=configuration-version-id
-#connector widget details
-AAI.model-version-id.connector=connector-version-id
-AAI.model-invariant-id.connector=connector-invariant-id
-#constrained-element-set widget details
-AAI.model-invariant-id.constrained-element-set=constrained-element-set-invariant-id
-AAI.model-version-id.constrained-element-set=constrained-element-set-version-id
-#ctag-assignment widget details
-AAI.model-version-id.ctag-assignment=ctag-assignment-version-id
-AAI.model-invariant-id.ctag-assignment=ctag-assignment-invariant-id
-#ctag-pool widget details
-AAI.model-invariant-id.ctag-pool=ctag-pool-invariant-id
-AAI.model-version-id.ctag-pool=ctag-pool-version-id
-#customer widget details
-AAI.model-invariant-id.customer=customer-invariant-id
-AAI.model-version-id.customer=customer-version-id
-#cvlan-tag-entry widget details
-AAI.model-version-id.cvlan-tag-entry=cvlan-tag-entry-version-id
-AAI.model-invariant-id.cvlan-tag-entry=cvlan-tag-entry-invariant-id
-#dvs-switch widget details
-AAI.model-invariant-id.dvs-switch=dvs-switch-invariant-id
-AAI.model-version-id.dvs-switch=dvs-switch-version-id
-#edge-prop-names widget details
-AAI.model-invariant-id.edge-prop-names=edge-prop-names-invariant-id
-AAI.model-version-id.edge-prop-names=edge-prop-names-version-id
-#element-choice-set widget details
-AAI.model-invariant-id.element-choice-set=element-choice-set-invariant-id
-AAI.model-version-id.element-choice-set=element-choice-set-version-id
-#entitlement widget details
-AAI.model-version-id.entitlement=entitlement-version-id
-AAI.model-invariant-id.entitlement=entitlement-invariant-id
-#flavor widget details
-AAI.model-invariant-id.flavor=flavor-invariant-id
-AAI.model-version-id.flavor=flavor-version-id
-#generic-vnf widget details
-AAI.model-version-id.generic-vnf=generic-vnf-version-id
-AAI.model-invariant-id.generic-vnf=generic-vnf-invariant-id
-#group-assignment widget details
-AAI.model-invariant-id.group-assignment=group-assignment-invariant-id
-AAI.model-version-id.group-assignment=group-assignment-version-id
-#image widget details
-AAI.model-version-id.image=image-version-id
-AAI.model-invariant-id.image=image-invariant-id
-#include-node-filter widget details
-AAI.model-invariant-id.include-node-filter=include-node-filter-invariant-id
-AAI.model-version-id.include-node-filter=include-node-filter-version-id
-#instance-group widget details
-AAI.model-version-id.instance-group=instance-group-version-id
-AAI.model-invariant-id.instance-group=instance-group-invariant-id
-#inventory-item widget details
-AAI.model-invariant-id.inventory-item=inventory-item-invariant-id
-AAI.model-version-id.inventory-item=inventory-item-version-id
-#inventory-item-data widget details
-AAI.model-version-id.inventory-item-data=inventory-item-data-version-id
-AAI.model-invariant-id.inventory-item-data=inventory-item-data-invariant-id
-#ipsec-configuration widget details
-AAI.model-invariant-id.ipsec-configuration=ipsec-configuration-invariant-id
-AAI.model-version-id.ipsec-configuration=ipsec-configuration-version-id
-#key-data widget details
-AAI.model-version-id.key-data=key-data-version-id
-AAI.model-invariant-id.key-data=key-data-invariant-id
-#l3-interface-ipv4-address-list widget details
-AAI.model-version-id.l3-interface-ipv4-address-list=l3-interface-ipv4-address-list-version-id
-AAI.model-invariant-id.l3-interface-ipv4-address-list=l3-interface-ipv4-address-list-invariant-id
-#l3-interface-ipv6-address-list widget details
-AAI.model-invariant-id.l3-interface-ipv6-address-list=interface-ipv6-address-list-invariant-id
-AAI.model-version-id.l3-interface-ipv6-address-list=l3-interface-ipv6-address-list-version-id
-#l3-network widget details
-AAI.model-version-id.l3-network=l3-network-version-id
-AAI.model-invariant-id.l3-network=l3-network-invariant-id
-#lag-interface widget details
-AAI.model-version-id.lag-interface=lag-interface-version-id
-AAI.model-invariant-id.lag-interface=lag-interface-invariant-id
-#lag-link widget details
-AAI.model-version-id.lag-link=lag-link-version-id
-AAI.model-invariant-id.lag-link=lag-link-invariant-id
-#license widget details
-AAI.model-invariant-id.license=license-invariant-id
-AAI.model-version-id.license=license-version-id
-#license-key-resource widget details
-AAI.model-invariant-id.license-key-resource=license-key-resource-invariant-id
-AAI.model-version-id.license-key-resource=license-key-resource-version-id
-#l-interface widget details
-AAI.model-version-id.l-interface=l-interface-version-id
-AAI.model-invariant-id.l-interface=l-interface-invariant-id
-#logical-link widget details
-AAI.model-version-id.logical-link=logical-link-version-id
-AAI.model-invariant-id.logical-link=logical-link-invariant-id
-#metadatum widget details
-AAI.model-invariant-id.metadatum=metadatum-invariant-id
-AAI.model-version-id.metadatum=metadatum-version-id
-#model widget details
-AAI.model-invariant-id.model=model-invariant-id
-AAI.model-version-id.model=model-version-id
-#model-constraint widget details
-AAI.model-invariant-id.model-constraint=model-constraint-invariant-id
-AAI.model-version-id.model-constraint=model-constraint-version-id
-#model-element widget details
-AAI.model-invariant-id.model-element=model-element-invariant-id
-AAI.model-version-id.model-element=model-element-version-id
-#multicast-configuration widget details
-AAI.model-invariant-id.multicast-configuration=multicast-configuration-invariant-id
-AAI.model-version-id.multicast-configuration=multicast-configuration-version-id
-#named-query widget details
-AAI.model-version-id.named-query=named-query-version-id
-AAI.model-invariant-id.named-query=named-query-invariant-id
-#named-query-element widget details
-AAI.model-version-id.named-query-element=named-query-element-version-id
-AAI.model-invariant-id.named-query-element=amed-query-element-invariant-id
-#network-policy widget details
-AAI.model-invariant-id.network-policy=network-policy-invariant-id
-AAI.model-version-id.network-policy=network-policy-version-id
-#network-profile widget details
-AAI.model-version-id.network-profile=network-profile-version-id
-AAI.model-invariant-id.network-profile=network-profile-invariant-id
-#newvce widget details
-AAI.model-version-id.newvce=newvce-version-id
-AAI.model-invariant-id.newvce=newvce-invariant-id
-#oam-network widget details
-AAI.model-invariant-id.oam-network=oam-network-invariant-id
-AAI.model-version-id.oam-network=oam-network-version-id
-#physical-link widget details
-AAI.model-invariant-id.physical-link=physical-link-invariant-id
-AAI.model-version-id.physical-link=physical-link-version-id
-#p-interface widget details
-AAI.model-invariant-id.p-interface=p-interface-invariant-id
-AAI.model-version-id.p-interface=p-interface-version-id
-#pnf widget details
-AAI.model-version-id.pnf=pnf-version-id
-AAI.model-invariant-id.pnf=pnf-invariant-id
-#port-group widget details
-AAI.model-version-id.port-group=port-group-version-id
-AAI.model-invariant-id.port-group=port-group-invariant-id
-#property-constraint widget details
-AAI.model-version-id.property-constraint=property-constraint-version-id
-AAI.model-invariant-id.property-constraint=f4a863c3-6886-470a-a6ae-05723837ea45
-#pserver widget details
-AAI.model-invariant-id.pserver=pserver-invariant-id
-AAI.model-version-id.pserver=pserver-version-id
-#related-lookup widget details
-AAI.model-invariant-id.related-lookup=related-lookup-invariant-id
-AAI.model-version-id.related-lookup=related-lookup-version-id
-#reserved-prop-names widget details
-AAI.model-invariant-id.reserved-prop-names=reserved-prop-names-invariant-id
-AAI.model-version-id.reserved-prop-names=reserved-prop-names-version-id
-#result-data widget details
-AAI.model-version-id.result-data=result-data-version-id
-AAI.model-invariant-id.result-data=result-data-invariant-id
-#route-table-reference widget details
-AAI.model-version-id.route-table-reference=route-table-reference-version-id
-AAI.model-invariant-id.route-table-reference=route-table-reference-invariant-id
-#routing-instance widget details
-AAI.model-invariant-id.routing-instance=routing-instance-invariant-id
-AAI.model-version-id.routing-instance=routing-instance-version-id
-#secondary-filter widget details
-AAI.model-version-id.secondary-filter=secondary-filter-version-id
-AAI.model-invariant-id.secondary-filter=secondary-filter-invariant-id
-#segmentation-assignment widget details
-AAI.model-invariant-id.segmentation-assignment=segmentation-assignment-invariant-id
-AAI.model-version-id.segmentation-assignment=segmentation-assignment-version-id
-#service widget details
-AAI.model-version-id.service=service-version-id
-AAI.model-invariant-id.service=service-invariant-id
-#service-capability widget details
-AAI.model-invariant-id.service-capability=service-capability-invariant-id
-AAI.model-version-id.service-capability=service-capability-version-id
-#service-instance widget details
-AAI.model-invariant-id.service-instance=service-instance-invariant-id
-AAI.model-version-id.service-instance=service-instance-version-id
-#service-subscription widget details
-AAI.model-invariant-id.service-subscription=service-subscription-invariant-id
-AAI.model-version-id.service-subscription=service-subscription-version-id
-#site-pair widget details
-AAI.model-version-id.site-pair=site-pair-version-id
-AAI.model-invariant-id.site-pair=site-pair-invariant-id
-#site-pair-set widget details
-AAI.model-invariant-id.site-pair-set=site-pair-set-invariant-id
-AAI.model-version-id.site-pair-set=site-pair-set-version-id
-#snapshot widget details
-AAI.model-version-id.snapshot=snapshot-version-id
-AAI.model-invariant-id.snapshot=snapshot-invariant-id
-#sriov-vf widget details
-AAI.model-version-id.sriov-vf=sriov-vf-version-id
-AAI.model-invariant-id.sriov-vf=sriov-vf-invariant-id
-#start-node-filter widget details
-AAI.model-version-id.start-node-filter=start-node-filter-version-id
-AAI.model-invariant-id.start-node-filter=start-node-filter-invariant-id
-#subnet widget details
-AAI.model-version-id.subnet=subnet-version-id
-AAI.model-invariant-id.subnet=subnet-invariant-id
-#tagged-inventory-item-list widget details
-AAI.model-invariant-id.tagged-inventory-item-list=tagged-inventory-item-list-invariant-id
-AAI.model-version-id.tagged-inventory-item-list=tagged-inventory-item-list-version-id
-#tenant widget details
-AAI.model-invariant-id.tenant=tenant-invariant-id
-AAI.model-version-id.tenant=tenant-version-id
-#tunnel-xconnect widget details
-AAI.model-invariant-id.tunnel-xconnect=tunnel-xconnect-invariant-id
-AAI.model-version-id.tunnel-xconnect=tunnel-xconnect-version-id
-#update-node-key widget details
-AAI.model-version-id.update-node-key=tenant-version-id
-AAI.model-invariant-id.update-node-key=tenant-invariant-id
-#vce widget details
-AAI.model-version-id.vce=vce-version-id
-AAI.model-invariant-id.vce=vce-invariant-id
-#vf-module widget details
-AAI.model-invariant-id.vf-module=vf-module-invariant-id
-AAI.model-version-id.vf-module=vf-module-version-id
-#vig-server widget details
-AAI.model-version-id.vig-server=vig-server-version-id
-AAI.model-invariant-id.vig-server=vig-server-invariant-id
-#virtual-data-center widget details
-AAI.model-invariant-id.virtual-data-center=virtual-data-center-invariant-id
-AAI.model-version-id.virtual-data-center=virtual-data-center-version-id
-#vlan widget details
-AAI.model-version-id.vlan=vlan-version-id
-AAI.model-invariant-id.vlan=vlan-invariant-id
-#vnfc widget details
-AAI.model-invariant-id.vnfc=vnfc-invariant-id
-AAI.model-version-id.vnfc=vnfc-version-id
-#vnf-image widget details
-AAI.model-invariant-id.vnf-image=vnf-image-invariant-id
-AAI.model-version-id.vnf-image=vnf-image-version-id
-#volume widget details
-AAI.model-version-id.volume=volume-version-id
-AAI.model-invariant-id.volume=volume-invariant-id
-#volume-group widget details
-AAI.model-invariant-id.volume-group=volume-group-invariant-id
-AAI.model-version-id.volume-group=volume-group-version-id
-#vpe widget details
-AAI.model-invariant-id.vpe=vpe-version-id
-AAI.model-version-id.vpe=vpe-version-id
-#vpls-pe widget details
-AAI.model-version-id.vpls-pe=vpls-pe-version-id
-AAI.model-invariant-id.vpls-pe=vpls-pe-invariant-id
-#vpn-binding widget details
-AAI.model-invariant-id.vpn-binding=vpn-binding-invariant-id
-AAI.model-version-id.vpn-binding=vpn-binding-version-id
-#vserver widget details
-AAI.model-invariant-id.vserver=vserver-invariant-id
-AAI.model-version-id.vserver=vserver-version-id
-#cr (Collection Resource) widget details
-AAI.model-version-id.cr=collection-resource-version-id
-AAI.model-invariant-id.cr=collection-resource-invariant-id
diff --git a/src/test/resources/tosca-mappings.json b/src/test/resources/tosca-mappings.json
index c67b3e2..4d630e2 100644
--- a/src/test/resources/tosca-mappings.json
+++ b/src/test/resources/tosca-mappings.json
@@ -8,92 +8,128 @@
{
"type": "SERVICE",
"name": "service-instance",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "service-instance-invariant-id",
+ "modelVersionId": "service-instance-version-id"
},
{
"type": "VF",
"name": "generic-vnf",
- "deleteFlag": false
+ "deleteFlag": false,
+ "modelInvariantId": "generic-vnf-invariant-id",
+ "modelVersionId": "generic-vnf-version-id"
},
{
"type": "VFC",
"name": "vnfc",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "vnfc-invariant-id",
+ "modelVersionId": "vnfc-version-id"
},
{
"type": "VSERVER",
"name": "vserver",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "vserver-invariant-id",
+ "modelVersionId": "vserver-version-id"
},
{
"type": "VOLUME",
"name": "volume",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "volume-invariant-id",
+ "modelVersionId": "volume-version-id"
},
{
"type": "FLAVOR",
"name": "flavor",
- "deleteFlag": false
+ "deleteFlag": false,
+ "modelInvariantId": "flavor-invariant-id",
+ "modelVersionId": "flavor-version-id"
},
{
"type": "TENANT",
"name": "tenant",
- "deleteFlag": false
+ "deleteFlag": false,
+ "modelInvariantId": "tenant-invariant-id",
+ "modelVersionId": "tenant-version-id"
},
{
"type": "VOLUME_GROUP",
"name": "volume-group",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "volume-group-invariant-id",
+ "modelVersionId": "volume-group-version-id"
},
{
"type": "LINT",
"name": "l-interface",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "l-interface-invariant-id",
+ "modelVersionId": "l-interface-version-id"
},
{
"type": "L3_NET",
"name": "l3-network",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "l3-network-invariant-id",
+ "modelVersionId": "l3-network-version-id"
},
{
"type": "VFMODULE",
"name": "vf-module",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "vf-module-invariant-id",
+ "modelVersionId": "vf-module-version-id"
},
{
"type": "IMAGE",
"name": "image",
- "deleteFlag": false
+ "deleteFlag": false,
+ "modelInvariantId": "image-invariant-id",
+ "modelVersionId": "image-version-id"
},
{
"type": "OAM_NETWORK",
"name": "oam-network",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "oam-network-invariant-id",
+ "modelVersionId": "oam-network-version-id"
},
{
"type": "ALLOTTED_RESOURCE",
"name": "allotted-resource",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "allotted-resource-invariant-id",
+ "modelVersionId": "allotted-resource-version-id"
},
{
"type": "TUNNEL_XCONNECT",
"name": "tunnel-xconnect",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "tunnel-xconnect-invariant-id",
+ "modelVersionId": "tunnel-xconnect-version-id"
},
{
"type": "CONFIGURATION",
"name": "configuration",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "configuration-invariant-id",
+ "modelVersionId": "configuration-version-id"
},
{
"type": "CR",
"name": "cr",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "collection-resource-invariant-id",
+ "modelVersionId": "collection-resource-version-id"
},
{
"type": "INSTANCE_GROUP",
"name": "instance-group",
- "deleteFlag": true
+ "deleteFlag": true,
+ "modelInvariantId": "instance-group-invariant-id",
+ "modelVersionId": "instance-group-version-id"
}
],
"widgetMappings": [