diff options
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests')
25 files changed, 702 insertions, 7 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComponentCreationDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComponentCreationDto.java new file mode 100644 index 0000000000..a4ec05c074 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComponentCreationDto.java @@ -0,0 +1,13 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + +public class ComponentCreationDto { + private String vfcId; + + public String getVfcId() { + return vfcId; + } + + public void setVfcId(String vfcId) { + this.vfcId = vfcId; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComponentRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComponentRequestDto.java index 8d2fd4b48d..364e11936c 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComponentRequestDto.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComponentRequestDto.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. @@ -20,11 +20,19 @@ package org.openecomp.sdcrests.vendorsoftwareproducts.types; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + public class ComponentRequestDto { private String name; + @NotNull(message = "VFC displayName is mandatory.") + @Size(min = 1, max = 30,message = "VFC displayName length should be between 1 and 30.") private String displayName; + @Size(min = 0, max = 1000,message = "description length should not exceed 1000.") private String vfcCode; + private String nfcCode; + private String nfcFunction; private String description; public String getName() { @@ -58,4 +66,20 @@ public class ComponentRequestDto { public void setVfcCode(String vfcCode) { this.vfcCode = vfcCode; } + + public String getNfcCode() { + return nfcCode; + } + + public void setNfcCode(String nfcCode) { + this.nfcCode = nfcCode; + } + + public String getNfcFunction() { + return nfcFunction; + } + + public void setNfcFunction(String nfcFunction) { + this.nfcFunction = nfcFunction; + } } diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComponentValidationResultDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComponentValidationResultDto.java new file mode 100644 index 0000000000..b5456b7e88 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComponentValidationResultDto.java @@ -0,0 +1,25 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + + +import java.util.Set; + +public class ComponentValidationResultDto { + private boolean valid; + private Set<CompositionEntityValidationDataDto> validationData; + + public boolean isValid() { + return valid; + } + + public void setValid(boolean valid) { + this.valid = valid; + } + + public Set<CompositionEntityValidationDataDto> getValidationData() { + return validationData; + } + + public void setValidationData(Set<CompositionEntityValidationDataDto> validationData) { + this.validationData = validationData; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeCreationDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeCreationDto.java new file mode 100644 index 0000000000..f2b0689cd4 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeCreationDto.java @@ -0,0 +1,13 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + +public class ComputeCreationDto { + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDescription.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDescription.java new file mode 100644 index 0000000000..1c4283acfc --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDescription.java @@ -0,0 +1,31 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + +public class ComputeDescription { + private String name; + private String description; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ComputeDescription() { + + } + + public ComputeDescription(String name, String description) { + this.name = name; + this.description = description; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDetailsDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDetailsDto.java new file mode 100644 index 0000000000..4b7889b16d --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDetailsDto.java @@ -0,0 +1,34 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + +import org.hibernate.validator.constraints.NotBlank; + +import javax.validation.constraints.Pattern; +import javax.validation.constraints.Size; + +public class ComputeDetailsDto implements CompositionDataEntityDto { + @NotBlank(message = "is mandatory and should not be empty") + @Size(min = 0, max = 30, message = "length should not exceed 30 characters.") + @Pattern(regexp = "^[a-zA-Z 0-9._-]*$", message = "must match \"^[a-zA-Z 0-9._-]*$\"") + private String name; + @Size(min = 0, max = 300, message = "length should not exceed 300 characters.") + private String description; + + public ComputeDetailsDto() { + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDto.java new file mode 100644 index 0000000000..829e2c58b5 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ComputeDto.java @@ -0,0 +1,40 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + +public class ComputeDto { + private String name; + private String id; + private String description; + private boolean associatedToDeploymentFlavor; + + public boolean isAssociatedToDeploymentFlavor() { + return associatedToDeploymentFlavor; + } + + public void setAssociatedToDeploymentFlavor(boolean associatedToDeploymentFlavor) { + this.associatedToDeploymentFlavor = associatedToDeploymentFlavor; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorCreationDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorCreationDto.java new file mode 100644 index 0000000000..d4c3443deb --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorCreationDto.java @@ -0,0 +1,14 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + + +public class DeploymentFlavorCreationDto { + private String deploymentFlavorId; + + public String getDeploymentFlavorId() { + return deploymentFlavorId; + } + + public void setDeploymentFlavorId(String deploymentFlavorId) { + this.deploymentFlavorId = deploymentFlavorId; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorDto.java new file mode 100644 index 0000000000..1748603d92 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorDto.java @@ -0,0 +1,14 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + +public class DeploymentFlavorDto extends DeploymentFlavorRequestDto implements CompositionDataEntityDto { + + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorListResponseDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorListResponseDto.java new file mode 100644 index 0000000000..fe51c9ebac --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorListResponseDto.java @@ -0,0 +1,34 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + + +public class DeploymentFlavorListResponseDto { + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + private String model; + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + private String description; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + private String id; +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorRequestDto.java new file mode 100644 index 0000000000..54ce63b252 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorRequestDto.java @@ -0,0 +1,53 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + + +import org.hibernate.validator.constraints.NotBlank; +import org.openecomp.sdc.vendorsoftwareproduct.types.composition.ComponentComputeAssociation; + +import java.util.List; +import javax.validation.constraints.Pattern; +import javax.validation.constraints.Size; + +public class DeploymentFlavorRequestDto { + @NotBlank(message = "is mandatory and should not be empty") + @Pattern(regexp = "^[a-zA-Z 0-9._-]*$", message = "must match \"^[a-zA-Z 0-9._-]*$\"") + @Size(min = 0, max = 30,message = "length should not exceed 30 characters.") + private String model; + @Size(min = 0, max = 300,message = "length should not exceed 300 characters.") + private String description; + private String featureGroupId; + private List<ComponentComputeAssociation> componentComputeAssociations; + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getFeatureGroupId() { + return featureGroupId; + } + + public void setFeatureGroupId(String featureGroupId) { + this.featureGroupId = featureGroupId; + } + + public List<ComponentComputeAssociation> getComponentComputeAssociations() { + return componentComputeAssociations; + } + + public void setComponentComputeAssociations(List<ComponentComputeAssociation> componentComputeAssociations) { + this.componentComputeAssociations = componentComputeAssociations; + } + +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorValidationResultDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorValidationResultDto.java new file mode 100644 index 0000000000..d6f557c461 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/DeploymentFlavorValidationResultDto.java @@ -0,0 +1,25 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + + +import java.util.Set; + +public class DeploymentFlavorValidationResultDto { + private boolean valid; + private Set<CompositionEntityValidationDataDto> validationData; + + public boolean isValid() { + return valid; + } + + public void setValid(boolean valid) { + this.valid = valid; + } + + public Set<CompositionEntityValidationDataDto> getValidationData() { + return validationData; + } + + public void setValidationData(Set<CompositionEntityValidationDataDto> validationData) { + this.validationData = validationData; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageCreationDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageCreationDto.java new file mode 100644 index 0000000000..7e1987e4c2 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageCreationDto.java @@ -0,0 +1,14 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + +public class ImageCreationDto { + + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageDto.java new file mode 100644 index 0000000000..7b300222aa --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageDto.java @@ -0,0 +1,14 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + + +public class ImageDto extends ImageRequestDto implements CompositionDataEntityDto { + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageRequestDto.java new file mode 100644 index 0000000000..6164522dda --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ImageRequestDto.java @@ -0,0 +1,75 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + +import org.hibernate.validator.constraints.NotBlank; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; + +public class ImageRequestDto implements CompositionDataEntityDto { + + @NotBlank(message = "is mandatory and should not be empty") + @Pattern(regexp = "^[a-zA-Z 0-9._-]*$", message = "must match \"^[a-zA-Z 0-9._-]*$\"") + private String fileName; + private String description; + /*private String version; + private String format; + private String md5; + //private String providedBy;*/ + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + /*public String getMd5() { + return md5; + } + + public void setMd5(String md5) { + this.md5 = md5; + } + + public String getFormat() { + return format; + } + + public void setFormat(String format) { + this.format = format; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + /*public String getProvidedBy() { + return providedBy; + } + + public void setProvidedBy(String providedBy) { + this.providedBy = providedBy; + }*/ + +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/MibUploadStatusDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/MonitoringUploadStatusDto.java index 7331115c3f..38cd631c02 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/MibUploadStatusDto.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/MonitoringUploadStatusDto.java @@ -20,12 +20,13 @@ package org.openecomp.sdcrests.vendorsoftwareproducts.types; -public class MibUploadStatusDto { +public class MonitoringUploadStatusDto { private String snmpTrap; private String snmpPoll; + private String vesEvent; - public MibUploadStatusDto() { + public MonitoringUploadStatusDto() { } public String getSnmpTrap() { @@ -40,7 +41,16 @@ public class MibUploadStatusDto { return snmpPoll; } + public String getVesEvent() { + return vesEvent; + } + + public void setVesEvent(String vesEvent) { + this.vesEvent = vesEvent; + } + public void setSnmpPoll(String snmpPoll) { this.snmpPoll = snmpPoll; + } } diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicCreationResponseDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicCreationResponseDto.java new file mode 100644 index 0000000000..469e444a76 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicCreationResponseDto.java @@ -0,0 +1,14 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + + +public class NicCreationResponseDto { + private String nicId; + + public String getNicId() { + return nicId; + } + + public void setNicId(String nicId) { + this.nicId = nicId; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicRequestDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicRequestDto.java index bd14012eee..fba85b64ed 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicRequestDto.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/NicRequestDto.java @@ -20,11 +20,25 @@ package org.openecomp.sdcrests.vendorsoftwareproducts.types; +import org.hibernate.validator.constraints.NotBlank; +import org.openecomp.sdcrests.vendorsoftwareproducts.types.validation.ValidateString; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; + public class NicRequestDto { + @NotBlank(message = "is mandatory and should not be empty") + @Pattern(regexp = "^[a-zA-Z 0-9._-]*$", message = "must match \"^[a-zA-Z 0-9._-]*$\"") private String name; private String description; private String networkId; + @NotNull + @ValidateString(acceptedValues = {"External", "Internal"}, message = "doesn't " + + "meet the expected attribute value.", isCaseSensitive = true) + private String networkType; + + private String networkDescription; public String getName() { return name; @@ -49,4 +63,20 @@ public class NicRequestDto { public void setNetworkId(String networkId) { this.networkId = networkId; } + + public String getNetworkType(){ + return networkType; + } + + public void setNetworkType(String networkType){ + this.networkType = networkType; + } + + public String getNetworkDescription(){ + return networkDescription; + } + + public void setNetworkDescription(String networkDescription){ + this.networkDescription = networkDescription; + } } diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/OnboardingMethod.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/OnboardingMethod.java new file mode 100644 index 0000000000..3059efb171 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/OnboardingMethod.java @@ -0,0 +1,6 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + +public enum OnboardingMethod { + HEAT, + Manual; +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ValidationResponseDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ValidationResponseDto.java index d76ae665ae..bc03ec9f49 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ValidationResponseDto.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/ValidationResponseDto.java @@ -33,6 +33,8 @@ public class ValidationResponseDto { private Collection<ErrorCodeDto> licensingDataErrors; private Map<String, List<ErrorMessageDto>> uploadDataErrors; private QuestionnaireValidationResultDto questionnaireValidationResult; + private ComponentValidationResultDto componentValidationResult; + private DeploymentFlavorValidationResultDto deploymentFlavorValidationResult; public boolean isValid() { return valid; @@ -74,4 +76,23 @@ public class ValidationResponseDto { QuestionnaireValidationResultDto questionnaireValidationResult) { this.questionnaireValidationResult = questionnaireValidationResult; } + + public ComponentValidationResultDto getComponentValidationResult() { + return componentValidationResult; + } + + public void setComponentValidationResult( + ComponentValidationResultDto componentValidationResult) { + this.componentValidationResult = componentValidationResult; + } + + public DeploymentFlavorValidationResultDto getDeploymentFlavorValidationResult() { + return deploymentFlavorValidationResult; + } + + public void setDeploymentFlavorValidationResult( + DeploymentFlavorValidationResultDto deploymentFlavorValidationResult) { + this.deploymentFlavorValidationResult = deploymentFlavorValidationResult; + } + } diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VmSizing.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VmSizing.java new file mode 100644 index 0000000000..c7f9d12788 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VmSizing.java @@ -0,0 +1,72 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + +import org.openecomp.sdcrests.vendorsoftwareproducts.types.validation.ValidateString; + +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; + +public class VmSizing { + @Min(value = 1, message = "should be integer and > 0") + @Max(value = 16, message = "should be integer and <= 16") + private int numOfCPUs; + @Min(value = 1, message = "should be integer and > 0") + private int fileSystemSizeGB; + @Min(value = 1, message = "should be integer and > 0") + private int persistentStorageVolumeSize; + @Min(value = 1, message = "should be integer and > 0") + private int ioOperationsPerSec; + @ValidateString(acceptedValues = {"1:1", "4:1", "16:1"}, message = "doesn't meet the expected " + + "attribute value.") + private String cpuOverSubscriptionRatio; + @ValidateString(acceptedValues = {"1", "2", "4", "8"}, message = "doesn't meet the expected " + + "attribute value.") + private String memoryRAM; + + public int getNumOfCPUs() { + return numOfCPUs; + } + + public void setNumOfCPUs(int numOfCPUs) { + this.numOfCPUs = numOfCPUs; + } + + public int getFileSystemSizeGB() { + return fileSystemSizeGB; + } + + public void setFileSystemSizeGB(int fileSystemSizeGB) { + this.fileSystemSizeGB = fileSystemSizeGB; + } + + public int getPersistentStorageVolumeSize() { + return persistentStorageVolumeSize; + } + + public void setPersistentStorageVolumeSize(int persistentStorageVolumeSize) { + this.persistentStorageVolumeSize = persistentStorageVolumeSize; + } + + public int getIoOperationsPerSec() { + return ioOperationsPerSec; + } + + public void setIoOperationsPerSec(int ioOperationsPerSec) { + this.ioOperationsPerSec = ioOperationsPerSec; + } + + public String getCpuOverSubscriptionRatio() { + return cpuOverSubscriptionRatio; + } + + public void setCpuOverSubscriptionRatio(String cpuOverSubscriptionRatio) { + this.cpuOverSubscriptionRatio = cpuOverSubscriptionRatio; + } + + public String getMemoryRAM() { + return memoryRAM; + } + + public void setMemoryRAM(String memoryRAM) { + this.memoryRAM = memoryRAM; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspComputeDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspComputeDto.java new file mode 100644 index 0000000000..a41ae5f0af --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspComputeDto.java @@ -0,0 +1,31 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types; + +public class VspComputeDto { + private String name; + private String componentId; + private String computeFlavorId; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getComponentId() { + return componentId; + } + + public void setComponentId(String componentId) { + this.componentId = componentId; + } + + public String getComputeFlavorId() { + return computeFlavorId; + } + + public void setComputeFlavorId(String computeFlavorId) { + this.computeFlavorId = computeFlavorId; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDescriptionDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDescriptionDto.java index 92e9d74bad..80b68deeeb 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDescriptionDto.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/VspDescriptionDto.java @@ -25,9 +25,6 @@ import org.openecomp.sdcrests.common.types.VersionDto; import javax.validation.constraints.NotNull; -/** - * Created by TALIO on 4/20/2016. - */ public class VspDescriptionDto { @NotNull private String name; @@ -45,6 +42,9 @@ public class VspDescriptionDto { private VersionDto licensingVersion; // this will be populated with vlm version private LicensingData licensingData; + @NotNull + private String onboardingMethod; + public String getName() { return name; } @@ -116,4 +116,12 @@ public class VspDescriptionDto { public void setLicensingData(LicensingData licensingData) { this.licensingData = licensingData; } + + public String getOnboardingMethod() { + return onboardingMethod; + } + + public void setOnboardingMethod(String onboardingMethod) { + this.onboardingMethod = onboardingMethod; + } } diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/validation/StringValidator.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/validation/StringValidator.java new file mode 100644 index 0000000000..0fc2fd7e82 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/validation/StringValidator.java @@ -0,0 +1,36 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types.validation; + +import java.util.ArrayList; +import java.util.List; +import javax.validation.ConstraintValidator; +import javax.validation.ConstraintValidatorContext; + +public class StringValidator implements ConstraintValidator<ValidateString, String> { + + private List<String> valueList; + boolean isCaseSensitive; + + @Override + public void initialize(ValidateString constraintAnnotation) { + valueList = new ArrayList<String>(); + isCaseSensitive = constraintAnnotation.isCaseSensitive(); + for (String val : constraintAnnotation.acceptedValues()) { + if (!isCaseSensitive) { + val = val.toUpperCase(); + } + valueList.add(val); + } + } + + @Override + public boolean isValid(String value, ConstraintValidatorContext context) { + if (!isCaseSensitive) { + value = value.toUpperCase(); + } + if (value != null && !valueList.contains(value)) { + return false; + } + return true; + } + +}
\ No newline at end of file diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/validation/ValidateString.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/validation/ValidateString.java new file mode 100644 index 0000000000..1218bb1c22 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-types/src/main/java/org/openecomp/sdcrests/vendorsoftwareproducts/types/validation/ValidateString.java @@ -0,0 +1,44 @@ +package org.openecomp.sdcrests.vendorsoftwareproducts.types.validation; + +import static java.lang.annotation.ElementType.ANNOTATION_TYPE; +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.PARAMETER; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; +import javax.validation.Constraint; +import javax.validation.Payload; + +/** + * The interface Validate string. + */ +@Documented +@Constraint(validatedBy = StringValidator.class) +@Target({METHOD, FIELD, ANNOTATION_TYPE, PARAMETER, CONSTRUCTOR}) +@Retention(RUNTIME) +public @interface ValidateString { + /** + * The constant message. + */ + String message = ""; + + /** + * Accepted values string [ ]. + * + * @return the string [ ] + */ + String[] acceptedValues(); + + String message() default "{org.openecomp.sdcrests.vendorsoftwareproducts.types.validation" + + ".message}"; + + boolean isCaseSensitive() default false; + + Class<?>[] groups() default {}; + + Class<? extends Payload>[] payload() default {}; +} |