diff options
author | Chuanyu Chen <chenchuanyu@huawei.com> | 2018-03-15 01:17:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-03-15 01:17:11 +0000 |
commit | be990b04a88144a53561152596b315b672efdb02 (patch) | |
tree | 81e38837178cefe38d8a039b81dca0174b263781 /mso-api-handlers/mso-api-handler-infra/src/main/java | |
parent | e4ff2778a38755273a093be306fc2e08721a4570 (diff) | |
parent | 0467ffa089cd478b4a2e2692c79185f02e1d8aa9 (diff) |
Merge "Update e2e models"
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java')
6 files changed, 118 insertions, 148 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java index 9f028c19f5..9d396780a2 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java @@ -452,7 +452,7 @@ public class E2EServiceInstances { RecipeLookupResult recipeLookupResult = null;
try {
db = CatalogDatabase.getInstance();
- recipeLookupResult = getServiceInstanceOrchestrationURI(db, e2eSir.getService().getTemplateId(), action);
+ recipeLookupResult = getServiceInstanceOrchestrationURI(db, e2eSir.getService().getServiceUuid(), action);
} catch (Exception e) {
msoLogger.error(MessageEnum.APIH_DB_ACCESS_EXC, MSO_PROP_APIHANDLER_INFRA, "", "",
MsoLogger.ErrorCode.AvailabilityError, "Exception while communciate with Catalog DB", e);
@@ -487,7 +487,7 @@ public class E2EServiceInstances { return response;
}
- String serviceInstanceType = e2eSir.getService().getParameters().getServiceType();
+ String serviceInstanceType = e2eSir.getService().getServiceType();
String serviceId = "";
RequestClient requestClient = null;
@@ -692,7 +692,7 @@ public class E2EServiceInstances { RecipeLookupResult recipeLookupResult = null;
try {
db = CatalogDatabase.getInstance();
- recipeLookupResult = getServiceInstanceOrchestrationURI(db, e2eSir.getService().getTemplateId(), action);
+ recipeLookupResult = getServiceInstanceOrchestrationURI(db, e2eSir.getService().getServiceUuid(), action);
} catch (Exception e) {
msoLogger.error(MessageEnum.APIH_DB_ACCESS_EXC, MSO_PROP_APIHANDLER_INFRA, "", "",
MsoLogger.ErrorCode.AvailabilityError, "Exception while communciate with Catalog DB", e);
@@ -742,7 +742,7 @@ public class E2EServiceInstances { // return response;
// }
- String serviceInstanceType = e2eSir.getService().getParameters().getServiceType();
+ String serviceInstanceType = e2eSir.getService().getServiceType();
String serviceId = "";
RequestClient requestClient = null;
@@ -962,10 +962,10 @@ public class E2EServiceInstances { ModelInfo modelInfo = new ModelInfo();
// ModelInvariantId
- modelInfo.setModelInvariantId(e2eSir.getService().getServiceDefId());
+ modelInfo.setModelInvariantId(e2eSir.getService().getServiceInvariantUuid());
// modelNameVersionId
- modelInfo.setModelNameVersionId(e2eSir.getService().getTemplateId());
+ modelInfo.setModelNameVersionId(e2eSir.getService().getServiceUuid());
// String modelInfoValue =
// e2eSir.getService().getParameters().getNodeTemplateName();
@@ -991,12 +991,7 @@ public class E2EServiceInstances { SubscriberInfo subscriberInfo = new SubscriberInfo();
// globalsubscriberId
- subscriberInfo.setGlobalSubscriberId(e2eSir.getService()
- .getParameters().getGlobalSubscriberId());
-
- // subscriberName
- subscriberInfo.setSubscriberName(e2eSir.getService().getParameters()
- .getSubscriberName());
+ subscriberInfo.setGlobalSubscriberId(e2eSir.getService().getGlobalSubscriberId());
// setting subscriberInfo to requestDetails
requestDetails.setSubscriberInfo(subscriberInfo);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EParameters.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EParameters.java index bcad1f33cc..3e17828e0a 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EParameters.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EParameters.java @@ -20,81 +20,29 @@ package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import org.codehaus.jackson.annotate.JsonIgnore; import org.codehaus.jackson.annotate.JsonIgnoreProperties; import org.codehaus.jackson.annotate.JsonProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + @JsonIgnoreProperties({ "additionalProperties" }) public class E2EParameters { - @JsonProperty("globalSubscriberId") - private String globalSubscriberId; - - @JsonProperty("subscriberName") - private String subscriberName; - - @JsonProperty("serviceType") - private String serviceType; - - @JsonProperty("templateName") - private String templateName; - + @JsonProperty("locationConstraints") + List<LocationConstraint> locationConstraints; @JsonProperty("resources") private List<ResourceRequest> resources; + @JsonProperty("requestInputs") + private HashMap<String, ?> requestInputs; + @JsonIgnore private Map<String, Object> additionalProperties = new HashMap<>(); - - /** - * @return Returns the serviceType. - */ - public String getServiceType() { - return serviceType; - } - - /** - * @param serviceType The serviceType to set. - */ - public void setServiceType(String serviceType) { - this.serviceType = serviceType; - } - - /** - * @return Returns the templateName. - */ - public String getTemplateName() { - return templateName; - } - - /** - * @param templateName The templateName to set. - */ - public void setTemplateName(String templateName) { - this.templateName = templateName; - } - - public String getGlobalSubscriberId() { - return globalSubscriberId; - } - - public void setGlobalSubscriberId(String globalSubscriberId) { - this.globalSubscriberId = globalSubscriberId; - } - - public String getSubscriberName() { - return subscriberName; - } - - public void setSubscriberName(String subscriberName) { - this.subscriberName = subscriberName; - } - public Map<String, Object> getAdditionalProperties() { return additionalProperties; } @@ -117,4 +65,19 @@ public class E2EParameters { this.resources = resources; } + public List<LocationConstraint> getLocationConstraints() { + return locationConstraints; + } + + public void setLocationConstraints(List<LocationConstraint> locationConstraints) { + this.locationConstraints = locationConstraints; + } + + public HashMap<String, ?> getRequestInputs() { + return requestInputs; + } + + public void setRequestInputs(HashMap<String, ?> requestInputs) { + this.requestInputs = requestInputs; + } } diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EService.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EService.java index 2d9ceb0a42..4466a284fe 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EService.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EService.java @@ -20,13 +20,13 @@ package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans; -import java.util.HashMap; -import java.util.Map; - import org.codehaus.jackson.annotate.JsonIgnore; import org.codehaus.jackson.annotate.JsonIgnoreProperties; import org.codehaus.jackson.annotate.JsonProperty; +import java.util.HashMap; +import java.util.Map; + @JsonIgnoreProperties({ "additionalProperties" }) public class E2EService { @@ -36,11 +36,17 @@ public class E2EService { @JsonProperty("description") private String description; - @JsonProperty("serviceDefId") - private String serviceDefId; + @JsonProperty("serviceInvariantUuid") + private String serviceInvariantUuid; + + @JsonProperty("serviceUuid") + private String serviceUuid; + + @JsonProperty("globalSubscriberId") + private String globalSubscriberId; - @JsonProperty("templateId") - private String templateId; + @JsonProperty("serviceType") + private String serviceType; @JsonProperty("parameters") private E2EParameters parameters; @@ -64,22 +70,6 @@ public class E2EService { this.description = description; } - public String getServiceDefId() { - return serviceDefId; - } - - public void setServiceDefId(String serviceDefId) { - this.serviceDefId = serviceDefId; - } - - public String getTemplateId() { - return templateId; - } - - public void setTemplateId(String templateId) { - this.templateId = templateId; - } - public E2EParameters getParameters() { return parameters; } @@ -96,4 +86,35 @@ public class E2EService { this.additionalProperties = additionalProperties; } + public String getServiceInvariantUuid() { + return serviceInvariantUuid; + } + + public void setServiceInvariantUuid(String serviceInvariantUuid) { + this.serviceInvariantUuid = serviceInvariantUuid; + } + + public String getGlobalSubscriberId() { + return globalSubscriberId; + } + + public void setGlobalSubscriberId(String globalSubscriberId) { + this.globalSubscriberId = globalSubscriberId; + } + + public String getServiceType() { + return serviceType; + } + + public void setServiceType(String serviceType) { + this.serviceType = serviceType; + } + + public String getServiceUuid() { + return serviceUuid; + } + + public void setServiceUuid(String serviceUuid) { + this.serviceUuid = serviceUuid; + } } diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/LocationConstraint.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/LocationConstraint.java index c4c0c534ac..46ab896cb5 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/LocationConstraint.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/LocationConstraint.java @@ -19,6 +19,8 @@ */ package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans; +import org.codehaus.jackson.annotate.JsonProperty; + /** * <br> * <p> @@ -32,11 +34,13 @@ public class LocationConstraint { /** * vnf profile id */ + @JsonProperty("vnfProfileId") private String vnfProfileId; /** * location constraints: vimId */ + @JsonProperty("locationConstraints") private VimLocation locationConstraints; /** diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/ResourceRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/ResourceRequest.java index 5db3c3f73d..a77c88ed3c 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/ResourceRequest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/ResourceRequest.java @@ -20,25 +20,28 @@ package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans; -import java.util.HashMap; -import java.util.Map; - import org.codehaus.jackson.annotate.JsonIgnore; import org.codehaus.jackson.annotate.JsonProperty; +import java.util.HashMap; +import java.util.Map; + public class ResourceRequest { @JsonProperty("resourceName") private String resourceName; - @JsonProperty("resourceDefId") - private String resourceDefId; + @JsonProperty("resourceInvariantUuid") + private String resourceInvariantUuid; - @JsonProperty("resourceId") - private String resourceId; + @JsonProperty("resourceUuid") + private String resourceUuid; - @JsonProperty("nsParameters") - private NsParameters nsParameters = null; + @JsonProperty("resourceCustomizationUuid") + private String resourceCustomizationUuid; + + @JsonProperty("parameters") + private E2EParameters parameters; @JsonIgnore private Map<String, Object> additionalProperties = new HashMap<>(); @@ -57,54 +60,43 @@ public class ResourceRequest { this.resourceName = resourceName; } - /** - * @return Returns the resourceDefId. - */ - public String getResourceDefId() { - return resourceDefId; + public Map<String, Object> getAdditionalProperties() { + return additionalProperties; } - /** - * @param resourceDefId The resourceDefId to set. - */ - public void setResourceDefId(String resourceDefId) { - this.resourceDefId = resourceDefId; + public void setAdditionalProperties(Map<String, Object> additionalProperties) { + this.additionalProperties = additionalProperties; } - /** - * @return Returns the resourceId. - */ - public String getResourceId() { - return resourceId; + public String getResourceInvariantUuid() { + return resourceInvariantUuid; } - /** - * @param resourceId The resourceId to set. - */ - public void setResourceId(String resourceId) { - this.resourceId = resourceId; + public void setResourceInvariantUuid(String resourceInvariantUuid) { + this.resourceInvariantUuid = resourceInvariantUuid; } - /** - * @return Returns the nsParameters. - */ - public NsParameters getNsParameters() { - return nsParameters; + public String getResourceUuid() { + return resourceUuid; } - /** - * @param nsParameters The nsParameters to set. - */ - public void setNsParameters(NsParameters nsParameters) { - this.nsParameters = nsParameters; + public void setResourceUuid(String resourceUuid) { + this.resourceUuid = resourceUuid; } - public Map<String, Object> getAdditionalProperties() { - return additionalProperties; + public String getResourceCustomizationUuid() { + return resourceCustomizationUuid; } - public void setAdditionalProperties(Map<String, Object> additionalProperties) { - this.additionalProperties = additionalProperties; + public void setResourceCustomizationUuid(String resourceCustomizationUuid) { + this.resourceCustomizationUuid = resourceCustomizationUuid; } + public E2EParameters getParameters() { + return parameters; + } + + public void setParameters(E2EParameters parameters) { + this.parameters = parameters; + } } diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/VimLocation.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/VimLocation.java index 3a72f03157..55d6c8997a 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/VimLocation.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/VimLocation.java @@ -19,16 +19,11 @@ */
package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans;
-/**
- *
- * <br>
- * <p>
- * </p>
- *
- * @author
- * @version ONAP Amsterdam Release 2017-10-18
- */
+import org.codehaus.jackson.annotate.JsonProperty;
+
public class VimLocation {
+
+ @JsonProperty("vimId")
private String vimId;
|