summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorBlimkie, Steven (sb787e) <steven.blimkie@amdocs.com>2017-06-27 21:08:37 +0300
committerBlimkie, Steven (sb787e) <steven.blimkie@amdocs.com>2017-06-27 21:10:57 +0300
commitfe17f093d5c61207949eebef95b83baf5139be50 (patch)
tree776be9df8cd4cf8e5a69bde1f0ed741e78ab08fb /src/test
parentfaa407b9cd0430c1e6b8b668392fe5e33f792432 (diff)
Allow handling of legact model artifacts
Change-Id: I3d4c5e51140d4d05b3fd871d58c2590421c0e9db Signed-off-by: Blimkie, Steven (sb787e) <steven.blimkie@amdocs.com>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/openecomp/modelloader/entity/model/ModelArtifactParserTest.java330
-rw-r--r--src/test/java/org/openecomp/modelloader/entity/model/ModelParserFactoryTest.java58
-rw-r--r--src/test/java/org/openecomp/modelloader/entity/model/ModelSorterTest.java93
-rw-r--r--src/test/java/org/openecomp/modelloader/entity/model/ModelV8ArtifactParserTest.java104
-rw-r--r--src/test/java/org/openecomp/modelloader/entity/model/NamedQueryArtifactParserTest.java64
-rw-r--r--src/test/java/org/openecomp/modelloader/restclient/AaiRestClientTest.java2
-rw-r--r--src/test/resources/logback-test.xml54
-rw-r--r--src/test/resources/model-loader-empty-auth-password.properties66
-rw-r--r--src/test/resources/model-loader-no-auth-password.properties62
-rw-r--r--src/test/resources/model-loader.properties66
-rw-r--r--src/test/resources/models/AAI-Testvsp..vmme_cinder..module-1-resource-1.xml84
-rw-r--r--src/test/resources/models/AAI-Testvsp..vmme_small_ecomp..module-0-resource-1.xml340
-rw-r--r--src/test/resources/models/AAI-VL-resource-1.xml84
-rw-r--r--src/test/resources/models/AAI-stellService-service-1.xml158
-rw-r--r--src/test/resources/models/AAI-testvsp-resource-1.xml158
-rw-r--r--src/test/resources/models/complete-model.xml384
-rw-r--r--src/test/resources/models/incomplete-model.xml54
-rw-r--r--src/test/resources/models/incomplete-models.xml50
-rw-r--r--src/test/resources/models/invalid-model.xml82
-rw-r--r--src/test/resources/models/l3-network-widget.xml42
-rw-r--r--src/test/resources/models/named-query-wan-connector.xml160
-rw-r--r--src/test/resources/models/v8-wan-connector-model.xml165
-rw-r--r--src/test/resources/vnfcatalogexample.xml278
23 files changed, 1303 insertions, 1635 deletions
diff --git a/src/test/java/org/openecomp/modelloader/entity/model/ModelArtifactParserTest.java b/src/test/java/org/openecomp/modelloader/entity/model/ModelArtifactParserTest.java
index 994c4db..ac32f58 100644
--- a/src/test/java/org/openecomp/modelloader/entity/model/ModelArtifactParserTest.java
+++ b/src/test/java/org/openecomp/modelloader/entity/model/ModelArtifactParserTest.java
@@ -1,205 +1,125 @@
-/**
- * ============LICENSE_START=======================================================
- * Model Loader
- * ================================================================================
- * Copyright © 2017 AT&T Intellectual Property.
- * Copyright © 2017 Amdocs
- * 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=========================================================
- *
- * ECOMP and OpenECOMP are trademarks
- * and service marks of AT&T Intellectual Property.
- */
-package org.openecomp.modelloader.entity.model;
-
-import static org.junit.Assert.assertTrue;
-
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.List;
-
-import org.junit.Test;
-import org.openecomp.modelloader.entity.Artifact;
-
-public class ModelArtifactParserTest {
-
- @Test
- public void testParseModelFileNoDeps() throws Exception {
- final String MODEL_FILE = "src/test/resources/models/l3-network-widget.xml";
-
- try {
- byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
-
- ModelArtifactParser parser = new ModelArtifactParser();
- List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
-
- assertTrue(modelList.size() == 1);
-
- ModelArtifact model = (ModelArtifact) modelList.get(0);
- System.out.println(model.toString());
-
- assertTrue(model.getModelInvariantId().equalsIgnoreCase("3d560d81-57d0-438b-a2a1-5334dba0651a"));
- assertTrue(model.getType().toString().equalsIgnoreCase("MODEL"));
- System.out.println(model.getDependentModelIds().size());
- assertTrue(model.getDependentModelIds().size() == 0);
- } catch (Exception e) {
- e.printStackTrace();
- assertTrue(false);
- }
- }
-
- @Test
- public void testParseModelFileDeps() throws Exception {
- final String MODEL_FILE = "src/test/resources/models/AAI-stellService-service-1.xml";
-
- try {
- byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
-
- ModelArtifactParser parser = new ModelArtifactParser();
- List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
-
- assertTrue(modelList.size() == 1);
-
- ModelArtifact model = (ModelArtifact) modelList.get(0);
- System.out.println(model.toString());
-
- assertTrue(model.getModelInvariantId().equalsIgnoreCase("fedf9da3-6a74-4813-8fa2-221a98b0e7ad"));
- assertTrue(model.getModelVerId().equalsIgnoreCase("e0373537-7f66-4094-9939-e2f5de6ff5f6"));
- assertTrue(model.getType().toString().equalsIgnoreCase("MODEL"));
- assertTrue(model.getDependentModelIds().size() == 3);
- assertTrue(model.getDependentModelIds().contains("5c12984d-db0f-4300-a0e0-9791775cc40f|88bdbadf-db8a-490f-881e-c8effcbc3f66"));
- assertTrue(model.getDependentModelIds().contains("959b7c09-9f34-4e5f-8b63-505381db176e|374d0899-bbc2-4403-9320-fe9bebef75c6"));
- } catch (Exception e) {
- e.printStackTrace();
- assertTrue(false);
- }
- }
-
- @Test
- public void testParseCompleteModel() throws Exception {
- final String MODEL_FILE = "src/test/resources/models/complete-model.xml";
-
- try {
- byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
-
- ModelArtifactParser parser = new ModelArtifactParser();
- List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
-
- for (Artifact art : modelList) {
- ModelArtifact model = (ModelArtifact) art;
- System.out.println(model.toString());
- }
-
- assertTrue(modelList.size() == 5);
-
- ModelArtifact model1 = (ModelArtifact)modelList.get(0);
- assertTrue(model1.getModelVerId().equalsIgnoreCase("88bdbadf-db8a-490f-881e-c8effcbc3f66"));
- assertTrue(model1.getType().toString().equalsIgnoreCase("MODEL"));
- assertTrue(model1.getDependentModelIds().size() == 1);
- assertTrue(model1.getDependentModelIds().contains("3d560d81-57d0-438b-a2a1-5334dba0651a|9111f20f-e680-4001-b83f-19a2fc23bfc1"));
-
- ModelArtifact model4 = (ModelArtifact)modelList.get(4);
- assertTrue(model4.getModelInvariantId().equalsIgnoreCase("fedf9da3-6a74-4813-8fa2-221a98b0e7ad"));
- assertTrue(model4.getType().toString().equalsIgnoreCase("MODEL"));
- assertTrue(model4.getDependentModelIds().size() == 3);
- assertTrue(model4.getDependentModelIds().contains("5c12984d-db0f-4300-a0e0-9791775cc40f|88bdbadf-db8a-490f-881e-c8effcbc3f66"));
- assertTrue(model4.getDependentModelIds().contains("82194af1-3c2c-485a-8f44-420e22a9eaa4|46b92144-923a-4d20-b85a-3cbd847668a9"));
- } catch (Exception e) {
- e.printStackTrace();
- assertTrue(false);
- }
- }
-
- @Test
- public void testParseNamedQuery() throws Exception {
- final String MODEL_FILE = "src/test/resources/models/named-query-wan-connector.xml";
-
- try {
- byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
-
- ModelArtifactParser parser = new ModelArtifactParser();
- List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
-
- assertTrue(modelList.size() == 1);
-
- ModelArtifact model = (ModelArtifact) modelList.get(0);
- System.out.println(model.toString());
-
- assertTrue(model.getNameVersionId().equalsIgnoreCase("94cac189-8d88-4d63-a194-f44214e080ff"));
- assertTrue(model.getType().toString().equalsIgnoreCase("NAMED_QUERY"));
- assertTrue(model.getDependentModelIds().size() == 4);
- assertTrue(model.getDependentModelIds().contains("d09dd9da-0148-46cd-a947-591afc844d24"));
- assertTrue(model.getDependentModelIds().contains("997fc7-fca1-451f-b953-9a1e6197b4d6"));
- assertTrue(model.getDependentModelIds().contains("897df7ea-8938-42b0-bc57-46e913a4d93b"));
- assertTrue(model.getDependentModelIds().contains("f2b24d95-c582-48d5-b2d6-c5b3a94ce812"));
- } catch (Exception e) {
- e.printStackTrace();
- assertTrue(false);
- }
- }
-
- @Test
- public void testParseModelFileInvalidArtifact() throws Exception {
- final String MODEL_FILE = "src/test/resources/models/invalid-model.xml";
-
- try {
- byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
-
- ModelArtifactParser parser = new ModelArtifactParser();
- List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
-
- assertTrue(modelList == null || modelList.isEmpty());
- }
- catch (Exception e) {
- e.printStackTrace();
- assertTrue(false);
- }
- }
-
- @Test
- public void testParseModelFileIncompleteArtifact() throws Exception {
- final String MODEL_FILE = "src/test/resources/models/incomplete-model.xml";
-
- try {
- byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
-
- ModelArtifactParser parser = new ModelArtifactParser();
- List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
-
- assertTrue(modelList == null || modelList.isEmpty());
- }
- catch (Exception e) {
- e.printStackTrace();
- assertTrue(false);
- }
- }
-
- @Test
- public void testParseModelFileIncompleteArtifacts() throws Exception {
- final String MODEL_FILE = "src/test/resources/models/incomplete-models.xml";
-
- try {
- byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
-
- ModelArtifactParser parser = new ModelArtifactParser();
- List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
-
- assertTrue(modelList == null || modelList.isEmpty());
- }
- catch (Exception e) {
- e.printStackTrace();
- assertTrue(false);
- }
- }
-
-}
+/**
+ * ============LICENSE_START=======================================================
+ * Model Loader
+ * ================================================================================
+ * Copyright © 2017 AT&T Intellectual Property.
+ * Copyright © 2017 Amdocs
+ * 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=========================================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ */
+package org.openecomp.modelloader.entity.model;
+
+import static org.junit.Assert.assertTrue;
+
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.List;
+
+import org.junit.Test;
+import org.openecomp.modelloader.entity.Artifact;
+
+public class ModelArtifactParserTest {
+
+ @Test
+ public void testParseModelFileNoDeps() throws Exception {
+ final String MODEL_FILE = "src/test/resources/models/l3-network-widget.xml";
+
+ try {
+ byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
+
+ ModelArtifactParser parser = new ModelArtifactParser();
+ List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
+
+ assertTrue(modelList.size() == 1);
+
+ ModelArtifact model = (ModelArtifact) modelList.get(0);
+ System.out.println(model.toString());
+
+ assertTrue(model.getModelInvariantId().equalsIgnoreCase("3d560d81-57d0-438b-a2a1-5334dba0651a"));
+ assertTrue(model.getModelNamespace().equalsIgnoreCase("http://org.openecomp.aai.inventory/v9"));
+ assertTrue(model.getModelNamespaceVersion().equalsIgnoreCase("v9"));
+ assertTrue(model.getType().toString().equalsIgnoreCase("MODEL"));
+ System.out.println(model.getDependentModelIds().size());
+ assertTrue(model.getDependentModelIds().size() == 0);
+ } catch (Exception e) {
+ e.printStackTrace();
+ assertTrue(false);
+ }
+ }
+
+ @Test
+ public void testParseModelFileDeps() throws Exception {
+ final String MODEL_FILE = "src/test/resources/models/AAI-stellService-service-1.xml";
+
+ try {
+ byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
+
+ ModelArtifactParser parser = new ModelArtifactParser();
+ List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
+
+ assertTrue(modelList.size() == 1);
+
+ ModelArtifact model = (ModelArtifact) modelList.get(0);
+ System.out.println(model.toString());
+
+ assertTrue(model.getModelInvariantId().equalsIgnoreCase("fedf9da3-6a74-4813-8fa2-221a98b0e7ad"));
+ assertTrue(model.getModelVerId().equalsIgnoreCase("e0373537-7f66-4094-9939-e2f5de6ff5f6"));
+ assertTrue(model.getType().toString().equalsIgnoreCase("MODEL"));
+ assertTrue(model.getDependentModelIds().size() == 3);
+ assertTrue(model.getDependentModelIds().contains("5c12984d-db0f-4300-a0e0-9791775cc40f|88bdbadf-db8a-490f-881e-c8effcbc3f66"));
+ assertTrue(model.getDependentModelIds().contains("959b7c09-9f34-4e5f-8b63-505381db176e|374d0899-bbc2-4403-9320-fe9bebef75c6"));
+ } catch (Exception e) {
+ e.printStackTrace();
+ assertTrue(false);
+ }
+ }
+
+ @Test
+ public void testParseModelFileInvalidArtifact() throws Exception {
+ final String MODEL_FILE = "src/test/resources/models/invalid-model.xml";
+
+ try {
+ byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
+
+ ModelArtifactParser parser = new ModelArtifactParser();
+ List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
+
+ assertTrue(modelList == null || modelList.isEmpty());
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ assertTrue(false);
+ }
+ }
+
+ @Test
+ public void testParseModelFileIncompleteArtifact() throws Exception {
+ final String MODEL_FILE = "src/test/resources/models/incomplete-model.xml";
+
+ try {
+ byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
+
+ ModelArtifactParser parser = new ModelArtifactParser();
+ List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
+
+ assertTrue(modelList == null || modelList.isEmpty());
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ assertTrue(false);
+ }
+ }
+}
diff --git a/src/test/java/org/openecomp/modelloader/entity/model/ModelParserFactoryTest.java b/src/test/java/org/openecomp/modelloader/entity/model/ModelParserFactoryTest.java
new file mode 100644
index 0000000..46db11a
--- /dev/null
+++ b/src/test/java/org/openecomp/modelloader/entity/model/ModelParserFactoryTest.java
@@ -0,0 +1,58 @@
+/**
+ * ============LICENSE_START=======================================================
+ * Model Loader
+ * ================================================================================
+ * Copyright © 2017 AT&T Intellectual Property.
+ * Copyright © 2017 Amdocs
+ * 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=========================================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ */
+package org.openecomp.modelloader.entity.model;
+
+import static org.junit.Assert.assertTrue;
+
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+import org.junit.Test;
+
+public class ModelParserFactoryTest {
+
+ @Test
+ public void testParserFactory() throws Exception {
+ final String MODEL_FILE_V8 = "src/test/resources/models/v8-wan-connector-model.xml";
+ final String MODEL_FILE_V9 = "src/test/resources/models/AAI-VL-resource-1.xml";
+ final String MODEL_FILE_NAMED_QUERY = "src/test/resources/models/named-query-wan-connector.xml";
+
+
+ try {
+ byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE_V8));
+ IModelParser parser = ModelParserFactory.createModelParser(xmlBytes, "v8-wan-connector-model.xml");
+ assertTrue(parser instanceof ModelV8ArtifactParser);
+
+ xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE_V9));
+ parser = ModelParserFactory.createModelParser(xmlBytes, "AAI-VL-resource-1.xml");
+ assertTrue(parser instanceof ModelArtifactParser);
+
+ xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE_NAMED_QUERY));
+ parser = ModelParserFactory.createModelParser(xmlBytes, "named-query-wan-connector.xml");
+ assertTrue(parser instanceof NamedQueryArtifactParser);
+ } catch (Exception e) {
+ e.printStackTrace();
+ assertTrue(false);
+ }
+ }
+}
diff --git a/src/test/java/org/openecomp/modelloader/entity/model/ModelSorterTest.java b/src/test/java/org/openecomp/modelloader/entity/model/ModelSorterTest.java
index 03eaa39..fdc81da 100644
--- a/src/test/java/org/openecomp/modelloader/entity/model/ModelSorterTest.java
+++ b/src/test/java/org/openecomp/modelloader/entity/model/ModelSorterTest.java
@@ -54,8 +54,9 @@ public class ModelSorterTest {
List<Artifact> modelList = new ArrayList<Artifact>();
ModelArtifact model = new ModelArtifact();
- model.setNameVersionId("aaaaa");
- model.addDependentModelId("xyz");
+ model.setModelInvariantId("aaa");
+ model.setModelVerId("111");
+ model.addDependentModelId("xyz|123");
modelList.add(model);
ModelSorter sorter = new ModelSorter();
@@ -82,17 +83,17 @@ public class ModelSorterTest {
ModelArtifact aaaa = new ModelArtifact();
aaaa.setModelInvariantId("aaaa");
- aaaa.setModelVerId("mvaaaa");
- aaaa.addDependentModelId("cccc|mvcccc");
+ aaaa.setModelVerId("mvaaaa");
+ aaaa.addDependentModelId("cccc|mvcccc");
ModelArtifact bbbb = new ModelArtifact();
bbbb.setModelInvariantId("bbbb");
- bbbb.setModelVerId("mvbbbb");
- bbbb.addDependentModelId("aaaa|mvaaaa");
+ bbbb.setModelVerId("mvbbbb");
+ bbbb.addDependentModelId("aaaa|mvaaaa");
ModelArtifact cccc = new ModelArtifact();
cccc.setModelInvariantId("cccc");
- cccc.setModelVerId("mvcccc");
+ cccc.setModelVerId("mvcccc");
modelList.add(aaaa);
modelList.add(bbbb);
@@ -109,19 +110,89 @@ public class ModelSorterTest {
assertEquals(aaaa, sortedList.get(1));
assertEquals(bbbb, sortedList.get(2));
}
+
+ @Test
+ public void multipleModelsV8() {
+
+ List<Artifact> modelList = new ArrayList<Artifact>();
+
+ ModelV8Artifact aaaa = new ModelV8Artifact();
+ aaaa.setModelNameVersionId("aaaa");
+ aaaa.addDependentModelId("cccc");
+
+ ModelV8Artifact bbbb = new ModelV8Artifact();
+ bbbb.setModelNameVersionId("bbbb");
+ bbbb.addDependentModelId("aaaa");
+
+ ModelV8Artifact cccc = new ModelV8Artifact();
+ cccc.setModelNameVersionId("cccc");
+
+ modelList.add(aaaa);
+ modelList.add(bbbb);
+ modelList.add(cccc);
+ ModelSorter sorter = new ModelSorter();
+ sorter = new ModelSorter();
+
+ List<Artifact> sortedList = sorter.sort(modelList);
+ assertNotNull(sortedList);
+ assertEquals(3, sortedList.size());
+
+ assertEquals(cccc, sortedList.get(0));
+ assertEquals(aaaa, sortedList.get(1));
+ assertEquals(bbbb, sortedList.get(2));
+ }
+
+ @Test
+ public void multipleModelsAndNamedQueries() {
+
+ List<Artifact> modelList = new ArrayList<Artifact>();
+
+ ModelArtifact aaaa = new ModelArtifact();
+ aaaa.setModelInvariantId("aaaa");
+ aaaa.setModelVerId("1111");
+ aaaa.addDependentModelId("cccc|2222");
+
+ NamedQueryArtifact nq1 = new NamedQueryArtifact();
+ nq1.setNamedQueryUuid("nq1");
+ nq1.addDependentModelId("aaaa|1111");
+
+ NamedQueryArtifact nq2 = new NamedQueryArtifact();
+ nq2.setNamedQueryUuid("nq2");
+ nq2.addDependentModelId("existing-model");
+
+
+ modelList.add(nq1);
+ modelList.add(nq2);
+ modelList.add(aaaa);
+
+ ModelSorter sorter = new ModelSorter();
+ sorter = new ModelSorter();
+
+ List<Artifact> sortedList = sorter.sort(modelList);
+ assertNotNull(sortedList);
+ assertEquals(3, sortedList.size());
+
+ System.out.println(sortedList.get(0) + "-" + sortedList.get(1) + "-" + sortedList.get(2));
+ assertEquals(aaaa, sortedList.get(0));
+ assertEquals(nq2, sortedList.get(1));
+ assertEquals(nq1, sortedList.get(2));
+ }
+
@Test(expected = RuntimeException.class)
public void circularDependency() {
List<Artifact> modelList = new ArrayList<Artifact>();
ModelArtifact aaaa = new ModelArtifact();
- aaaa.setNameVersionId("aaaa");
- aaaa.addDependentModelId("bbbb");
+ aaaa.setModelInvariantId("aaaa");
+ aaaa.setModelVerId("1111");
+ aaaa.addDependentModelId("bbbb|1111");
ModelArtifact bbbb = new ModelArtifact();
- bbbb.setNameVersionId("bbbb");
- bbbb.addDependentModelId("aaaa");
+ bbbb.setModelInvariantId("bbbb");
+ bbbb.setModelVerId("1111");
+ bbbb.addDependentModelId("aaaa|1111");
modelList.add(aaaa);
modelList.add(bbbb);
diff --git a/src/test/java/org/openecomp/modelloader/entity/model/ModelV8ArtifactParserTest.java b/src/test/java/org/openecomp/modelloader/entity/model/ModelV8ArtifactParserTest.java
new file mode 100644
index 0000000..098bc8c
--- /dev/null
+++ b/src/test/java/org/openecomp/modelloader/entity/model/ModelV8ArtifactParserTest.java
@@ -0,0 +1,104 @@
+/**
+ * ============LICENSE_START=======================================================
+ * Model Loader
+ * ================================================================================
+ * Copyright © 2017 AT&T Intellectual Property.
+ * Copyright © 2017 Amdocs
+ * 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=========================================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ */
+package org.openecomp.modelloader.entity.model;
+
+import static org.junit.Assert.assertTrue;
+
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.List;
+
+import org.junit.Test;
+import org.openecomp.modelloader.entity.Artifact;
+
+public class ModelV8ArtifactParserTest {
+
+ @Test
+ public void testParseModelFile() throws Exception {
+ final String MODEL_FILE = "src/test/resources/models/v8-wan-connector-model.xml";
+
+ try {
+ byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
+
+ ModelV8ArtifactParser parser = new ModelV8ArtifactParser();
+ List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
+
+ assertTrue(modelList.size() == 1);
+
+ ModelV8Artifact model = (ModelV8Artifact) modelList.get(0);
+ System.out.println(model.toString());
+
+ assertTrue(model.getModelNameVersionId().equalsIgnoreCase("93d9d45d-7eec-4371-9083-675e4c353de3"));
+ assertTrue(model.getModelNamespace().equalsIgnoreCase("http://com.att.aai.inventory/v7"));
+ assertTrue(model.getModelNamespaceVersion().equalsIgnoreCase("v7"));
+ assertTrue(model.getType().toString().equalsIgnoreCase("MODEL_V8"));
+ assertTrue(model.getDependentModelIds().size() == 7);
+ assertTrue(model.getDependentModelIds().contains("d09dd9da-0148-46cd-a947-591afc844d24"));
+ assertTrue(model.getDependentModelIds().contains("997fc7-fca1-451f-b953-9a1e6197b4d6"));
+ assertTrue(model.getDependentModelIds().contains("ae16244f-4d29-4801-a559-e25f2db2a4c3"));
+ assertTrue(model.getDependentModelIds().contains("759dbd4a-2473-46f3-a932-48d987c9b4a1"));
+ assertTrue(model.getDependentModelIds().contains("a6d9de88-4046-4b78-a59e-5691243d292a"));
+ assertTrue(model.getDependentModelIds().contains("35be1acf-1298-48c6-a128-66850083b8bd"));
+ } catch (Exception e) {
+ e.printStackTrace();
+ assertTrue(false);
+ }
+ }
+
+ @Test
+ public void testParseModelFileInvalidArtifact() throws Exception {
+ final String MODEL_FILE = "src/test/resources/models/invalid-model.xml";
+
+ try {
+ byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
+
+ ModelV8ArtifactParser parser = new ModelV8ArtifactParser();
+ List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
+
+ assertTrue(modelList == null || modelList.isEmpty());
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ assertTrue(false);
+ }
+ }
+
+ @Test
+ public void testParseModelFileIncompleteArtifact() throws Exception {
+ final String MODEL_FILE = "src/test/resources/models/incomplete-model.xml";
+
+ try {
+ byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
+
+ ModelV8ArtifactParser parser = new ModelV8ArtifactParser();
+ List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
+
+ assertTrue(modelList == null || modelList.isEmpty());
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ assertTrue(false);
+ }
+ }
+
+}
diff --git a/src/test/java/org/openecomp/modelloader/entity/model/NamedQueryArtifactParserTest.java b/src/test/java/org/openecomp/modelloader/entity/model/NamedQueryArtifactParserTest.java
new file mode 100644
index 0000000..cc9d615
--- /dev/null
+++ b/src/test/java/org/openecomp/modelloader/entity/model/NamedQueryArtifactParserTest.java
@@ -0,0 +1,64 @@
+/**
+ * ============LICENSE_START=======================================================
+ * Model Loader
+ * ================================================================================
+ * Copyright © 2017 AT&T Intellectual Property.
+ * Copyright © 2017 Amdocs
+ * 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=========================================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ */
+package org.openecomp.modelloader.entity.model;
+
+import static org.junit.Assert.assertTrue;
+
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.List;
+
+import org.junit.Test;
+import org.openecomp.modelloader.entity.Artifact;
+
+public class NamedQueryArtifactParserTest {
+
+ @Test
+ public void testParseNamedQuery() throws Exception {
+ final String MODEL_FILE = "src/test/resources/models/named-query-wan-connector.xml";
+
+ try {
+ byte[] xmlBytes = Files.readAllBytes(Paths.get(MODEL_FILE));
+
+ NamedQueryArtifactParser parser = new NamedQueryArtifactParser();
+ List<Artifact> modelList = parser.parse(xmlBytes, "test-artifact");
+
+ assertTrue(modelList.size() == 1);
+
+ NamedQueryArtifact model = (NamedQueryArtifact) modelList.get(0);
+ System.out.println(model.toString());
+
+ assertTrue(model.getNamedQueryUuid().equalsIgnoreCase("94cac189-8d88-4d63-a194-f44214e080ff"));
+ assertTrue(model.getType().toString().equalsIgnoreCase("NAMED_QUERY"));
+ assertTrue(model.getDependentModelIds().size() == 4);
+ assertTrue(model.getDependentModelIds().contains("d09dd9da-0148-46cd-a947-591afc844d24"));
+ assertTrue(model.getDependentModelIds().contains("997fc7-fca1-451f-b953-9a1e6197b4d6"));
+ assertTrue(model.getDependentModelIds().contains("897df7ea-8938-42b0-bc57-46e913a4d93b"));
+ assertTrue(model.getDependentModelIds().contains("f2b24d95-c582-48d5-b2d6-c5b3a94ce812"));
+ } catch (Exception e) {
+ e.printStackTrace();
+ assertTrue(false);
+ }
+ }
+
+}
diff --git a/src/test/java/org/openecomp/modelloader/restclient/AaiRestClientTest.java b/src/test/java/org/openecomp/modelloader/restclient/AaiRestClientTest.java
index 5d9edc9..08a429a 100644
--- a/src/test/java/org/openecomp/modelloader/restclient/AaiRestClientTest.java
+++ b/src/test/java/org/openecomp/modelloader/restclient/AaiRestClientTest.java
@@ -115,7 +115,7 @@ public class AaiRestClientTest {
subURL = subURL + "/";
}
- String url = baseURL + subURL + model.getNameVersionId();
+ String url = baseURL + subURL + model.getUniqueIdentifier();
return url;
}
}
diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml
index 3f0fb7a..aef38e6 100644
--- a/src/test/resources/logback-test.xml
+++ b/src/test/resources/logback-test.xml
@@ -1,37 +1,17 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<configuration debug="false">
-
- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- <!-- encoders are by default assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
- <encoder>
- <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
- </encoder>
- </appender>
-
- <logger name="com.att.eelf" level="DEBUG" additivity="false">
- <appender-ref ref="STDOUT" />
- </logger>
-
- <root level="debug">
- <appender-ref ref="STDOUT" />
- </root>
-</configuration>
+<configuration debug="false">
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are by default assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <logger name="com.att.eelf" level="DEBUG" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <root level="debug">
+ <appender-ref ref="STDOUT" />
+ </root>
+</configuration>
diff --git a/src/test/resources/model-loader-empty-auth-password.properties b/src/test/resources/model-loader-empty-auth-password.properties
index 34432a4..91fd527 100644
--- a/src/test/resources/model-loader-empty-auth-password.properties
+++ b/src/test/resources/model-loader-empty-auth-password.properties
@@ -1,43 +1,23 @@
-###
-# ============LICENSE_START=======================================================
-# MODEL LOADER SERVICE
-# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=========================================================
-###
-
-# Model Loader Distribution Client Configuration
-ml.distribution.ACTIVE_SERVER_TLS_AUTH=false
-ml.distribution.ASDC_ADDRESS=
-ml.distribution.CONSUMER_GROUP=aai-ml-group-test
-ml.distribution.CONSUMER_ID=aai-ml-id-test
-ml.distribution.ENVIRONMENT_NAME=
-ml.distribution.KEYSTORE_PASSWORD=
-ml.distribution.KEYSTORE_FILE=asdc-client.jks
-ml.distribution.PASSWORD=
-ml.distribution.POLLING_INTERVAL=30
-ml.distribution.POLLING_TIMEOUT=20
-ml.distribution.USER=ci
-ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG
-
-# Model Loader AAI REST Client Configuration
-ml.aai.BASE_URL=
-ml.aai.MODEL_URL=/aai/v8/service-design-and-creation/models/model/
-ml.aai.NAMED_QUERY_URL=/aai/v8/service-design-and-creation/named-queries/named-query/
-ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images
-ml.aai.KEYSTORE_FILE=aai-client-cert.p12
-ml.aai.KEYSTORE_PASSWORD=
-ml.aai.AUTH_USER=ModelLoader
-ml.aai.AUTH_PASSWORD=
+# Model Loader Distribution Client Configuration
+ml.distribution.ACTIVE_SERVER_TLS_AUTH=false
+ml.distribution.ASDC_ADDRESS=
+ml.distribution.CONSUMER_GROUP=aai-ml-group-test
+ml.distribution.CONSUMER_ID=aai-ml-id-test
+ml.distribution.ENVIRONMENT_NAME=
+ml.distribution.KEYSTORE_PASSWORD=
+ml.distribution.KEYSTORE_FILE=asdc-client.jks
+ml.distribution.PASSWORD=
+ml.distribution.POLLING_INTERVAL=30
+ml.distribution.POLLING_TIMEOUT=20
+ml.distribution.USER=ci
+ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG
+
+# Model Loader AAI REST Client Configuration
+ml.aai.BASE_URL=
+ml.aai.MODEL_URL=/aai/v8/service-design-and-creation/models/model/
+ml.aai.NAMED_QUERY_URL=/aai/v8/service-design-and-creation/named-queries/named-query/
+ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images
+ml.aai.KEYSTORE_FILE=aai-client-cert.p12
+ml.aai.KEYSTORE_PASSWORD=
+ml.aai.AUTH_USER=ModelLoader
+ml.aai.AUTH_PASSWORD=
diff --git a/src/test/resources/model-loader-no-auth-password.properties b/src/test/resources/model-loader-no-auth-password.properties
index 035d3e8..2f36934 100644
--- a/src/test/resources/model-loader-no-auth-password.properties
+++ b/src/test/resources/model-loader-no-auth-password.properties
@@ -1,41 +1,21 @@
-###
-# ============LICENSE_START=======================================================
-# MODEL LOADER SERVICE
-# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=========================================================
-###
-
-# Model Loader Distribution Client Configuration
-ml.distribution.ACTIVE_SERVER_TLS_AUTH=false
-ml.distribution.ASDC_ADDRESS=
-ml.distribution.CONSUMER_GROUP=aai-ml-group-test
-ml.distribution.CONSUMER_ID=aai-ml-id-test
-ml.distribution.ENVIRONMENT_NAME=
-ml.distribution.KEYSTORE_PASSWORD=
-ml.distribution.KEYSTORE_FILE=asdc-client.jks
-ml.distribution.PASSWORD=
-ml.distribution.POLLING_INTERVAL=30
-ml.distribution.POLLING_TIMEOUT=20
-ml.distribution.USER=ci
-ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG
-
-# Model Loader AAI REST Client Configuration
-ml.aai.BASE_URL=
-ml.aai.MODEL_URL=/aai/v8/service-design-and-creation/models/model/
-ml.aai.NAMED_QUERY_URL=/aai/v8/service-design-and-creation/named-queries/named-query/
-ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images
-ml.aai.KEYSTORE_FILE=aai-client-cert.p12
-ml.aai.KEYSTORE_PASSWORD=
+# Model Loader Distribution Client Configuration
+ml.distribution.ACTIVE_SERVER_TLS_AUTH=false
+ml.distribution.ASDC_ADDRESS=
+ml.distribution.CONSUMER_GROUP=aai-ml-group-test
+ml.distribution.CONSUMER_ID=aai-ml-id-test
+ml.distribution.ENVIRONMENT_NAME=
+ml.distribution.KEYSTORE_PASSWORD=
+ml.distribution.KEYSTORE_FILE=asdc-client.jks
+ml.distribution.PASSWORD=
+ml.distribution.POLLING_INTERVAL=30
+ml.distribution.POLLING_TIMEOUT=20
+ml.distribution.USER=ci
+ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG
+
+# Model Loader AAI REST Client Configuration
+ml.aai.BASE_URL=
+ml.aai.MODEL_URL=/aai/v8/service-design-and-creation/models/model/
+ml.aai.NAMED_QUERY_URL=/aai/v8/service-design-and-creation/named-queries/named-query/
+ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images
+ml.aai.KEYSTORE_FILE=aai-client-cert.p12
+ml.aai.KEYSTORE_PASSWORD=
diff --git a/src/test/resources/model-loader.properties b/src/test/resources/model-loader.properties
index 34432a4..91fd527 100644
--- a/src/test/resources/model-loader.properties
+++ b/src/test/resources/model-loader.properties
@@ -1,43 +1,23 @@
-###
-# ============LICENSE_START=======================================================
-# MODEL LOADER SERVICE
-# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=========================================================
-###
-
-# Model Loader Distribution Client Configuration
-ml.distribution.ACTIVE_SERVER_TLS_AUTH=false
-ml.distribution.ASDC_ADDRESS=
-ml.distribution.CONSUMER_GROUP=aai-ml-group-test
-ml.distribution.CONSUMER_ID=aai-ml-id-test
-ml.distribution.ENVIRONMENT_NAME=
-ml.distribution.KEYSTORE_PASSWORD=
-ml.distribution.KEYSTORE_FILE=asdc-client.jks
-ml.distribution.PASSWORD=
-ml.distribution.POLLING_INTERVAL=30
-ml.distribution.POLLING_TIMEOUT=20
-ml.distribution.USER=ci
-ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG
-
-# Model Loader AAI REST Client Configuration
-ml.aai.BASE_URL=
-ml.aai.MODEL_URL=/aai/v8/service-design-and-creation/models/model/
-ml.aai.NAMED_QUERY_URL=/aai/v8/service-design-and-creation/named-queries/named-query/
-ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images
-ml.aai.KEYSTORE_FILE=aai-client-cert.p12
-ml.aai.KEYSTORE_PASSWORD=
-ml.aai.AUTH_USER=ModelLoader
-ml.aai.AUTH_PASSWORD=
+# Model Loader Distribution Client Configuration
+ml.distribution.ACTIVE_SERVER_TLS_AUTH=false
+ml.distribution.ASDC_ADDRESS=
+ml.distribution.CONSUMER_GROUP=aai-ml-group-test
+ml.distribution.CONSUMER_ID=aai-ml-id-test
+ml.distribution.ENVIRONMENT_NAME=
+ml.distribution.KEYSTORE_PASSWORD=
+ml.distribution.KEYSTORE_FILE=asdc-client.jks
+ml.distribution.PASSWORD=
+ml.distribution.POLLING_INTERVAL=30
+ml.distribution.POLLING_TIMEOUT=20
+ml.distribution.USER=ci
+ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG
+
+# Model Loader AAI REST Client Configuration
+ml.aai.BASE_URL=
+ml.aai.MODEL_URL=/aai/v8/service-design-and-creation/models/model/
+ml.aai.NAMED_QUERY_URL=/aai/v8/service-design-and-creation/named-queries/named-query/
+ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images
+ml.aai.KEYSTORE_FILE=aai-client-cert.p12
+ml.aai.KEYSTORE_PASSWORD=
+ml.aai.AUTH_USER=ModelLoader
+ml.aai.AUTH_PASSWORD=
diff --git a/src/test/resources/models/AAI-Testvsp..vmme_cinder..module-1-resource-1.xml b/src/test/resources/models/AAI-Testvsp..vmme_cinder..module-1-resource-1.xml
index 7bd1073..6ec4fb3 100644
--- a/src/test/resources/models/AAI-Testvsp..vmme_cinder..module-1-resource-1.xml
+++ b/src/test/resources/models/AAI-Testvsp..vmme_cinder..module-1-resource-1.xml
@@ -1,52 +1,32 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<model xmlns="http://org.openecomp.aai.inventory/v9">
- <model-invariant-id>5a2aac99-ffe8-415f-9242-420ed10da23e</model-invariant-id>
- <model-type>resource</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>29d3fc43-4ff2-4e5c-acd0-7370f5b2715a</model-version-id>
- <model-name>Testvsp..vmme_cinder..module-1</model-name>
- <model-version>1</model-version>
- <model-description></model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>c00563ae-812b-4e62-8330-7c4d0f47088a</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>ef86f9c5-2165-44f3-8fc3-96018b609ea5</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
-</model>
+<model xmlns="http://org.openecomp.aai.inventory/v9">
+ <model-invariant-id>5a2aac99-ffe8-415f-9242-420ed10da23e</model-invariant-id>
+ <model-type>resource</model-type>
+ <model-vers>
+ <model-ver>
+ <model-version-id>29d3fc43-4ff2-4e5c-acd0-7370f5b2715a</model-version-id>
+ <model-name>Testvsp..vmme_cinder..module-1</model-name>
+ <model-version>1</model-version>
+ <model-description></model-description>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>c00563ae-812b-4e62-8330-7c4d0f47088a</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>ef86f9c5-2165-44f3-8fc3-96018b609ea5</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ </model-elements>
+ </model-ver>
+ </model-vers>
+</model> \ No newline at end of file
diff --git a/src/test/resources/models/AAI-Testvsp..vmme_small_ecomp..module-0-resource-1.xml b/src/test/resources/models/AAI-Testvsp..vmme_small_ecomp..module-0-resource-1.xml
index 8fe5319..ee436ba 100644
--- a/src/test/resources/models/AAI-Testvsp..vmme_small_ecomp..module-0-resource-1.xml
+++ b/src/test/resources/models/AAI-Testvsp..vmme_small_ecomp..module-0-resource-1.xml
@@ -1,180 +1,160 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<model xmlns="http://org.openecomp.aai.inventory/v9">
- <model-invariant-id>1e8fdfc0-03cf-4742-b060-dab818954d67</model-invariant-id>
- <model-type>resource</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>da6769f0-aa58-4e90-b2c9-664c2630d131</model-version-id>
- <model-name>Testvsp..vmme_small_ecomp..module-0</model-name>
- <model-version>1</model-version>
- <model-description></model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>f6a038c2-820c-42ba-8c2b-375e24e8f932</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>3f4c7204-739b-4bbb-87a7-8a6856439c90</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>abcc54bc-bb74-49dc-9043-7f7171707545</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>97c26c99-6870-44c1-8a07-1d900d3f4ce6</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>36200fb5-f251-4f5d-a520-7c5ad5c2cd4b</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>bace8d1c-a261-4041-9e37-823117415d0f</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>a32613fd-18b9-459e-aab8-fffb3912966a</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>cea0a982-8d55-4093-921e-418fbccf7060</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>5761e0a7-c6df-4d8a-9ebd-b8f445054dec</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>96129eb9-f0de-4e05-8af2-73146473f766</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>8ecb2c5d-7176-4317-a255-26274edfdd53</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>ff69d4e0-a8e8-4108-bdb0-dd63217e63c7</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>9111f20f-e680-4001-b83f-19a2fc23bfc1</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>3d560d81-57d0-438b-a2a1-5334dba0651a</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>c00563ae-812b-4e62-8330-7c4d0f47088a</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>ef86f9c5-2165-44f3-8fc3-96018b609ea5</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
-</model>
+<model xmlns="http://org.openecomp.aai.inventory/v9">
+ <model-invariant-id>1e8fdfc0-03cf-4742-b060-dab818954d67</model-invariant-id>
+ <model-type>resource</model-type>
+ <model-vers>
+ <model-ver>
+ <model-version-id>da6769f0-aa58-4e90-b2c9-664c2630d131</model-version-id>
+ <model-name>Testvsp..vmme_small_ecomp..module-0</model-name>
+ <model-version>1</model-version>
+ <model-description></model-description>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>f6a038c2-820c-42ba-8c2b-375e24e8f932</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>3f4c7204-739b-4bbb-87a7-8a6856439c90</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>abcc54bc-bb74-49dc-9043-7f7171707545</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>97c26c99-6870-44c1-8a07-1d900d3f4ce6</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>36200fb5-f251-4f5d-a520-7c5ad5c2cd4b</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>bace8d1c-a261-4041-9e37-823117415d0f</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>a32613fd-18b9-459e-aab8-fffb3912966a</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>cea0a982-8d55-4093-921e-418fbccf7060</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>5761e0a7-c6df-4d8a-9ebd-b8f445054dec</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>96129eb9-f0de-4e05-8af2-73146473f766</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ </model-elements>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>8ecb2c5d-7176-4317-a255-26274edfdd53</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>ff69d4e0-a8e8-4108-bdb0-dd63217e63c7</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>9111f20f-e680-4001-b83f-19a2fc23bfc1</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>3d560d81-57d0-438b-a2a1-5334dba0651a</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ </model-elements>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>c00563ae-812b-4e62-8330-7c4d0f47088a</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>ef86f9c5-2165-44f3-8fc3-96018b609ea5</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ </model-elements>
+ </model-ver>
+ </model-vers>
+</model> \ No newline at end of file
diff --git a/src/test/resources/models/AAI-VL-resource-1.xml b/src/test/resources/models/AAI-VL-resource-1.xml
index 98941ad..e80d4f3 100644
--- a/src/test/resources/models/AAI-VL-resource-1.xml
+++ b/src/test/resources/models/AAI-VL-resource-1.xml
@@ -1,52 +1,32 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<model xmlns="http://org.openecomp.aai.inventory/v9">
- <model-invariant-id>5c12984d-db0f-4300-a0e0-9791775cc40f</model-invariant-id>
- <model-type>resource</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>88bdbadf-db8a-490f-881e-c8effcbc3f66</model-version-id>
- <model-name>VL</model-name>
- <model-version>1</model-version>
- <model-description> Virtual link (VL) describes the basic topology of the connectivity as well as other required parameters (e.g. bandwidth and QoS class). </model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>9111f20f-e680-4001-b83f-19a2fc23bfc1</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>3d560d81-57d0-438b-a2a1-5334dba0651a</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
-</model>
+<model xmlns="http://org.openecomp.aai.inventory/v9">
+ <model-invariant-id>5c12984d-db0f-4300-a0e0-9791775cc40f</model-invariant-id>
+ <model-type>resource</model-type>
+ <model-vers>
+ <model-ver>
+ <model-version-id>88bdbadf-db8a-490f-881e-c8effcbc3f66</model-version-id>
+ <model-name>VL</model-name>
+ <model-version>1</model-version>
+ <model-description> Virtual link (VL) describes the basic topology of the connectivity as well as other required parameters (e.g. bandwidth and QoS class). </model-description>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>9111f20f-e680-4001-b83f-19a2fc23bfc1</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>3d560d81-57d0-438b-a2a1-5334dba0651a</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ </model-elements>
+ </model-ver>
+ </model-vers>
+</model> \ No newline at end of file
diff --git a/src/test/resources/models/AAI-stellService-service-1.xml b/src/test/resources/models/AAI-stellService-service-1.xml
index 378b09e..20cfd11 100644
--- a/src/test/resources/models/AAI-stellService-service-1.xml
+++ b/src/test/resources/models/AAI-stellService-service-1.xml
@@ -1,89 +1,69 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<model xmlns="http://org.openecomp.aai.inventory/v9">
- <model-invariant-id>fedf9da3-6a74-4813-8fa2-221a98b0e7ad</model-invariant-id>
- <model-type>service</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>e0373537-7f66-4094-9939-e2f5de6ff5f6</model-version-id>
- <model-name>stellService</model-name>
- <model-version>1</model-version>
- <model-description>fd</model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>88bdbadf-db8a-490f-881e-c8effcbc3f66</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>5c12984d-db0f-4300-a0e0-9791775cc40f</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>374d0899-bbc2-4403-9320-fe9bebef75c6</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>959b7c09-9f34-4e5f-8b63-505381db176e</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>46b92144-923a-4d20-b85a-3cbd847668a9</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>82194af1-3c2c-485a-8f44-420e22a9eaa4</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
-</model>
+<model xmlns="http://org.openecomp.aai.inventory/v9">
+ <model-invariant-id>fedf9da3-6a74-4813-8fa2-221a98b0e7ad</model-invariant-id>
+ <model-type>service</model-type>
+ <model-vers>
+ <model-ver>
+ <model-version-id>e0373537-7f66-4094-9939-e2f5de6ff5f6</model-version-id>
+ <model-name>stellService</model-name>
+ <model-version>1</model-version>
+ <model-description>fd</model-description>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>88bdbadf-db8a-490f-881e-c8effcbc3f66</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>5c12984d-db0f-4300-a0e0-9791775cc40f</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>374d0899-bbc2-4403-9320-fe9bebef75c6</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>959b7c09-9f34-4e5f-8b63-505381db176e</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ </model-elements>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>46b92144-923a-4d20-b85a-3cbd847668a9</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>82194af1-3c2c-485a-8f44-420e22a9eaa4</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ </model-elements>
+ </model-ver>
+ </model-vers>
+</model> \ No newline at end of file
diff --git a/src/test/resources/models/AAI-testvsp-resource-1.xml b/src/test/resources/models/AAI-testvsp-resource-1.xml
index c9a70ff..bafecfb 100644
--- a/src/test/resources/models/AAI-testvsp-resource-1.xml
+++ b/src/test/resources/models/AAI-testvsp-resource-1.xml
@@ -1,89 +1,69 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<model xmlns="http://org.openecomp.aai.inventory/v9">
- <model-invariant-id>959b7c09-9f34-4e5f-8b63-505381db176e</model-invariant-id>
- <model-type>resource</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>374d0899-bbc2-4403-9320-fe9bebef75c6</model-version-id>
- <model-name>testvsp</model-name>
- <model-version>1</model-version>
- <model-description>nkjlkl</model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>da6769f0-aa58-4e90-b2c9-664c2630d131</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>1e8fdfc0-03cf-4742-b060-dab818954d67</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>29d3fc43-4ff2-4e5c-acd0-7370f5b2715a</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>5a2aac99-ffe8-415f-9242-420ed10da23e</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>93a6166f-b3d5-4f06-b4ba-aed48d009ad9</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>acc6edd8-a8d4-4b93-afaa-0994068be14c</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
-</model>
+<model xmlns="http://org.openecomp.aai.inventory/v9">
+ <model-invariant-id>959b7c09-9f34-4e5f-8b63-505381db176e</model-invariant-id>
+ <model-type>resource</model-type>
+ <model-vers>
+ <model-ver>
+ <model-version-id>374d0899-bbc2-4403-9320-fe9bebef75c6</model-version-id>
+ <model-name>testvsp</model-name>
+ <model-version>1</model-version>
+ <model-description>nkjlkl</model-description>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>da6769f0-aa58-4e90-b2c9-664c2630d131</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>1e8fdfc0-03cf-4742-b060-dab818954d67</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>29d3fc43-4ff2-4e5c-acd0-7370f5b2715a</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>5a2aac99-ffe8-415f-9242-420ed10da23e</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ </model-elements>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>93a6166f-b3d5-4f06-b4ba-aed48d009ad9</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>acc6edd8-a8d4-4b93-afaa-0994068be14c</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ </model-elements>
+ </model-ver>
+ </model-vers>
+</model> \ No newline at end of file
diff --git a/src/test/resources/models/complete-model.xml b/src/test/resources/models/complete-model.xml
deleted file mode 100644
index 394c073..0000000
--- a/src/test/resources/models/complete-model.xml
+++ /dev/null
@@ -1,384 +0,0 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<models xmlns="http://org.openecomp.aai.inventory/v9">
- <model>
- <model-invariant-id>5c12984d-db0f-4300-a0e0-9791775cc40f</model-invariant-id>
- <model-type>resource</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>88bdbadf-db8a-490f-881e-c8effcbc3f66</model-version-id>
- <model-name>VL</model-name>
- <model-version>1</model-version>
- <model-description> Virtual link (VL) describes the basic topology of the connectivity as well as other required parameters (e.g. bandwidth and QoS class). </model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>9111f20f-e680-4001-b83f-19a2fc23bfc1</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>3d560d81-57d0-438b-a2a1-5334dba0651a</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
-</model>
-<model>
- <model-invariant-id>1e8fdfc0-03cf-4742-b060-dab818954d67</model-invariant-id>
- <model-type>resource</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>da6769f0-aa58-4e90-b2c9-664c2630d131</model-version-id>
- <model-name>Testvsp..vmme_small_ecomp..module-0</model-name>
- <model-version>1</model-version>
- <model-description></model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>f6a038c2-820c-42ba-8c2b-375e24e8f932</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>3f4c7204-739b-4bbb-87a7-8a6856439c90</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>abcc54bc-bb74-49dc-9043-7f7171707545</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>97c26c99-6870-44c1-8a07-1d900d3f4ce6</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>36200fb5-f251-4f5d-a520-7c5ad5c2cd4b</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>bace8d1c-a261-4041-9e37-823117415d0f</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>a32613fd-18b9-459e-aab8-fffb3912966a</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>cea0a982-8d55-4093-921e-418fbccf7060</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>5761e0a7-c6df-4d8a-9ebd-b8f445054dec</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>96129eb9-f0de-4e05-8af2-73146473f766</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>8ecb2c5d-7176-4317-a255-26274edfdd53</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>ff69d4e0-a8e8-4108-bdb0-dd63217e63c7</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>9111f20f-e680-4001-b83f-19a2fc23bfc1</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>3d560d81-57d0-438b-a2a1-5334dba0651a</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>c00563ae-812b-4e62-8330-7c4d0f47088a</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>ef86f9c5-2165-44f3-8fc3-96018b609ea5</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
-</model>
-<model>
- <model-invariant-id>5a2aac99-ffe8-415f-9242-420ed10da23e</model-invariant-id>
- <model-type>resource</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>29d3fc43-4ff2-4e5c-acd0-7370f5b2715a</model-version-id>
- <model-name>Testvsp..vmme_cinder..module-1</model-name>
- <model-version>1</model-version>
- <model-description></model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>c00563ae-812b-4e62-8330-7c4d0f47088a</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>ef86f9c5-2165-44f3-8fc3-96018b609ea5</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
-</model>
-<model>
- <model-invariant-id>959b7c09-9f34-4e5f-8b63-505381db176e</model-invariant-id>
- <model-type>resource</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>374d0899-bbc2-4403-9320-fe9bebef75c6</model-version-id>
- <model-name>testvsp</model-name>
- <model-version>1</model-version>
- <model-description>nkjlkl</model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>da6769f0-aa58-4e90-b2c9-664c2630d131</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>1e8fdfc0-03cf-4742-b060-dab818954d67</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>29d3fc43-4ff2-4e5c-acd0-7370f5b2715a</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>5a2aac99-ffe8-415f-9242-420ed10da23e</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>93a6166f-b3d5-4f06-b4ba-aed48d009ad9</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>acc6edd8-a8d4-4b93-afaa-0994068be14c</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
-</model>
-<model>
- <model-invariant-id>fedf9da3-6a74-4813-8fa2-221a98b0e7ad</model-invariant-id>
- <model-type>service</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>e0373537-7f66-4094-9939-e2f5de6ff5f6</model-version-id>
- <model-name>stellService</model-name>
- <model-version>1</model-version>
- <model-description>fd</model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>88bdbadf-db8a-490f-881e-c8effcbc3f66</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>5c12984d-db0f-4300-a0e0-9791775cc40f</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>374d0899-bbc2-4403-9320-fe9bebef75c6</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>959b7c09-9f34-4e5f-8b63-505381db176e</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>46b92144-923a-4d20-b85a-3cbd847668a9</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>82194af1-3c2c-485a-8f44-420e22a9eaa4</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
- </model>
-</models>
diff --git a/src/test/resources/models/incomplete-model.xml b/src/test/resources/models/incomplete-model.xml
index b30d4d7..5bc0581 100644
--- a/src/test/resources/models/incomplete-model.xml
+++ b/src/test/resources/models/incomplete-model.xml
@@ -1,37 +1,17 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<model xmlns="http://org.openecomp.aai.inventory/v9">
- <model-type>resource</model-type>
- <model-vers>
- <model-ver>
- <model-name>VL</model-name>
- <model-version>1</model-version>
- <model-description> Virtual link (VL) describes the basic topology of the connectivity as well as other required parameters (e.g. bandwidth and QoS class). </model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
-</model>
+<model xmlns="http://org.openecomp.aai.inventory/v9">
+ <model-type>resource</model-type>
+ <model-vers>
+ <model-ver>
+ <model-name>VL</model-name>
+ <model-version>1</model-version>
+ <model-description> Virtual link (VL) describes the basic topology of the connectivity as well as other required parameters (e.g. bandwidth and QoS class). </model-description>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ </model-element>
+ </model-elements>
+ </model-ver>
+ </model-vers>
+</model> \ No newline at end of file
diff --git a/src/test/resources/models/incomplete-models.xml b/src/test/resources/models/incomplete-models.xml
deleted file mode 100644
index 56b10de..0000000
--- a/src/test/resources/models/incomplete-models.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<models xmlns="http://org.openecomp.aai.inventory/v9">
-<model>
- <model-invariant-id>3d560d81-57d0-438b-a2a1-5334dba0651a</model-invariant-id>
- <model-type>widget</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>9111f20f-e680-4001-b83f-19a2fc23bfc1</model-version-id>
- <model-version>1.0</model-version>
- <model-name>l3-network</model-name>
- </model-ver>
- </model-vers>
-</model>
-<model>
- <model-type>resource</model-type>
- <model-vers>
- <model-ver>
- <model-name>VL</model-name>
- <model-version>1</model-version>
- <model-description> Virtual link (VL) describes the basic topology of the connectivity as well as other required parameters (e.g. bandwidth and QoS class). </model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
-</model>
-</models>
diff --git a/src/test/resources/models/invalid-model.xml b/src/test/resources/models/invalid-model.xml
index 906cd21..865f5d3 100644
--- a/src/test/resources/models/invalid-model.xml
+++ b/src/test/resources/models/invalid-model.xml
@@ -1,51 +1,31 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<model xmlns="http://org.openecomp.aai.inventory/v9">
- <model-invariant-id>5c12984d-db0f-4300-a0e0-9791775cc40f</model-invariant-id>
- <model-type>resource</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>88bdbadf-db8a-490f-881e-c8effcbc3f66</model-version-id>
- <model-name>VL</model-name>
- <model-version>1</model-version>
- <model-description> Virtual link (VL) describes the basic topology of the connectivity as well as other required parameters (e.g. bandwidth and QoS class). </model-description>
- <model-elements>
- <model-element>
- <new-data-del-flag>F</new-data-del-flag>
- <cardinality>unbounded</cardinality>
- <model-elements/>
- <relationship-list>
- <relationship>
- <related-to>model-ver</related-to>
- <relationship-data>
- <relationship-key>model-ver.model-version-id</relationship-key>
- <relationship-value>9111f20f-e680-4001-b83f-19a2fc23bfc1</relationship-value>
- </relationship-data>
- <relationship-data>
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>3d560d81-57d0-438b-a2a1-5334dba0651a</relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </model-element>
- </model-elements>
- </model-ver>
- </model-vers>
+<model xmlns="http://org.openecomp.aai.inventory/v9">
+ <model-invariant-id>5c12984d-db0f-4300-a0e0-9791775cc40f</model-invariant-id>
+ <model-type>resource</model-type>
+ <model-vers>
+ <model-ver>
+ <model-version-id>88bdbadf-db8a-490f-881e-c8effcbc3f66</model-version-id>
+ <model-name>VL</model-name>
+ <model-version>1</model-version>
+ <model-description> Virtual link (VL) describes the basic topology of the connectivity as well as other required parameters (e.g. bandwidth and QoS class). </model-description>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>F</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <model-elements/>
+ <relationship-list>
+ <relationship>
+ <related-to>model-ver</related-to>
+ <relationship-data>
+ <relationship-key>model-ver.model-version-id</relationship-key>
+ <relationship-value>9111f20f-e680-4001-b83f-19a2fc23bfc1</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>3d560d81-57d0-438b-a2a1-5334dba0651a</relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ </model-elements>
+ </model-ver>
+ </model-vers>
diff --git a/src/test/resources/models/l3-network-widget.xml b/src/test/resources/models/l3-network-widget.xml
index 1e50300..1d0240b 100644
--- a/src/test/resources/models/l3-network-widget.xml
+++ b/src/test/resources/models/l3-network-widget.xml
@@ -1,31 +1,11 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<model xmlns="http://org.openecomp.aai.inventory/v9">
- <model-invariant-id>3d560d81-57d0-438b-a2a1-5334dba0651a</model-invariant-id>
- <model-type>widget</model-type>
- <model-vers>
- <model-ver>
- <model-version-id>9111f20f-e680-4001-b83f-19a2fc23bfc1</model-version-id>
- <model-version>1.0</model-version>
- <model-name>l3-network</model-name>
- </model-ver>
- </model-vers>
-</model>
+<model xmlns="http://org.openecomp.aai.inventory/v9">
+ <model-invariant-id>3d560d81-57d0-438b-a2a1-5334dba0651a</model-invariant-id>
+ <model-type>widget</model-type>
+ <model-vers>
+ <model-ver>
+ <model-version-id>9111f20f-e680-4001-b83f-19a2fc23bfc1</model-version-id>
+ <model-version>1.0</model-version>
+ <model-name>l3-network</model-name>
+ </model-ver>
+ </model-vers>
+</model> \ No newline at end of file
diff --git a/src/test/resources/models/named-query-wan-connector.xml b/src/test/resources/models/named-query-wan-connector.xml
index 51047df..55d8fda 100644
--- a/src/test/resources/models/named-query-wan-connector.xml
+++ b/src/test/resources/models/named-query-wan-connector.xml
@@ -1,90 +1,70 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<named-query xmlns="http://org.openecomp.aai.inventory/v7">
- <named-query-uuid>94cac189-8d88-4d63-a194-f44214e080ff
- </named-query-uuid>
- <named-query-name>wan-connector</named-query-name>
- <named-query-version>v1.0</named-query-version>
- <description>Named Query - Wan Connector</description>
- <named-query-elements>
- <named-query-element>
- <relationship-list>
- <relationship>
- <related-to>model</related-to>
- <relationship-data>
- <!-- connector -->
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>d09dd9da-0148-46cd-a947-591afc844d24
- </relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <named-query-elements>
- <named-query-element>
- <relationship-list>
- <relationship>
- <related-to>model</related-to>
- <relationship-data>
- <!-- vdc -->
- <relationship-key>model.model-invariant-id</relationship-key>
- <relationship-value>997fc7-fca1-451f-b953-9a1e6197b4d6
- </relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <named-query-elements>
- <named-query-element>
- <relationship-list>
- <relationship>
- <related-to>model</related-to>
- <relationship-data>
- <!-- logical-link -->
- <relationship-key>model.model-invariant-id
- </relationship-key>
- <relationship-value>897df7ea-8938-42b0-bc57-46e913a4d93b
- </relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- <named-query-elements>
- <named-query-element>
- <relationship-list>
- <relationship>
- <related-to>model</related-to>
- <relationship-data>
- <!-- pserver -->
- <relationship-key>model.model-invariant-id
- </relationship-key>
- <relationship-value>f2b24d95-c582-48d5-b2d6-c5b3a94ce812
- </relationship-value>
- </relationship-data>
- </relationship>
- </relationship-list>
- </named-query-element>
- </named-query-elements>
- </named-query-element>
- </named-query-elements>
- </named-query-element>
- </named-query-elements>
- </named-query-element>
- </named-query-elements>
-</named-query>
-
+<named-query xmlns="http://org.openecomp.aai.inventory/v7">
+ <named-query-uuid>94cac189-8d88-4d63-a194-f44214e080ff
+ </named-query-uuid>
+ <named-query-name>wan-connector</named-query-name>
+ <named-query-version>v1.0</named-query-version>
+ <description>Named Query - Wan Connector</description>
+ <named-query-elements>
+ <named-query-element>
+ <relationship-list>
+ <relationship>
+ <related-to>model</related-to>
+ <relationship-data>
+ <!-- connector -->
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>d09dd9da-0148-46cd-a947-591afc844d24
+ </relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <named-query-elements>
+ <named-query-element>
+ <relationship-list>
+ <relationship>
+ <related-to>model</related-to>
+ <relationship-data>
+ <!-- vdc -->
+ <relationship-key>model.model-invariant-id</relationship-key>
+ <relationship-value>997fc7-fca1-451f-b953-9a1e6197b4d6
+ </relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <named-query-elements>
+ <named-query-element>
+ <relationship-list>
+ <relationship>
+ <related-to>model</related-to>
+ <relationship-data>
+ <!-- logical-link -->
+ <relationship-key>model.model-invariant-id
+ </relationship-key>
+ <relationship-value>897df7ea-8938-42b0-bc57-46e913a4d93b
+ </relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <named-query-elements>
+ <named-query-element>
+ <relationship-list>
+ <relationship>
+ <related-to>model</related-to>
+ <relationship-data>
+ <!-- pserver -->
+ <relationship-key>model.model-invariant-id
+ </relationship-key>
+ <relationship-value>f2b24d95-c582-48d5-b2d6-c5b3a94ce812
+ </relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </named-query-element>
+ </named-query-elements>
+ </named-query-element>
+ </named-query-elements>
+ </named-query-element>
+ </named-query-elements>
+ </named-query-element>
+ </named-query-elements>
+</named-query>
+
diff --git a/src/test/resources/models/v8-wan-connector-model.xml b/src/test/resources/models/v8-wan-connector-model.xml
new file mode 100644
index 0000000..09f1933
--- /dev/null
+++ b/src/test/resources/models/v8-wan-connector-model.xml
@@ -0,0 +1,165 @@
+<model xmlns="http://com.att.aai.inventory/v7">
+ <model-id>e4a9901b-6c94-4e07-b8d8-b877d3df554c</model-id>
+ <model-type>service</model-type>
+ <model-name>wan-connector</model-name>
+ <model-version>v1.0</model-version>
+ <model-name-version-id>93d9d45d-7eec-4371-9083-675e4c353de3
+ </model-name-version-id>
+ <model-description>Connects a customer vpn to the border elements of an
+ AT&amp;T product</model-description>
+ <metadata>
+ <metadatum>
+ <metaname>a</metaname>
+ <metaval>vpn-id</metaval>
+ </metadatum>
+ <metadatum>
+ <metaname>b</metaname>
+ <metaval>product</metaval>
+ </metadatum>
+ </metadata>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>true</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <relationship-list>
+ <relationship>
+ <related-to>model</related-to>
+ <relationship-data>
+ <!-- connector -->
+ <relationship-key>model.model-name-version-id</relationship-key>
+ <relationship-value>d09dd9da-0148-46cd-a947-591afc844d24
+ </relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>true</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <relationship-list>
+ <relationship>
+ <related-to>model</related-to>
+ <relationship-data>
+ <!-- vdc -->
+ <relationship-key>model.model-name-version-id</relationship-key>
+ <relationship-value>997fc7-fca1-451f-b953-9a1e6197b4d6
+ </relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <model-elements>
+ <model-element>
+ <new-data-del-flag>true</new-data-del-flag>
+ <cardinality>unbounded</cardinality>
+ <relationship-list>
+ <relationship>
+ <related-to>model</related-to>
+ <relationship-data>
+ <!-- l2-bridge-for-wan-connector -->
+ <relationship-key>model.model-name-version-id
+ </relationship-key>
+ <relationship-value>ae16244f-4d29-4801-a559-e25f2db2a4c3
+ </relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <model-constraint>
+ <constrained-element-sets>
+ <constrained-element-set>
+ <path>logical-link</path>
+ <constrained-element-set-uuid>999
+ </constrained-element-set-uuid>
+ <constraint-type>combination</constraint-type>
+ <check-type>AND</check-type>
+ <element-choice-sets>
+ <element-choice-set>
+ <element-choice-set-name>A</element-choice-set-name>
+ <cardinality>1</cardinality>
+ <model-elements>
+ <model-element>
+ <cardinality>unbounded</cardinality>
+ <new-data-del-flag>false</new-data-del-flag>
+ <relationship-list>
+ <relationship>
+ <related-to>model</related-to>
+ <relationship-data>
+ <!-- ipe -->
+ <relationship-key>model.model-name-version-id
+ </relationship-key>
+ <relationship-value>759dbd4a-2473-46f3-a932-48d987c9b4a1
+ </relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ <linkage-points>
+ <linkage-point>l-interface|p-interface|pserver
+ </linkage-point>
+ </linkage-points>
+ </model-element>
+ </model-elements>
+ </element-choice-set>
+ <element-choice-set>
+ <element-choice-set-name>B</element-choice-set-name>
+ <cardinality>1</cardinality>
+ <model-elements>
+ <model-element>
+ <cardinality>unbounded</cardinality>
+ <new-data-del-flag>false</new-data-del-flag>
+ <relationship-list>
+ <relationship>
+ <related-to>model</related-to>
+ <relationship-data>
+ <!-- vDbe -->
+ <relationship-key>model.model-name-version-id
+ </relationship-key>
+ <relationship-value>8da97b81-e0e9-4157-a4cd-af3ba52871d6
+ </relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ <model-element>
+ <cardinality>unbounded</cardinality>
+ <new-data-del-flag>false</new-data-del-flag>
+ <relationship-list>
+ <relationship>
+ <related-to>model</related-to>
+ <relationship-data>
+ <!-- vSbg -->
+ <relationship-key>model.model-name-version-id
+ </relationship-key>
+ <relationship-value>a6d9de88-4046-4b78-a59e-5691243d292a
+ </relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ <model-element>
+ <cardinality>unbounded</cardinality>
+ <new-data-del-flag>false</new-data-del-flag>
+ <relationship-list>
+ <relationship>
+ <related-to>model</related-to>
+ <relationship-data>
+ <!-- pBgf -->
+ <relationship-key>model.model-name-version-id
+ </relationship-key>
+ <relationship-value>35be1acf-1298-48c6-a128-66850083b8bd
+ </relationship-value>
+ </relationship-data>
+ </relationship>
+ </relationship-list>
+ </model-element>
+ </model-elements>
+ </element-choice-set>
+ </element-choice-sets>
+ </constrained-element-set>
+ </constrained-element-sets>
+ </model-constraint>
+ </model-element>
+ </model-elements>
+ </model-element>
+ </model-elements>
+ </model-element>
+ </model-elements>
+</model>
diff --git a/src/test/resources/vnfcatalogexample.xml b/src/test/resources/vnfcatalogexample.xml
index 0348f71..c38b411 100644
--- a/src/test/resources/vnfcatalogexample.xml
+++ b/src/test/resources/vnfcatalogexample.xml
@@ -1,149 +1,129 @@
-<!--
- ============LICENSE_START=======================================================
- MODEL LOADER SERVICE
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============LICENSE_END=========================================================
- -->
-
-<vnf-catalog>
- <part-number-list>
- <part-number>FortiGate-VM00</part-number>
- <vnf-type>FW</vnf-type>
- <vendor-info>
- <vendor-name>FORTINET</vendor-name>
- <vendor-part-number>FortiGate-VM00</vendor-part-number>
- <vendor-model>VM00</vendor-model>
- </vendor-info>
- <vcpu>
- <vcpu-default>1</vcpu-default>
- <vcpu-min>1</vcpu-min>
- <vcpu-max>1</vcpu-max>
- </vcpu>
- <vmemory>
- <vmemory-default>1</vmemory-default>
- <vmemory-units>GB</vmemory-units>
- <vmemory-min>1</vmemory-min>
- <vmemory-max>1</vmemory-max>
- </vmemory>
- <vdisk>
- <vdisk-default>2</vdisk-default>
- <vdisk-units>GB</vdisk-units>
- <vdisk-min>2</vdisk-min>
- <vdisk-max>32</vdisk-max>
- </vdisk>
- <software-version-list>
- <software-version>5.2.7</software-version>
- <software-version-state>0</software-version-state>
- <software-filetype>IMAGE</software-filetype>
- <file-md5-value>1c59a521885c465004456f74d003726c</file-md5-value>
- <software-filename>test3</software-filename>
- </software-version-list>
- <software-version-list>
- <software-version>5.2.5</software-version>
- <software-version-state>1</software-version-state>
- <software-filetype>IMAGE</software-filetype>
- <file-md5-value>C4D2CBE51669796E48623E006782F7DC</file-md5-value>
- <software-filename>test2</software-filename>
- </software-version-list>
- <software-version-list>
- <software-version>5.2.4</software-version>
- <software-version-state>2</software-version-state>
- <software-filetype>IMAGE</software-filetype>
- <file-md5-value>4987E1E743FD641C879E1D3C5D50BCE0</file-md5-value>
- <software-filename>test1</software-filename>
- </software-version-list>
- <vnf-features-list>
- <vnf-feature>APPID</vnf-feature>
- </vnf-features-list>
- <vnf-features-list>
- <vnf-feature>IPS-IDS</vnf-feature>
- </vnf-features-list>
- <vnf-features-list>
- <vnf-feature>URLF</vnf-feature>
- </vnf-features-list>
- <vnf-features-list>
- <vnf-feature>Anti-Virus</vnf-feature>
- </vnf-features-list>
- <license-list>
- <license-assignment-group>FortiGate-VM00</license-assignment-group>
- <license-required>FALSE</license-required>
- </license-list>
- </part-number-list>
- <part-number-list>
- <part-number>FortiGate-VM01</part-number>
- <vnf-type>FW</vnf-type>
- <vendor-info>
- <vendor-name>FORTINET</vendor-name>
- <vendor-part-number>FortiGate-VM01</vendor-part-number>
- <vendor-model>VM01</vendor-model>
- </vendor-info>
- <vcpu>
- <vcpu-default>1</vcpu-default>
- <vcpu-min>1</vcpu-min>
- <vcpu-max>1</vcpu-max>
- </vcpu>
- <vmemory>
- <vmemory-default>2</vmemory-default>
- <vmemory-units>GB</vmemory-units>
- <vmemory-min>1</vmemory-min>
- <vmemory-max>2</vmemory-max>
- </vmemory>
- <vdisk>
- <vdisk-default>2</vdisk-default>
- <vdisk-units>GB</vdisk-units>
- <vdisk-min>2</vdisk-min>
- <vdisk-max>32</vdisk-max>
- </vdisk>
- <software-version-list>
- <software-version>5.2.7</software-version>
- <software-version-state>0</software-version-state>
- <software-filetype>IMAGE</software-filetype>
- <file-md5-value>1c59a521885c465004456f74d003726c</file-md5-value>
- <software-filename>software file name 3</software-filename>
- </software-version-list>
- <software-version-list>
- <software-version>5.2.5</software-version>
- <software-version-state>1</software-version-state>
- <software-filetype>IMAGE</software-filetype>
- <file-md5-value>C4D2CBE51669796E48623E006782F7DC</file-md5-value>
- <software-filename>software file name 2</software-filename>
- </software-version-list>
- <software-version-list>
- <software-version>5.2.4</software-version>
- <software-version-state>2</software-version-state>
- <software-filetype>IMAGE</software-filetype>
- <file-md5-value>4987E1E743FD641C879E1D3C5D50BCE0</file-md5-value>
- <software-filename>software file name</software-filename>
- </software-version-list>
- <vnf-features-list>
- <vnf-feature>APPID</vnf-feature>
- </vnf-features-list>
- <vnf-features-list>
- <vnf-feature>IPS-IDS</vnf-feature>
- </vnf-features-list>
- <vnf-features-list>
- <vnf-feature>URLF</vnf-feature>
- </vnf-features-list>
- <vnf-features-list>
- <vnf-feature>Anti-Virus</vnf-feature>
- </vnf-features-list>
- <license-list>
- <license-assignment-group>license group</license-assignment-group>
- <license-required>FALSE</license-required>
- </license-list>
- </part-number-list>
-
-</vnf-catalog>
+<vnf-catalog>
+ <part-number-list>
+ <part-number>FortiGate-VM00</part-number>
+ <vnf-type>FW</vnf-type>
+ <vendor-info>
+ <vendor-name>FORTINET</vendor-name>
+ <vendor-part-number>FortiGate-VM00</vendor-part-number>
+ <vendor-model>VM00</vendor-model>
+ </vendor-info>
+ <vcpu>
+ <vcpu-default>1</vcpu-default>
+ <vcpu-min>1</vcpu-min>
+ <vcpu-max>1</vcpu-max>
+ </vcpu>
+ <vmemory>
+ <vmemory-default>1</vmemory-default>
+ <vmemory-units>GB</vmemory-units>
+ <vmemory-min>1</vmemory-min>
+ <vmemory-max>1</vmemory-max>
+ </vmemory>
+ <vdisk>
+ <vdisk-default>2</vdisk-default>
+ <vdisk-units>GB</vdisk-units>
+ <vdisk-min>2</vdisk-min>
+ <vdisk-max>32</vdisk-max>
+ </vdisk>
+ <software-version-list>
+ <software-version>5.2.7</software-version>
+ <software-version-state>0</software-version-state>
+ <software-filetype>IMAGE</software-filetype>
+ <file-md5-value>1c59a521885c465004456f74d003726c</file-md5-value>
+ <software-filename>test3</software-filename>
+ </software-version-list>
+ <software-version-list>
+ <software-version>5.2.5</software-version>
+ <software-version-state>1</software-version-state>
+ <software-filetype>IMAGE</software-filetype>
+ <file-md5-value>C4D2CBE51669796E48623E006782F7DC</file-md5-value>
+ <software-filename>test2</software-filename>
+ </software-version-list>
+ <software-version-list>
+ <software-version>5.2.4</software-version>
+ <software-version-state>2</software-version-state>
+ <software-filetype>IMAGE</software-filetype>
+ <file-md5-value>4987E1E743FD641C879E1D3C5D50BCE0</file-md5-value>
+ <software-filename>test1</software-filename>
+ </software-version-list>
+ <vnf-features-list>
+ <vnf-feature>APPID</vnf-feature>
+ </vnf-features-list>
+ <vnf-features-list>
+ <vnf-feature>IPS-IDS</vnf-feature>
+ </vnf-features-list>
+ <vnf-features-list>
+ <vnf-feature>URLF</vnf-feature>
+ </vnf-features-list>
+ <vnf-features-list>
+ <vnf-feature>Anti-Virus</vnf-feature>
+ </vnf-features-list>
+ <license-list>
+ <license-assignment-group>FortiGate-VM00</license-assignment-group>
+ <license-required>FALSE</license-required>
+ </license-list>
+ </part-number-list>
+ <part-number-list>
+ <part-number>FortiGate-VM01</part-number>
+ <vnf-type>FW</vnf-type>
+ <vendor-info>
+ <vendor-name>FORTINET</vendor-name>
+ <vendor-part-number>FortiGate-VM01</vendor-part-number>
+ <vendor-model>VM01</vendor-model>
+ </vendor-info>
+ <vcpu>
+ <vcpu-default>1</vcpu-default>
+ <vcpu-min>1</vcpu-min>
+ <vcpu-max>1</vcpu-max>
+ </vcpu>
+ <vmemory>
+ <vmemory-default>2</vmemory-default>
+ <vmemory-units>GB</vmemory-units>
+ <vmemory-min>1</vmemory-min>
+ <vmemory-max>2</vmemory-max>
+ </vmemory>
+ <vdisk>
+ <vdisk-default>2</vdisk-default>
+ <vdisk-units>GB</vdisk-units>
+ <vdisk-min>2</vdisk-min>
+ <vdisk-max>32</vdisk-max>
+ </vdisk>
+ <software-version-list>
+ <software-version>5.2.7</software-version>
+ <software-version-state>0</software-version-state>
+ <software-filetype>IMAGE</software-filetype>
+ <file-md5-value>1c59a521885c465004456f74d003726c</file-md5-value>
+ <software-filename>software file name 3</software-filename>
+ </software-version-list>
+ <software-version-list>
+ <software-version>5.2.5</software-version>
+ <software-version-state>1</software-version-state>
+ <software-filetype>IMAGE</software-filetype>
+ <file-md5-value>C4D2CBE51669796E48623E006782F7DC</file-md5-value>
+ <software-filename>software file name 2</software-filename>
+ </software-version-list>
+ <software-version-list>
+ <software-version>5.2.4</software-version>
+ <software-version-state>2</software-version-state>
+ <software-filetype>IMAGE</software-filetype>
+ <file-md5-value>4987E1E743FD641C879E1D3C5D50BCE0</file-md5-value>
+ <software-filename>software file name</software-filename>
+ </software-version-list>
+ <vnf-features-list>
+ <vnf-feature>APPID</vnf-feature>
+ </vnf-features-list>
+ <vnf-features-list>
+ <vnf-feature>IPS-IDS</vnf-feature>
+ </vnf-features-list>
+ <vnf-features-list>
+ <vnf-feature>URLF</vnf-feature>
+ </vnf-features-list>
+ <vnf-features-list>
+ <vnf-feature>Anti-Virus</vnf-feature>
+ </vnf-features-list>
+ <license-list>
+ <license-assignment-group>license group</license-assignment-group>
+ <license-required>FALSE</license-required>
+ </license-list>
+ </part-number-list>
+
+</vnf-catalog>