summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src/test
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2018-09-04 11:21:02 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2018-09-08 22:33:28 -0400
commit69455a268648881f4b5a0c4547d769c2e6ecc2c1 (patch)
tree8ea753e5282e91316d842522c8873fd51572344c /mso-catalog-db/src/test
parent3e9ee0977d0c8643f81e720bbf23e5a40864a0d8 (diff)
added generic fabric support to SO
Fix Autoincrement of ID field in table Fix accidental removal of method Update usage of requestdb client removed unused imports in common tasks and test Fix broken branch, have unit tests pass references the Epic branch Fix broken branch from compiling committing classpath for vfc adapter cause its not going away added in the fail case for when there are no profiles removed second set of adapters in application test yml removed double adapters in request db application test added jpa repo dependency to the so bpmn folder pom add creation timestamp column to the table added in null checks for Config returned from policy switched to string in requestprocess with jenerate switched to string in requestprocess with jenerate updated aai version in common pom to 605 from 591 renamed the db scripts for flyway sync to register added endpoint to application test yml for failing test ... Change-Id: I800f837ea75d7cdff740dc3a387e4d7654cfd085 Issue-ID: SO-972 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-catalog-db/src/test')
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/BaseTest.java69
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java1
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java103
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomizationTest.java85
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfcCustomizationTest.java77
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java22
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepositoryTest.java22
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java103
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepositoryTest.java121
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfcCustomizationRepositoryTest.java62
-rw-r--r--mso-catalog-db/src/test/resources/data.sql95
-rw-r--r--mso-catalog-db/src/test/resources/schema.sql72
12 files changed, 829 insertions, 3 deletions
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/BaseTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/BaseTest.java
index 5a5dc70029..5bfa300a03 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/BaseTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/BaseTest.java
@@ -1,7 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
package org.onap.so.db.catalog;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.onap.so.db.catalog.beans.CvnfcCustomization;
+import org.onap.so.db.catalog.beans.VfModule;
+import org.onap.so.db.catalog.beans.VnfResource;
+import org.onap.so.db.catalog.beans.VnfcCustomization;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
@@ -10,6 +34,51 @@ import org.springframework.test.context.junit4.SpringRunner;
@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("test")
public class BaseTest {
+
+ protected VnfcCustomization setUpVnfcCustomization(){
+ VnfcCustomization vnfcCustomization = new VnfcCustomization();
+ vnfcCustomization.setModelInstanceName("testVnfcCustomizationModelInstanceName");
+ vnfcCustomization.setModelUUID("321228a4-9f15-11e8-98d0-529269fb1459");
+ vnfcCustomization.setModelInvariantUUID("c0659136-9f15-11e8-98d0-529269fb1459");
+ vnfcCustomization.setModelVersion("testModelVersion");
+ vnfcCustomization.setModelName("testModelName");
+ vnfcCustomization.setToscaNodeType("testToscaModelType");
+ vnfcCustomization.setDescription("testVnfcCustomizationDescription");
+ return vnfcCustomization;
+ }
+
+ protected CvnfcCustomization setUpCvnfcCustomization(){
+ CvnfcCustomization cvnfcCustomization = new CvnfcCustomization();
+ cvnfcCustomization.setModelInstanceName("cvfncCustomizationTestModelInstanceName");
+ cvnfcCustomization.setModelUUID("321228a4-9f15-11e8-98d0-529269fb1459");
+ cvnfcCustomization.setModelInvariantUUID("c0659136-9f15-11e8-98d0-529269fb1459");
+ cvnfcCustomization.setModelVersion("testModelVersion");
+ cvnfcCustomization.setModelName("testModelName");
+ cvnfcCustomization.setToscaNodeType("testToscaNodeType");
+ cvnfcCustomization.setDescription("description");
+ cvnfcCustomization.setNfcFunction("testNfcFunction");
+ cvnfcCustomization.setNfcNamingCode("testNfcNamingCode");
+ return cvnfcCustomization;
+ }
+
+ protected VfModule setUpVfModule(){
+ VfModule vFModule = new VfModule();
+ vFModule.setModelUUID("cb82ffd8-252a-11e7-93ae-92361f002671");
+ vFModule.setModelVersion("testModelVersion");
+ vFModule.setModelName("testModelName");
+ vFModule.setIsBase(false);
+ return vFModule;
+ }
+
+ protected VnfResource setUpVnfResource(){
+ VnfResource vnfResource = new VnfResource();
+ vnfResource.setModelUUID("cb82ffd8-252a-11e7-93ae-92361f002671");
+ vnfResource.setModelInvariantUUID("az82ffd8-252a-11e7-93ae-92361f002677");
+ vnfResource.setModelVersion("testModelVersion");
+ vnfResource.setOrchestrationMode("HEAT");
+ return vnfResource;
+ }
+
@Test
public void testNothing(){}
}
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java
index 016d1d61d6..489f8a0a3d 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/ControllerSelectionReferenceTest.java
@@ -23,7 +23,6 @@ package org.onap.so.db.catalog;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.so.db.catalog.beans.ControllerSelectionReference;
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java
new file mode 100644
index 0000000000..7ec28205d6
--- /dev/null
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/CvnfcCustomizationTest.java
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.db.catalog.beans;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.Test;
+
+public class CvnfcCustomizationTest {
+
+ private static final Integer ID = new Integer(1);
+ private static final String DESCRIPTION = "testDescription";
+ private static final String MODEL_CUSTOMIZATION_UUID = "testModelCustomizationUUID";
+ private static final String MODEL_INSTANCE_NAME = "testModelInstanceName";
+ private static final String MODEL_INVARIANT_UUID = "testModelInvariantUUID";
+ private static final String MODEL_NAME = "testModelName";
+ private static final String MODEL_UUID = "testModelUUID";
+ private static final String MODEL_VERSION = "testModelVersion";
+ private static final String TOSCA_NODE_TYPE = "testToscaNodeType";
+ private static final String NFC_FUNCTION = "testNfcFunction";
+ private static final String NFC_NAMING_CODE = "testNfcNamingCode";
+
+ @Test
+ public final void testCvnfcCustomization () {
+ CvnfcCustomization cvnfcCustomization = new CvnfcCustomization();
+ cvnfcCustomization.setDescription(DESCRIPTION);
+ cvnfcCustomization.setId(ID);
+ cvnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ cvnfcCustomization.setModelInstanceName(MODEL_INSTANCE_NAME);
+ cvnfcCustomization.setModelInvariantUUID(MODEL_INVARIANT_UUID);
+ cvnfcCustomization.setModelName(MODEL_NAME);
+ cvnfcCustomization.setModelUUID(MODEL_UUID);
+ cvnfcCustomization.setModelVersion(MODEL_VERSION);
+ cvnfcCustomization.setNfcFunction(NFC_FUNCTION);
+ cvnfcCustomization.setNfcNamingCode(NFC_NAMING_CODE);
+ cvnfcCustomization.setToscaNodeType(TOSCA_NODE_TYPE);
+ cvnfcCustomization.setVfModuleCustomization(setupVfModuleCustomization());
+ cvnfcCustomization.setVnfcCustomization(setupVnfcCustomization());
+ cvnfcCustomization.setVnfResourceCustomization(setupVnfResourceCustomization());
+ Set<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomizationSet = new HashSet();
+ vnfVfmoduleCvnfcConfigurationCustomizationSet.add(setupVnfVfmoduleCvnfcConfigurationCustomization());
+ cvnfcCustomization.setVnfVfmoduleCvnfcConfigurationCustomization(vnfVfmoduleCvnfcConfigurationCustomizationSet);
+
+ assertTrue (cvnfcCustomization.getId().equals (new Integer(1)));
+ assertTrue (cvnfcCustomization.getDescription().equals (DESCRIPTION));
+ assertTrue (cvnfcCustomization.getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
+ assertTrue (cvnfcCustomization.getModelInstanceName().equals (MODEL_INSTANCE_NAME));
+ assertTrue (cvnfcCustomization.getModelInvariantUUID().equals (MODEL_INVARIANT_UUID));
+ assertTrue (cvnfcCustomization.getModelName().equals (MODEL_NAME));
+ assertTrue (cvnfcCustomization.getModelUUID().equals (MODEL_UUID));
+ assertTrue (cvnfcCustomization.getModelVersion().equals (MODEL_VERSION));
+ assertTrue (cvnfcCustomization.getNfcFunction().equals (NFC_FUNCTION));
+ assertTrue (cvnfcCustomization.getNfcNamingCode().equals (NFC_NAMING_CODE));
+ assertTrue (cvnfcCustomization.getToscaNodeType().equals (TOSCA_NODE_TYPE));
+ assertTrue (cvnfcCustomization.getVnfcCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
+ assertTrue (cvnfcCustomization.getVfModuleCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
+ }
+
+ private VfModuleCustomization setupVfModuleCustomization(){
+ VfModuleCustomization vfModuleCustomization = new VfModuleCustomization();
+ vfModuleCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ return vfModuleCustomization;
+ }
+
+ private VnfcCustomization setupVnfcCustomization(){
+ VnfcCustomization vnfcCustomization = new VnfcCustomization();
+ vnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ return vnfcCustomization;
+ }
+
+ private VnfResourceCustomization setupVnfResourceCustomization(){
+ VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization();
+ vnfResourceCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ return vnfResourceCustomization;
+ }
+
+ private VnfVfmoduleCvnfcConfigurationCustomization setupVnfVfmoduleCvnfcConfigurationCustomization(){
+ VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
+ vnfVfmoduleCvnfcConfigurationCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ return vnfVfmoduleCvnfcConfigurationCustomization;
+ }
+} \ No newline at end of file
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomizationTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomizationTest.java
new file mode 100644
index 0000000000..b3ad06cca4
--- /dev/null
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfVfmoduleCvnfcConfigurationCustomizationTest.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.db.catalog.beans;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class VnfVfmoduleCvnfcConfigurationCustomizationTest {
+
+ private static final String CONFIGURATION_FUNCTION = "testconfigurationFunction";
+ private static final String CONFIGURATION_ROLE = "testconfigurationRole";
+ private static final String CONFIGURATION_TYPE = "testconfigurationType";
+ private static final Integer ID = new Integer(1);
+ private static final String MODEL_CUSTOMIZATION_UUID = "testModelCustomizationUUID";
+ private static final String MODEL_INSTANCE_NAME = "testModelInstanceName";
+ private static final String MODEL_UUID = "testModelUUID";
+ private static final String POLICY_NAME = "testPolicyName";
+
+ @Test
+ public final void testVnfVfmoduleCvnfcConfigurationCustomization () {
+ VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
+ vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationFunction(CONFIGURATION_FUNCTION);
+ vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationResource(setupConfigurationResource());
+ vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationRole(CONFIGURATION_ROLE);
+ vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationType(CONFIGURATION_TYPE);
+ CvnfcCustomization cvnfcCustomization = new CvnfcCustomization();
+ cvnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ vnfVfmoduleCvnfcConfigurationCustomization.setCvnfcCustomization(cvnfcCustomization);
+ vnfVfmoduleCvnfcConfigurationCustomization.setId(ID);
+ vnfVfmoduleCvnfcConfigurationCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ vnfVfmoduleCvnfcConfigurationCustomization.setModelInstanceName(MODEL_INSTANCE_NAME);
+ vnfVfmoduleCvnfcConfigurationCustomization.setPolicyName(POLICY_NAME);
+
+ vnfVfmoduleCvnfcConfigurationCustomization.setVfModuleCustomization(setupVfModuleCustomization());
+ vnfVfmoduleCvnfcConfigurationCustomization.setVnfResourceCustomization(setupVnfResourceCustomization());
+
+ assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getId().equals (new Integer(1)));
+ assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationFunction().equals (CONFIGURATION_FUNCTION));
+ assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationRole().equals (CONFIGURATION_ROLE));
+ assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationType().equals (CONFIGURATION_TYPE));
+ assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
+ assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getModelInstanceName().equals (MODEL_INSTANCE_NAME));
+ assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getPolicyName().equals (POLICY_NAME));
+ assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getCvnfcCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
+ assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getVnfResourceCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
+ assertTrue (vnfVfmoduleCvnfcConfigurationCustomization.getVfModuleCustomization().getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
+ }
+
+ private VfModuleCustomization setupVfModuleCustomization(){
+ VfModuleCustomization vfModuleCustomization = new VfModuleCustomization();
+ vfModuleCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ return vfModuleCustomization;
+ }
+
+ private VnfResourceCustomization setupVnfResourceCustomization(){
+ VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization();
+ vnfResourceCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ return vnfResourceCustomization;
+ }
+
+ private ConfigurationResource setupConfigurationResource(){
+ ConfigurationResource configurationResource = new ConfigurationResource();
+ configurationResource.setModelUUID(MODEL_UUID);
+ return configurationResource;
+ }
+} \ No newline at end of file
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfcCustomizationTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfcCustomizationTest.java
new file mode 100644
index 0000000000..2a315d83b6
--- /dev/null
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/beans/VnfcCustomizationTest.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.db.catalog.beans;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+public class VnfcCustomizationTest {
+
+ private static final String DESCRIPTION = "testDescription";
+ private static final String MODEL_CUSTOMIZATION_UUID = "testModelCustomizationUUID";
+ private static final String MODEL_INSTANCE_NAME = "testModelInstanceName";
+ private static final String MODEL_INVARIANT_UUID = "testModelInvariantUUID";
+ private static final String MODEL_NAME = "testModelName";
+ private static final String MODEL_UUID = "testModelUUID";
+ private static final String MODEL_VERSION = "testModelVersion";
+ private static final String TOSCA_NODE_TYPE = "testToscaNodeType";
+
+ @Test
+ public final void testVnfcCustomization () {
+ VnfcCustomization vnfcCustomization = new VnfcCustomization();
+ vnfcCustomization.setCvnfcCustomization(setupCvnfcCustomizationList());
+ vnfcCustomization.setDescription(DESCRIPTION);
+ vnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ vnfcCustomization.setModelInstanceName(MODEL_INSTANCE_NAME);
+ vnfcCustomization.setModelInvariantUUID(MODEL_INVARIANT_UUID);
+ vnfcCustomization.setModelName(MODEL_NAME);
+ vnfcCustomization.setModelUUID(MODEL_UUID);
+ vnfcCustomization.setModelVersion(MODEL_VERSION);
+ vnfcCustomization.setToscaNodeType(TOSCA_NODE_TYPE);
+
+ assertTrue (vnfcCustomization.getDescription().equals (DESCRIPTION));
+ assertTrue (vnfcCustomization.getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
+ assertTrue (vnfcCustomization.getModelInstanceName().equals (MODEL_INSTANCE_NAME));
+ assertTrue (vnfcCustomization.getModelInvariantUUID().equals (MODEL_INVARIANT_UUID));
+ assertTrue (vnfcCustomization.getModelName().equals (MODEL_NAME));
+ assertTrue (vnfcCustomization.getModelUUID().equals (MODEL_UUID));
+ assertTrue (vnfcCustomization.getModelVersion().equals (MODEL_VERSION));
+ assertTrue (vnfcCustomization.getToscaNodeType().equals (TOSCA_NODE_TYPE));
+ assertTrue (vnfcCustomization.getCvnfcCustomization().get(0).getModelCustomizationUUID().equals (MODEL_CUSTOMIZATION_UUID));
+ }
+
+ private List<CvnfcCustomization> setupCvnfcCustomizationList(){
+ CvnfcCustomization testCvnfcCustomization = new CvnfcCustomization();
+ testCvnfcCustomization.setModelCustomizationUUID(MODEL_CUSTOMIZATION_UUID);
+ testCvnfcCustomization.setDescription(DESCRIPTION);
+ testCvnfcCustomization.setModelVersion(MODEL_VERSION);
+ testCvnfcCustomization.setModelInstanceName(MODEL_INSTANCE_NAME);
+ testCvnfcCustomization.setToscaNodeType(TOSCA_NODE_TYPE);
+ List<CvnfcCustomization> testCvnfcCustomizationList = new ArrayList();
+ testCvnfcCustomizationList.add(testCvnfcCustomization);
+ return testCvnfcCustomizationList;
+ }
+
+} \ No newline at end of file
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java
index 37a43aa529..c5ae3cc83c 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudSiteRepositoryTest.java
@@ -1,3 +1,23 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
package org.onap.so.db.catalog.data.repository;
import org.junit.Assert;
@@ -34,4 +54,4 @@ public class CloudSiteRepositoryTest extends BaseTest {
Assert.assertFalse(CollectionUtils.isEmpty(cloudSiteList));
}
-} \ No newline at end of file
+}
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepositoryTest.java
index db62759406..34c22b07b2 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepositoryTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CloudifyManagerRepositoryTest.java
@@ -1,3 +1,23 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
package org.onap.so.db.catalog.data.repository;
import org.junit.Assert;
@@ -18,4 +38,4 @@ public class CloudifyManagerRepositoryTest extends BaseTest {
Assert.assertEquals("mtn13", cloudifyManager.getId());
}
-} \ No newline at end of file
+}
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java
new file mode 100644
index 0000000000..ae3c49ec7d
--- /dev/null
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java
@@ -0,0 +1,103 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.db.catalog.data.repository;
+
+import static com.shazam.shazamcrest.MatcherAssert.assertThat;
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.so.db.catalog.BaseTest;
+import org.onap.so.db.catalog.beans.CvnfcCustomization;
+import org.onap.so.db.catalog.beans.VfModule;
+import org.onap.so.db.catalog.beans.VfModuleCustomization;
+import org.onap.so.db.catalog.beans.VnfResource;
+import org.onap.so.db.catalog.beans.VnfResourceCustomization;
+import org.onap.so.db.catalog.beans.VnfcCustomization;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+public class CvnfcCustomizationRepositoryTest extends BaseTest {
+ @Autowired
+ private CvnfcCustomizationRepository cvnfcCustomizationRepository;
+
+ @Test
+ public void findAllTest() throws Exception {
+ List<CvnfcCustomization> cvnfcCustomizationList = cvnfcCustomizationRepository.findAll();
+ Assert.assertFalse(CollectionUtils.isEmpty(cvnfcCustomizationList));
+ }
+
+ @Test
+ @Transactional
+ public void createAndGetTest() throws Exception {
+
+ CvnfcCustomization cvnfcCustomization = setUpCvnfcCustomization();
+ cvnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
+
+ VfModuleCustomization vfModuleCustomization = new VfModuleCustomization();
+ vfModuleCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
+
+ VfModule vFModule = setUpVfModule();
+ VnfResource vnfResource = setUpVnfResource();
+
+ vFModule.setVnfResources(vnfResource);
+ vfModuleCustomization.setVfModule(vFModule);
+ cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization);
+
+ VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization();
+ vnfResourceCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
+ vnfResourceCustomization.setModelInstanceName("testModelInstanceName");
+
+ List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList();
+ vnfResourceCustomizations.add(vnfResourceCustomization);
+ vnfResource.setVnfResourceCustomizations(vnfResourceCustomizations);
+ vnfResourceCustomization.setVnfResources(vnfResource);
+
+ cvnfcCustomization.setVnfResourceCustomization(vnfResourceCustomization);
+
+ VnfcCustomization vnfcCustomization = setUpVnfcCustomization();
+ vnfcCustomization.setModelCustomizationUUID("d95d704a-9ff2-11e8-98d0-529269fb1459");
+ cvnfcCustomization.setVnfcCustomization(vnfcCustomization);
+
+ cvnfcCustomizationRepository.save(cvnfcCustomization);
+
+ List<CvnfcCustomization> cvnfcCustomizationList = cvnfcCustomizationRepository.findAll();
+ boolean matchFound = false;
+ for (CvnfcCustomization foundCvnfcCustomization : cvnfcCustomizationList) {
+ if (foundCvnfcCustomization.getDescription().equalsIgnoreCase(cvnfcCustomization.getDescription())) {
+
+ assertThat(cvnfcCustomization, sameBeanAs(foundCvnfcCustomization)
+ .ignoring("id")
+ .ignoring("created")
+ .ignoring("vnfVfmoduleCvnfcConfigurationCustomization")
+ .ignoring("vnfResourceCusteModelCustomizationUUID"));
+
+ matchFound = true;
+ break;
+ }
+ }
+ Assert.assertTrue(matchFound);
+ }
+}
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepositoryTest.java
new file mode 100644
index 0000000000..52cb46f391
--- /dev/null
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfVfmoduleCvnfcConfigurationCustomizationRepositoryTest.java
@@ -0,0 +1,121 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.db.catalog.data.repository;
+
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.so.db.catalog.BaseTest;
+import org.onap.so.db.catalog.beans.ConfigurationResource;
+import org.onap.so.db.catalog.beans.CvnfcCustomization;
+import org.onap.so.db.catalog.beans.VfModule;
+import org.onap.so.db.catalog.beans.VfModuleCustomization;
+import org.onap.so.db.catalog.beans.VnfResource;
+import org.onap.so.db.catalog.beans.VnfResourceCustomization;
+import org.onap.so.db.catalog.beans.VnfVfmoduleCvnfcConfigurationCustomization;
+import org.onap.so.db.catalog.beans.VnfcCustomization;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+public class VnfVfmoduleCvnfcConfigurationCustomizationRepositoryTest extends BaseTest {
+ @Autowired
+ private VnfVfmoduleCvnfcConfigurationCustomizationRepository vnfVfmoduleCvnfcConfigurationCustomizationRepository;
+ @Autowired
+ private CvnfcCustomizationRepository cvnfcCustomizationRepository;
+
+ @Test
+ public void findAllTest() throws Exception {
+ List<VnfVfmoduleCvnfcConfigurationCustomization> vnfVfmoduleCvnfcConfigurationCustomizationList = vnfVfmoduleCvnfcConfigurationCustomizationRepository.findAll();
+ Assert.assertFalse(CollectionUtils.isEmpty(vnfVfmoduleCvnfcConfigurationCustomizationList));
+
+ VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomizationRepository.findOne(1);
+ Assert.assertTrue(vnfVfmoduleCvnfcConfigurationCustomization.getConfigurationFunction().equalsIgnoreCase("testConfigurationFunction"));
+ }
+
+ @Test
+ @Transactional
+ public void createAndGetTest() throws Exception {
+
+ VnfVfmoduleCvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new VnfVfmoduleCvnfcConfigurationCustomization();
+ vnfVfmoduleCvnfcConfigurationCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
+ vnfVfmoduleCvnfcConfigurationCustomization.setModelInstanceName("testModelInstanceName");
+ vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationType("testConfigurationType");
+ vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationRole("testConfigurationRole");
+ vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationFunction("testConfigurationFunction");
+ vnfVfmoduleCvnfcConfigurationCustomization.setPolicyName("testPolicyName");
+
+ ConfigurationResource configurationResource = new ConfigurationResource();
+ configurationResource.setModelUUID("98b42780-9f13-11e8-98d0-529269fb1459");
+ configurationResource.setModelInvariantUUID("c9338d1a-9f13-11e8-98d0-529269fb1459");
+ configurationResource.setModelVersion("testModelVertsion");
+ configurationResource.setModelName("testModelName");
+ configurationResource.setToscaNodeType("testToscaNodeType");
+ configurationResource.setDescription("testConfigurationDescription");
+ vnfVfmoduleCvnfcConfigurationCustomization.setConfigurationResource(configurationResource);
+
+ CvnfcCustomization cvnfcCustomization = setUpCvnfcCustomization();
+ cvnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
+
+ VfModuleCustomization vfModuleCustomization = new VfModuleCustomization();
+ vfModuleCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
+
+ VfModule vFModule = setUpVfModule();
+ VnfResource vnfResource = setUpVnfResource();
+
+ vFModule.setVnfResources(vnfResource);
+ vfModuleCustomization.setVfModule(vFModule);
+ cvnfcCustomization.setVfModuleCustomization(vfModuleCustomization);
+
+ VnfResourceCustomization vnfResourceCustomization = new VnfResourceCustomization();
+ vnfResourceCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
+ vnfResourceCustomization.setModelInstanceName("testModelInstanceName");
+
+ List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList();
+ vnfResourceCustomizations.add(vnfResourceCustomization);
+ vnfResource.setVnfResourceCustomizations(vnfResourceCustomizations);
+ vnfResourceCustomization.setVnfResources(vnfResource);
+
+ cvnfcCustomization.setVnfResourceCustomization(vnfResourceCustomization);
+
+ VnfcCustomization vnfcCustomization = setUpVnfcCustomization();
+ vnfcCustomization.setModelCustomizationUUID("0aa015ea-9ff3-11e8-98d0-529269fb1459");
+ cvnfcCustomization.setVnfcCustomization(vnfcCustomization);
+
+ cvnfcCustomizationRepository.save(cvnfcCustomization);
+
+ vnfVfmoduleCvnfcConfigurationCustomization.setCvnfcCustomization(cvnfcCustomization);
+ vnfVfmoduleCvnfcConfigurationCustomization.setVfModuleCustomization(vfModuleCustomization);
+ vnfVfmoduleCvnfcConfigurationCustomization.setVnfResourceCustomization(vnfResourceCustomization);
+
+ vnfVfmoduleCvnfcConfigurationCustomizationRepository.save(vnfVfmoduleCvnfcConfigurationCustomization);
+
+ VnfVfmoduleCvnfcConfigurationCustomization foundVnfVfmoduleCvnfcConfigurationCustomization = vnfVfmoduleCvnfcConfigurationCustomizationRepository.findOne(1);
+
+
+ if(foundVnfVfmoduleCvnfcConfigurationCustomization == null)
+ fail("should not be null");
+ }
+}
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfcCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfcCustomizationRepositoryTest.java
new file mode 100644
index 0000000000..0f82c8abf0
--- /dev/null
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/VnfcCustomizationRepositoryTest.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.db.catalog.data.repository;
+
+import static com.shazam.shazamcrest.MatcherAssert.assertThat;
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.so.db.catalog.BaseTest;
+import org.onap.so.db.catalog.beans.VnfcCustomization;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+public class VnfcCustomizationRepositoryTest extends BaseTest {
+ @Autowired
+ private VnfcCustomizationRepository vnfcCustomizationRepository;
+
+ @Test
+ public void findAllTest() throws Exception {
+ List<VnfcCustomization> vnfcCustomizationList = vnfcCustomizationRepository.findAll();
+ Assert.assertFalse(CollectionUtils.isEmpty(vnfcCustomizationList));
+
+ VnfcCustomization vnfcCustomization = vnfcCustomizationRepository.findOne("9bcce658-9b37-11e8-98d0-529269fb1459");
+ Assert.assertTrue(vnfcCustomization.getDescription().equalsIgnoreCase("testVnfcCustomizationDescription"));
+ }
+
+ @Test
+ @Transactional
+ public void createAndGetTest() throws Exception {
+
+ VnfcCustomization vnfcCustomization = setUpVnfcCustomization();
+ vnfcCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
+ vnfcCustomizationRepository.save(vnfcCustomization);
+
+ VnfcCustomization foundVnfcCustomization = vnfcCustomizationRepository.findOne("cf9f6efc-9f14-11e8-98d0-529269fb1459");
+
+ assertThat(vnfcCustomization, sameBeanAs(foundVnfcCustomization)
+ .ignoring("created"));
+ }
+}
diff --git a/mso-catalog-db/src/test/resources/data.sql b/mso-catalog-db/src/test/resources/data.sql
index 9da6d13e49..097cd1ecd0 100644
--- a/mso-catalog-db/src/test/resources/data.sql
+++ b/mso-catalog-db/src/test/resources/data.sql
@@ -651,3 +651,98 @@ INSERT INTO `cloud_sites` (`ID`, `REGION_ID`, `IDENTITY_SERVICE_ID`, `CLOUD_VERS
INSERT INTO `controller_selection_reference` (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) VALUES
('vLoadBalancerMS/vLoadBalancerMS 0', 'APPC', 'ConfigScaleOut'),
('vLoadBalancerMS/vLoadBalancerMS 0', 'APPC', 'HealthCheck');
+
+INSERT INTO `configuration`
+ (`model_uuid`,
+ `model_invariant_uuid`,
+ `model_version`,
+ `model_name`,
+ `tosca_node_type`,
+ `description`,
+ `creation_timestamp`)
+VALUES ( 'c59a41ca-9b3b-11e8-98d0-529269fb1459',
+ '15881e64-9b3c-11e8-98d0-529269fb1459',
+ 'testModelVersion',
+ 'testModelName',
+ 'testToscaModelType',
+ 'testConfigurationDescription',
+ '2018-07-17 14:05:08' );
+
+
+INSERT INTO `vnfc_customization`
+ (`model_customization_uuid`,
+ `model_instance_name`,
+ `model_uuid`,
+ `model_invariant_uuid`,
+ `model_version`,
+ `model_name`,
+ `tosca_node_type`,
+ `description`,
+ `creation_timestamp`)
+VALUES ( '9bcce658-9b37-11e8-98d0-529269fb1459',
+ 'testModelInstanceName',
+ 'b25735fe-9b37-11e8-98d0-529269fb1459',
+ 'ba7e6ef0-9b37-11e8-98d0-529269fb1459',
+ 'testModelVersion',
+ 'testModelName',
+ 'toscaNodeType',
+ 'testVnfcCustomizationDescription',
+ '2018-07-17 14:05:08');
+
+INSERT INTO `cvnfc_customization`
+ (`id`,
+ `model_customization_uuid`,
+ `model_instance_name`,
+ `model_uuid`,
+ `model_invariant_uuid`,
+ `model_version`,
+ `model_name`,
+ `tosca_node_type`,
+ `description`,
+ `nfc_function`,
+ `nfc_naming_code`,
+ `creation_timestamp`,
+ `vnf_resource_cust_model_customization_uuid`,
+ `vf_module_cust_model_customization_uuid`,
+ `vnfc_cust_model_customization_uuid`)
+VALUES ( '1',
+ '9bcce658-9b37-11e8-98d0-529269fb1459',
+ 'testModelInstanceName',
+ 'b25735fe-9b37-11e8-98d0-529269fb1459',
+ 'ba7e6ef0-9b37-11e8-98d0-529269fb1459',
+ 'testModelVersion',
+ 'testModelName',
+ 'testToscaNodeType',
+ 'testCvnfcCustomzationDescription',
+ 'testNfcFunction',
+ 'testNfcNamingCode',
+ '2018-07-17 14:05:08',
+ '68dc9a92-214c-11e7-93ae-92361f002671',
+ 'cb82ffd8-252a-11e7-93ae-92361f002671',
+ '9bcce658-9b37-11e8-98d0-529269fb1459');
+
+INSERT INTO vnf_vfmodule_cvnfc_configuration_customization
+ (id,
+ model_customization_uuid,
+ vnf_resource_cust_model_customization_uuid,
+ vf_module_model_customization_uuid,
+ cvnfc_model_customization_uuid,
+ model_instance_name,
+ configuration_type,
+ configuration_role,
+ configuration_function,
+ policy_name,
+ creation_timestamp,
+ configuration_model_uuid)
+VALUES ( '1',
+ '7bcce658-9b37-11e8-98d0-529269fb1450',
+ '68dc9a92-214c-11e7-93ae-92361f002671',
+ 'cb82ffd8-252a-11e7-93ae-92361f002671',
+ '9bcce658-9b37-11e8-98d0-529269fb1459',
+ 'testModelInstanceName',
+ 'testConfigurationType',
+ 'testConfigurationRole',
+ 'testConfigurationFunction',
+ 'testPolicyName',
+ '2018-07-17 14:05:08',
+ 'c59a41ca-9b3b-11e8-98d0-529269fb1459');
diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index 8a4b1f2103..6eaad260ea 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -876,3 +876,75 @@ CREATE TABLE IF NOT EXISTS `cloud_sites` (
KEY `FK_cloud_sites_identity_services` (`IDENTITY_SERVICE_ID`),
CONSTRAINT `FK_cloud_sites_identity_services` FOREIGN KEY (`IDENTITY_SERVICE_ID`) REFERENCES `identity_services` (`ID`)
) ;
+
+CREATE TABLE IF NOT EXISTS vnfc_customization (
+`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
+`MODEL_UUID` VARCHAR(200) NOT NULL,
+`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
+`MODEL_VERSION` VARCHAR(20) NOT NULL,
+`MODEL_NAME` VARCHAR(200) NOT NULL,
+`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
+`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL,
+`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`))
+ENGINE = InnoDB
+AUTO_INCREMENT = 20654
+DEFAULT CHARACTER SET = latin1;
+
+CREATE TABLE IF NOT EXISTS cvnfc_customization (
+`ID` INT(11) NOT NULL AUTO_INCREMENT,
+`MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+`MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
+`MODEL_UUID` VARCHAR(200) NOT NULL,
+`MODEL_INVARIANT_UUID` VARCHAR(200) NOT NULL,
+`MODEL_VERSION` VARCHAR(20) NOT NULL,
+`MODEL_NAME` VARCHAR(200) NOT NULL,
+`TOSCA_NODE_TYPE` VARCHAR(200) NOT NULL,
+`DESCRIPTION` VARCHAR(1200) NULL DEFAULT NULL,
+`NFC_FUNCTION` VARCHAR(200) NULL,
+`NFC_NAMING_CODE` VARCHAR(200) NULL,
+`CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+`VNFC_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL, PRIMARY KEY (`ID`), INDEX `fk_cvnfc_customization__vf_module_customization1_idx` (`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnfc_customization1_idx` (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnf_resource_customization1_idx` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC), UNIQUE INDEX `UK_cvnfc_customization` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, `VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID` ASC, `MODEL_CUSTOMIZATION_UUID` ASC), INDEX `fk_cvnfc_customization__vnf_vfmod_cvnfc_config_cust1_idx` (`MODEL_CUSTOMIZATION_UUID` ASC), CONSTRAINT `fk_cvnfc_customization__vf_module_customization1` FOREIGN KEY (`VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`) ON
+DELETE CASCADE ON
+UPDATE CASCADE, CONSTRAINT `fk_cvnfc_customization__vnfc_customization1` FOREIGN KEY (`VNFC_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnfc_customization` (`MODEL_CUSTOMIZATION_UUID`) ON
+DELETE CASCADE ON
+UPDATE CASCADE, CONSTRAINT `fk_cvnfc_customization__vnf_resource_customization1` FOREIGN KEY (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`) REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`) ON
+DELETE CASCADE ON
+UPDATE CASCADE) ENGINE = InnoDB AUTO_INCREMENT = 20654 DEFAULT CHARACTER SET = latin1;
+
+
+CREATE TABLE IF NOT EXISTS vnf_vfmodule_cvnfc_configuration_customization (
+ `ID` INT(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+ `VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+ `VF_MODULE_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+ `CVNFC_MODEL_CUSTOMIZATION_UUID` VARCHAR(200) NOT NULL,
+ `MODEL_INSTANCE_NAME` VARCHAR(200) NOT NULL,
+ `CONFIGURATION_TYPE` VARCHAR(200) NULL,
+ `CONFIGURATION_ROLE` VARCHAR(200) NULL,
+ `CONFIGURATION_FUNCTION` VARCHAR(200) NULL,
+ `POLICY_NAME` VARCHAR(200) NULL,
+ `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `CONFIGURATION_MODEL_UUID` VARCHAR(200) NOT NULL,
+ PRIMARY KEY (`ID`),
+ INDEX `fk_vnf_vfmodule_cvnfc_config_cust__configuration_idx` (`CONFIGURATION_MODEL_UUID` ASC),
+ UNIQUE INDEX `UK_vnf_vfmodule_cvnfc_configuration_customization` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC , `VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC , `CVNFC_MODEL_CUSTOMIZATION_UUID` ASC , `MODEL_CUSTOMIZATION_UUID` ASC),
+ INDEX `fk_vnf_vfmodule_cvnfc_config_cust__cvnfc_cust1_idx` (`CVNFC_MODEL_CUSTOMIZATION_UUID` ASC),
+ INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vf_module_cust_idx` (`VF_MODULE_MODEL_CUSTOMIZATION_UUID` ASC),
+ INDEX `fk_vnf_vfmodule_cvnfc_config_cust__vnf_res_cust_idx` (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID` ASC),
+ CONSTRAINT `fk_vnf_vfmod_cvnfc_config_cust__configuration_resource` FOREIGN KEY (`CONFIGURATION_MODEL_UUID`)
+ REFERENCES `configuration` (`MODEL_UUID`)
+ ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_cvnfc_configuration_customization__cvnfc_customization1` FOREIGN KEY (`CVNFC_MODEL_CUSTOMIZATION_UUID`)
+ REFERENCES `cvnfc_customization` (`MODEL_CUSTOMIZATION_UUID`)
+ ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vnf_configuration_cvnfc_customization__vf_module_customiza1` FOREIGN KEY (`VF_MODULE_MODEL_CUSTOMIZATION_UUID`)
+ REFERENCES `vf_module_customization` (`MODEL_CUSTOMIZATION_UUID`)
+ ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vfmodule_cvnfc_configuration_customization__vnf_resource_c1` FOREIGN KEY (`VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID`)
+ REFERENCES `vnf_resource_customization` (`MODEL_CUSTOMIZATION_UUID`)
+ ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=INNODB AUTO_INCREMENT=20654 DEFAULT CHARACTER SET=LATIN1;