diff options
Diffstat (limited to 'mso-catalog-db')
6 files changed, 43 insertions, 4 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 053bf745e1..deaa2a3221 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 @@ -7,9 +7,9 @@ * 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. @@ -120,6 +120,11 @@ public class CloudSite { @Temporal(TemporalType.TIMESTAMP) private Date updated; + @JsonProperty("support_fabric") + @BusinessKey + @Column(name = "SUPPORT_FABRIC") + private Boolean supportFabric = true; + @Transient private URI uri; @@ -142,6 +147,7 @@ public class CloudSite { this.platform = site.getPlatform(); this.regionId = site.getRegionId(); this.identityServiceId = site.getIdentityServiceId(); + this.supportFabric = site.getSupportFabric(); } @@ -247,6 +253,14 @@ public class CloudSite { this.identityService = identity; } + public Boolean getSupportFabric() { + return supportFabric; + } + + public void setSupportFabric(Boolean supportFabric) { + this.supportFabric = supportFabric; + } + @Deprecated public void setIdentityServiceId(String identityServiceId) { this.identityServiceId = identityServiceId; diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceRecipe.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceRecipe.java index 5a241afc3a..9e98041cf8 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceRecipe.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServiceRecipe.java @@ -25,7 +25,8 @@ import java.util.Date; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; -import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; @@ -46,6 +47,7 @@ public class ServiceRecipe implements Serializable, Recipe { @Id @Column(name = "id") + @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @BusinessKey @@ -116,6 +118,7 @@ public class ServiceRecipe implements Serializable, Recipe { super(); } + @Override public Integer getId() { return id; } @@ -136,6 +139,7 @@ public class ServiceRecipe implements Serializable, Recipe { this.serviceModelUUID = serviceModelUUID; } + @Override public String getAction() { return action; } @@ -144,6 +148,7 @@ public class ServiceRecipe implements Serializable, Recipe { this.action = action; } + @Override public String getDescription() { return description; } @@ -152,6 +157,7 @@ public class ServiceRecipe implements Serializable, Recipe { this.description = description; } + @Override public String getOrchestrationUri() { return orchestrationUri; } @@ -160,6 +166,7 @@ public class ServiceRecipe implements Serializable, Recipe { this.orchestrationUri = orchestrationUri; } + @Override public String getParamXsd() { return paramXsd; } @@ -168,6 +175,7 @@ public class ServiceRecipe implements Serializable, Recipe { this.paramXsd = paramXsd; } + @Override public Integer getRecipeTimeout() { return recipeTimeout; } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfComponentsRecipe.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfComponentsRecipe.java index 58e7c6c61c..89121bc7e1 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfComponentsRecipe.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfComponentsRecipe.java @@ -23,6 +23,8 @@ 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; @@ -38,6 +40,7 @@ public class VnfComponentsRecipe implements Serializable, Recipe { @Id @Column(name = "id") + @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @BusinessKey @@ -92,6 +95,7 @@ public class VnfComponentsRecipe implements Serializable, Recipe { .toHashCode(); } + @Override public Integer getId() { return id; } @@ -100,6 +104,7 @@ public class VnfComponentsRecipe implements Serializable, Recipe { this.id = id; } + @Override public String getAction() { return action; } @@ -108,6 +113,7 @@ public class VnfComponentsRecipe implements Serializable, Recipe { this.action = action; } + @Override public String getDescription() { return description; } @@ -132,6 +138,7 @@ public class VnfComponentsRecipe implements Serializable, Recipe { this.vnfType = vnfType; } + @Override public String getParamXsd() { return paramXsd; } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfRecipe.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfRecipe.java index 8bf45b52c7..ef3d8761c1 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfRecipe.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfRecipe.java @@ -24,6 +24,8 @@ import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.PrePersist; import javax.persistence.Table; @@ -42,6 +44,7 @@ public class VnfRecipe implements Serializable, Recipe { @Id @Column(name = "id") + @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @BusinessKey @@ -117,6 +120,7 @@ public class VnfRecipe implements Serializable, Recipe { this.nfRole = nfRole; } + @Override public String getParamXsd() { return paramXsd; } @@ -133,6 +137,7 @@ public class VnfRecipe implements Serializable, Recipe { this.vfModuleId = vfModuleId; } + @Override public Integer getId() { return id; } @@ -141,6 +146,7 @@ public class VnfRecipe implements Serializable, Recipe { this.id = id; } + @Override public String getAction() { return action; } @@ -149,6 +155,7 @@ public class VnfRecipe implements Serializable, Recipe { this.action = action; } + @Override public String getDescription() { return description; } @@ -157,6 +164,7 @@ public class VnfRecipe implements Serializable, Recipe { this.description = description; } + @Override public String getOrchestrationUri() { return orchestrationUri; } @@ -165,6 +173,7 @@ public class VnfRecipe implements Serializable, Recipe { this.orchestrationUri = orchestrationUri; } + @Override public Integer getRecipeTimeout() { return recipeTimeout; } diff --git a/mso-catalog-db/src/test/resources/data.sql b/mso-catalog-db/src/test/resources/data.sql index 13ab018a27..eaad15ca57 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`) VALUES ('mtn13', 'mtn13', 'MTN13', '2.5', 'MDT13', 'mtn13', NULL, 'orchestrator', 'MSO_USER', '2018-07-17 14:06:28', '2018-07-17 14:06:28'); +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 `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 7468f62ecb..73370e1078 100644 --- a/mso-catalog-db/src/test/resources/schema.sql +++ b/mso-catalog-db/src/test/resources/schema.sql @@ -120,6 +120,7 @@ CREATE TABLE `cloud_sites` ( `LAST_UPDATED_BY` varchar(120) DEFAULT NULL, `CREATION_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `UPDATE_TIMESTAMP` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + `SUPPORT_FABRIC` bit(1) NOT NULL DEFAULT 1, 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`) |