summaryrefslogtreecommitdiffstats
path: root/mso-catalog-db
diff options
context:
space:
mode:
Diffstat (limited to 'mso-catalog-db')
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudSite.java15
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcConfigurationCustomization.java4
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java4
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkTechnologyReference.java101
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java26
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceInfo.java5
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java12
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java9
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkTechnologyReferenceRepository.java (renamed from mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceInfoRepository.java)17
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/rest/beans/ServiceMacroHolder.java15
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/CvnfcCustomizationRepositoryTest.java11
-rw-r--r--mso-catalog-db/src/test/resources/data.sql2
-rw-r--r--mso-catalog-db/src/test/resources/schema.sql2
13 files changed, 170 insertions, 53 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudSite.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudSite.java
index deaa2a3221..0d7fe7d38f 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudSite.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudSite.java
@@ -93,6 +93,11 @@ public class CloudSite {
@Column(name = "CLOUDIFY_ID")
private String cloudifyId;
+ @JsonProperty("cloud_owner")
+ @BusinessKey
+ @Column(name = "CLOUD_OWNER")
+ private String cloudOwner;
+
// Derived property (set by CloudConfig loader based on identityServiceId)
@BusinessKey
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@@ -266,12 +271,20 @@ public class CloudSite {
this.identityServiceId = identityServiceId;
}
+ public String getCloudOwner() {
+ return cloudOwner;
+ }
+
+ public void setCloudOwner(String cloudOwner) {
+ this.cloudOwner = cloudOwner;
+ }
+
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("regionId", getRegionId())
.append("identityServiceId", getIdentityServiceId()).append("cloudVersion", getCloudVersion())
.append("clli", getClli()).append("cloudifyId", getCloudifyId()).append("platform", getPlatform())
- .append("orchestrator", getOrchestrator()).toString();
+ .append("orchestrator", getOrchestrator()).append("cloud-owner", getCloudOwner()).toString();
}
@Override
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcConfigurationCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcConfigurationCustomization.java
index 05d43d093c..33994bae8b 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcConfigurationCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcConfigurationCustomization.java
@@ -78,11 +78,11 @@ public class CvnfcConfigurationCustomization implements Serializable {
@Temporal(TemporalType.TIMESTAMP)
private Date created;
- @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "CONFIGURATION_MODEL_UUID")
private ConfigurationResource configurationResource;
- @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "CVNFC_CUSTOMIZATION_ID")
private CvnfcCustomization cvnfcCustomization;
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java
index 7fb328fdb5..9bf0cdd6a7 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CvnfcCustomization.java
@@ -92,11 +92,11 @@ public class CvnfcCustomization implements Serializable {
@Temporal(TemporalType.TIMESTAMP)
private Date created;
- @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "VF_MODULE_CUSTOMIZATION_ID")
private VfModuleCustomization vfModuleCustomization;
- @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "VNFC_CUST_MODEL_CUSTOMIZATION_UUID")
private VnfcCustomization vnfcCustomization;
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkTechnologyReference.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkTechnologyReference.java
new file mode 100644
index 0000000000..1f19dcc1dd
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/NetworkTechnologyReference.java
@@ -0,0 +1,101 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 Tech Mahindra
+ * ================================================================================
+ * 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 java.io.Serializable;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import com.openpojo.business.annotation.BusinessKey;
+
+@Entity
+@Table(name = "network_technology_reference")
+public class NetworkTechnologyReference implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @Column(name = "ID", nullable = false, updatable = false)
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+
+ @BusinessKey
+ @Column(name = "cloud_owner")
+ private String cloudOwner;
+
+ @BusinessKey
+ @Column(name = "network_technology")
+ private String networkTechnology;
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("id", id).append("cloudOwner", cloudOwner)
+ .append("networkTechnology", networkTechnology).toString();
+ }
+
+ @Override
+ public boolean equals(final Object other) {
+ if (!(other instanceof NetworkTechnologyReference)) {
+ return false;
+ }
+ NetworkTechnologyReference castOther = (NetworkTechnologyReference) other;
+ return new EqualsBuilder().append(cloudOwner, castOther.cloudOwner)
+ .append(networkTechnology, castOther.networkTechnology).isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(cloudOwner).append(networkTechnology).toHashCode();
+ }
+
+ public static long getSerialversionuid() {
+ return serialVersionUID;
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public String getCloudOwner() {
+ return cloudOwner;
+ }
+
+ public void setCloudOwner(String cloudOwner) {
+ this.cloudOwner = cloudOwner;
+ }
+
+ public String getNetworkTechnology() {
+ return networkTechnology;
+ }
+
+ public void setNetworkTechnology(String networkTechnology) {
+ this.networkTechnology = networkTechnology;
+ }
+
+
+
+}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
index 0d7a6dbd1f..8222b72d8f 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Service.java
@@ -79,6 +79,9 @@ public class Service implements Serializable {
@Column(name = "SERVICE_ROLE")
private String serviceRole;
+ @Column(name = "SERVICE_FUNCTION")
+ private String serviceFunction;
+
@Column(name = "ENVIRONMENT_CONTEXT")
private String environmentContext;
@@ -139,6 +142,9 @@ public class Service implements Serializable {
@OneToMany(cascade = CascadeType.ALL, mappedBy = "service")
private List<ServiceArtifact> serviceArtifactList;
+ @OneToMany(cascade = CascadeType.ALL, mappedBy = "service")
+ private List<ServiceInfo> serviceInfos;
+
@Column(name = "NAMING_POLICY")
private String namingPolicy;
@@ -385,6 +391,17 @@ public class Service implements Serializable {
this.serviceArtifactList = serviceArtifactList;
}
+ public List<ServiceInfo> getServiceInfos() {
+ if (serviceInfos == null) {
+ serviceInfos = new ArrayList<>();
+ }
+ return serviceInfos;
+ }
+
+ public void setServiceInfos(List<ServiceInfo> serviceInfos) {
+ this.serviceInfos = serviceInfos;
+ }
+
public String getWorkloadContext() {
return this.workloadContext;
}
@@ -456,4 +473,13 @@ public class Service implements Serializable {
public void setControllerActor(String controllerActor) {
this.controllerActor = controllerActor;
}
+
+ public String getServiceFunction() {
+ return serviceFunction;
+ }
+
+ public void setServiceFunction(String serviceFunction) {
+ this.serviceFunction = serviceFunction;
+ }
+
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceInfo.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceInfo.java
index f9c95767f6..d11a112c80 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceInfo.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceInfo.java
@@ -45,9 +45,8 @@ public class ServiceInfo implements Serializable {
@Column(name = "SERVICE_PROPERTIES")
private String serviceProperties;
- @OneToOne(cascade = CascadeType.ALL)
- @JoinTable(name = "service_to_service_info", joinColumns = @JoinColumn(name = "SERVICE_INFO_ID"),
- inverseJoinColumns = @JoinColumn(name = "SERVICE_MODEL_UUID"))
+ @ManyToOne(cascade = CascadeType.ALL)
+ @JoinColumn(name = "SERVICE_MODEL_UUID")
private Service service;
public Integer getId() {
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java
index 3420682900..83de95874c 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VfModuleCustomization.java
@@ -21,10 +21,9 @@
package org.onap.so.db.catalog.beans;
import java.io.Serializable;
+import java.util.ArrayList;
import java.util.Date;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
@@ -41,7 +40,6 @@ import javax.persistence.TemporalType;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.onap.so.db.catalog.beans.macro.OrchestrationFlow;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.openpojo.business.annotation.BusinessKey;
import uk.co.blackpepper.bowman.annotation.LinkedResource;
@@ -98,7 +96,7 @@ public class VfModuleCustomization implements Serializable {
private VnfResourceCustomization vnfCustomization;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "vfModuleCustomization")
- private Set<CvnfcCustomization> cvnfcCustomization;
+ private List<CvnfcCustomization> cvnfcCustomization;
@Column(name = "SKIP_POST_INSTANTIATION_CONFIGURATION")
private Boolean skipPostInstConf;
@@ -233,13 +231,13 @@ public class VfModuleCustomization implements Serializable {
}
@LinkedResource
- public Set<CvnfcCustomization> getCvnfcCustomization() {
+ public List<CvnfcCustomization> getCvnfcCustomization() {
if (cvnfcCustomization == null)
- cvnfcCustomization = new HashSet<>();
+ cvnfcCustomization = new ArrayList<>();
return cvnfcCustomization;
}
- public void setCvnfcCustomization(Set<CvnfcCustomization> cvnfcCustomization) {
+ public void setCvnfcCustomization(List<CvnfcCustomization> cvnfcCustomization) {
this.cvnfcCustomization = cvnfcCustomization;
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
index cd7edb007d..4c5bbaf7ec 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
@@ -915,7 +915,7 @@ public class CatalogDbClient {
findVnfResourceCustomizationInList(vnfCustomizationUUID, service.getVnfCustomizations());
VfModuleCustomization vfModuleCust =
findVfModuleCustomizationInList(vfModuleCustomizationUUID, vnfResourceCust.getVfModuleCustomizations());
- return vfModuleCust.getCvnfcCustomization().stream().collect(Collectors.toList());
+ return vfModuleCust.getCvnfcCustomization();
}
public VnfResourceCustomization findVnfResourceCustomizationInList(String vnfCustomizationUUID,
@@ -971,10 +971,9 @@ public class CatalogDbClient {
List<CvnfcCustomization> cvnfcCustomization =
getCvnfcCustomization(serviceModelUUID, vnfCustomizationUuid, vfModuleCustomizationUuid);
CvnfcCustomization cvnfc = findCvnfcCustomizationInAList(cvnfcCustomizationUuid, cvnfcCustomization);
- List<CvnfcConfigurationCustomization> fabricConfigs = cvnfc
- .getCvnfcConfigurationCustomization().stream().filter(cvnfcCustom -> cvnfcCustom
- .getConfigurationResource().getToscaNodeType().contains("FabricConfiguration"))
- .collect(Collectors.toList());
+ List<CvnfcConfigurationCustomization> fabricConfigs = cvnfc.getCvnfcConfigurationCustomization();
+ fabricConfigs.stream().filter(cvnfcCustom -> cvnfcCustom.getConfigurationResource().getToscaNodeType()
+ .contains("FabricConfiguration")).collect(Collectors.toList());
if (fabricConfigs != null && !fabricConfigs.isEmpty() && fabricConfigs.size() == 1) {
logger.debug("Found Fabric Configuration: {}", fabricConfigs.get(0));
return fabricConfigs.get(0);
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceInfoRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkTechnologyReferenceRepository.java
index e3a4ca264e..0b7065490b 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ServiceInfoRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/NetworkTechnologyReferenceRepository.java
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* ONAP - SO
* ================================================================================
- * Copyright (c) 2019, CMCC Technologies Co., Ltd.
+ * Copyright (C) 2019 Tech Mahindra
* ================================================================================
* 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.
@@ -20,14 +20,13 @@
package org.onap.so.db.catalog.data.repository;
-import org.onap.so.db.catalog.beans.Service;
-import org.onap.so.db.catalog.beans.ServiceInfo;
+
+import java.util.List;
+import org.onap.so.db.catalog.beans.NetworkTechnologyReference;
import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.rest.core.annotation.RepositoryRestResource;
-@RepositoryRestResource(collectionResourceRel = "serviceInfo", path = "serviceInfo")
-public interface ServiceInfoRepository extends JpaRepository<ServiceInfo, Integer> {
- ServiceInfo findByService(Service service);
+public interface NetworkTechnologyReferenceRepository extends JpaRepository<NetworkTechnologyReference, Integer> {
+ List<NetworkTechnologyReference> findAllByCloudOwner(String cloudOwner);
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/rest/beans/ServiceMacroHolder.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/rest/beans/ServiceMacroHolder.java
index ec4e922c8f..65cbb5253e 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/rest/beans/ServiceMacroHolder.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/rest/beans/ServiceMacroHolder.java
@@ -39,7 +39,6 @@ public class ServiceMacroHolder implements Serializable {
private ArrayList<AllottedResourceCustomization> allottedResourceCustomizations;
private ArrayList<VnfResourceCustomization> vnfResourceCustomizations;
private ArrayList<ServiceProxyResourceCustomization> serviceProxyResourceCustomizations;
- private ServiceInfo serviceInfo;
public ServiceMacroHolder() {
@@ -50,7 +49,6 @@ public class ServiceMacroHolder implements Serializable {
this.allottedResourceCustomizations = new ArrayList<>();
this.vnfResourceCustomizations = new ArrayList<>();
this.serviceProxyResourceCustomizations = new ArrayList<>();
- this.serviceInfo = null;
}
public ServiceMacroHolder(Service service) {
@@ -66,14 +64,6 @@ public class ServiceMacroHolder implements Serializable {
this.service = service;
}
- public ServiceInfo getServiceInfo() {
- return serviceInfo;
- }
-
- public void setServiceInfo(ServiceInfo serviceInfo) {
- this.serviceInfo = serviceInfo;
- }
-
public void setVnfResources(ArrayList<VnfResource> vnfResources) {
this.vnfResources = vnfResources;
}
@@ -165,11 +155,6 @@ public class ServiceMacroHolder implements Serializable {
} else {
sb.append("service: null");
}
- if (this.serviceInfo != null) {
- sb.append("serviceInfo: " + this.serviceInfo.toString());
- } else {
- sb.append("serviceInfo: null");
- }
if (this.vnfResourceCustomizations != null && this.vnfResourceCustomizations.size() > 0) {
int i = 0;
sb.append("VnfResources: ");
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
index e8addc4aa8..a13deae159 100644
--- 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
@@ -23,14 +23,10 @@ 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.HashSet;
import java.util.List;
-import java.util.Set;
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.CvnfcConfigurationCustomization;
import org.onap.so.db.catalog.beans.CvnfcCustomization;
import org.onap.so.db.catalog.beans.VfModule;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
@@ -45,6 +41,7 @@ public class CvnfcCustomizationRepositoryTest extends BaseTest {
@Autowired
private CvnfcCustomizationRepository cvnfcCustomizationRepository;
+
@Test
public void findAllTest() throws Exception {
List<CvnfcCustomization> cvnfcCustomizationList = cvnfcCustomizationRepository.findAll();
@@ -125,14 +122,12 @@ public class CvnfcCustomizationRepositoryTest extends BaseTest {
vnfResourceCustomization.setVnfResources(vnfResource);
-
VnfcCustomization vnfcCustomization = setUpVnfcCustomization();
vnfcCustomization.setModelCustomizationUUID("d95d704a-9ff2-11e8-98d0-529269fb1459");
-
-
cvnfcCustomizationRepository.save(cvnfcCustomization);
+
List<CvnfcCustomization> cvnfcCustomizationList =
cvnfcCustomizationRepository.findByModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
boolean matchFound = false;
@@ -173,7 +168,7 @@ public class CvnfcCustomizationRepositoryTest extends BaseTest {
vnfResourceCustomization.setModelCustomizationUUID("cf9f6efc-9f14-11e8-98d0-529269fb1459");
vnfResourceCustomization.setModelInstanceName("testModelInstanceName");
- List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList();
+ List<VnfResourceCustomization> vnfResourceCustomizations = new ArrayList<>();
vnfResourceCustomizations.add(vnfResourceCustomization);
vnfResourceCustomization.setVnfResources(vnfResource);
diff --git a/mso-catalog-db/src/test/resources/data.sql b/mso-catalog-db/src/test/resources/data.sql
index 0852aa026d..b38d4d9376 100644
--- a/mso-catalog-db/src/test/resources/data.sql
+++ b/mso-catalog-db/src/test/resources/data.sql
@@ -683,7 +683,7 @@ INSERT INTO `cloudify_managers` (`ID`, `CLOUDIFY_URL`, `USERNAME`, `PASSWORD`, `
INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `PROJECT_DOMAIN_NAME`, `USER_DOMAIN_NAME`, `ADMIN_TENANT`, `MEMBER_ROLE`, `TENANT_METADATA`, `IDENTITY_SERVER_TYPE`, `IDENTITY_AUTHENTICATION_TYPE`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('MTN13', 'http://localhost:28090/v2.0', 'm93945', '93937EA01B94A10A49279D4572B48369', NULL, NULL, 'admin', 'admin', 1, 'KEYSTONE', 'USERNAME_PASSWORD', 'MSO_USER', '2018-07-17 14:02:33', '2018-07-17 14:02:33');
-INSERT INTO `cloud_sites` (`ID`, `REGION_ID`, `IDENTITY_SERVICE_ID`, `CLOUD_VERSION`, `CLLI`, `CLOUDIFY_ID`, `PLATFORM`, `ORCHESTRATOR`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`, `SUPPORT_FABRIC`) VALUES ('mtn13', 'mtn13', 'MTN13', '2.5', 'MDT13', 'mtn13', NULL, 'orchestrator', 'MSO_USER', '2018-07-17 14:06:28', '2018-07-17 14:06:28', 1);
+INSERT INTO `cloud_sites` (`ID`, `REGION_ID`, `IDENTITY_SERVICE_ID`, `CLOUD_VERSION`, `CLLI`, `CLOUDIFY_ID`, `PLATFORM`, `ORCHESTRATOR`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`, `SUPPORT_FABRIC`,`CLOUD_OWNER`) VALUES ('mtn13', 'mtn13', 'MTN13', '2.5', 'MDT13', 'mtn13', NULL, 'orchestrator', 'MSO_USER', '2018-07-17 14:06:28', '2018-07-17 14:06:28', 1,'cloudOwner');
INSERT INTO `controller_selection_reference` (`VNF_TYPE`, `CONTROLLER_NAME`, `ACTION_CATEGORY`) VALUES
('vLoadBalancerMS/vLoadBalancerMS 0', 'APPC', 'ConfigScaleOut'),
diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index 6573def570..0d49903e51 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -121,6 +121,7 @@ CREATE TABLE `cloud_sites` (
`CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`SUPPORT_FABRIC` bit(1) NOT NULL DEFAULT 1,
+ `CLOUD_OWNER` varchar(225) NOT NULL,
PRIMARY KEY (`ID`),
KEY `FK_cloud_sites_identity_services` (`IDENTITY_SERVICE_ID`),
CONSTRAINT `FK_cloud_sites_identity_services` FOREIGN KEY (`IDENTITY_SERVICE_ID`) REFERENCES `identity_services` (`ID`)
@@ -802,6 +803,7 @@ CREATE TABLE `service` (
`TOSCA_CSAR_ARTIFACT_UUID` varchar(200) DEFAULT NULL,
`SERVICE_TYPE` varchar(200) DEFAULT NULL,
`SERVICE_ROLE` varchar(200) DEFAULT NULL,
+ `SERVICE_FUNCTION` varchar(200) DEFAULT NULL,
`ENVIRONMENT_CONTEXT` varchar(200) DEFAULT NULL,
`WORKLOAD_CONTEXT` varchar(200) DEFAULT NULL,
`SERVICE_CATEGORY` varchar(200) DEFAULT NULL,