aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra
diff options
context:
space:
mode:
authorc00149107 <chenchuanyu@huawei.com>2017-10-23 14:52:52 +0800
committerc00149107 <chenchuanyu@huawei.com>2017-10-23 15:26:35 +0800
commit949db5ca3ba536951d5a0777d8fe64b920eb279d (patch)
tree525933540d6c39c8745116aef68b9fd7d0655d79 /mso-api-handlers/mso-api-handler-infra
parent6464a078924b23c70c16d687c9812faff334920f (diff)
Fix Issues about voLTE Create
Fix Issues about voLTE Create Change-Id: I811dc05c8f9a7caecddb279e025772d5d02c2548 Issue-ID:SO-254 Signed-off-by: c00149107 <chenchuanyu@huawei.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java32
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EParameters.java98
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/LocationConstraint.java72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/NsParameters.java (renamed from mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2ERequestParameters.java)75
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/ResourceRequest.java110
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/VimLocation.java50
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java18
7 files changed, 349 insertions, 106 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 f33774faef..921cbd0142 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
@@ -251,7 +251,7 @@ public class E2EServiceInstances {
try {
msoRequest.createRequestRecord(Status.PENDING, action);
- createOperationStatusRecord(action, requestId);
+ //createOperationStatusRecord(action, requestId);
} catch (Exception e) {
msoLogger.error(MessageEnum.APIH_DB_ACCESS_EXC_REASON, "Exception while creating record in DB", "", "",
MsoLogger.ErrorCode.SchemaError, "Exception while creating record in DB", e);
@@ -265,12 +265,9 @@ public class E2EServiceInstances {
return response;
}
- String modelInfo = e2eSir.getService().getParameters().getNodeTemplateName();
- String[] arrayOfInfo = modelInfo.split(":");
- String serviceInstanceType = arrayOfInfo[0];
+ String serviceInstanceType = e2eSir.getService().getParameters().getServiceType();
String serviceId = "";
-
RequestClient requestClient = null;
HttpResponse response = null;
@@ -468,11 +465,12 @@ public class E2EServiceInstances {
// modelNameVersionId
modelInfo.setModelNameVersionId(e2eSir.getService().getTemplateId());
- String modelInfoValue = e2eSir.getService().getParameters().getNodeTemplateName();
- String[] arrayOfInfo = modelInfoValue.split(":");
- String modelName = arrayOfInfo[0];
- String modelVersion = arrayOfInfo[1];
-
+// String modelInfoValue = e2eSir.getService().getParameters().getNodeTemplateName();
+// String[] arrayOfInfo = modelInfoValue.split(":");
+// String modelName = arrayOfInfo[0];
+// String modelVersion = arrayOfInfo[1];
+ String modelName = "voLTE";
+ String modelVersion = "1.0";
// modelName
modelInfo.setModelName(modelName);
@@ -517,19 +515,19 @@ public class E2EServiceInstances {
// Userparams
List<E2EUserParam> userParams;
- userParams = e2eSir.getService().getParameters().getRequestParameters().getUserParams();
+ //userParams = e2eSir.getService().getParameters().getRequestParameters().getUserParams();
List<Map<String, String>> userParamList = new ArrayList<>();
Map<String, String> userParamMap = new HashMap<>();
//complete json request updated in the camunda
userParamMap.put("UUIRequest", requestJSON);
userParamMap.put("ServiceInstanceName", e2eSir.getService().getName());
- Map<String, String> userParamMap3 = null;
- for (E2EUserParam userp : userParams) {
- userParamMap.put(userp.getName(), userp.getValue());
- userParamList.add(userParamMap);
- }
-
+// Map<String, String> userParamMap3 = null;
+// for (E2EUserParam userp : userParams) {
+// userParamMap.put(userp.getName(), userp.getValue());
+//
+// }
+ userParamList.add(userParamMap);
requestParameters.setUserParams(userParamList);
// setting requestParameters to requestDetails
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 0e2067e448..bcad1f33cc 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
@@ -21,6 +21,7 @@
package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.codehaus.jackson.annotate.JsonIgnore;
@@ -30,52 +31,55 @@ import org.codehaus.jackson.annotate.JsonProperty;
@JsonIgnoreProperties({ "additionalProperties" })
public class E2EParameters {
- @JsonProperty("domainHost")
- private String domainHost;
-
- @JsonProperty("nodeTemplateName")
- private String nodeTemplateName;
-
- @JsonProperty("nodeType")
- private String nodeType;
-
@JsonProperty("globalSubscriberId")
private String globalSubscriberId;
@JsonProperty("subscriberName")
private String subscriberName;
+
+ @JsonProperty("serviceType")
+ private String serviceType;
+
+ @JsonProperty("templateName")
+ private String templateName;
+
- @JsonProperty("requestParameters")
- private E2ERequestParameters requestParameters;
+ @JsonProperty("resources")
+ private List<ResourceRequest> resources;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<>();
- public String getDomainHost() {
- return domainHost;
- }
-
- public void setDomainHost(String domainHost) {
- this.domainHost = domainHost;
- }
-
- public String getNodeTemplateName() {
- return nodeTemplateName;
- }
-
- public void setNodeTemplateName(String nodeTemplateName) {
- this.nodeTemplateName = nodeTemplateName;
- }
-
- public String getNodeType() {
- return nodeType;
- }
-
- public void setNodeType(String nodeType) {
- this.nodeType = nodeType;
- }
-
- public String getGlobalSubscriberId() {
+
+ /**
+ * @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;
}
@@ -91,14 +95,6 @@ public class E2EParameters {
this.subscriberName = subscriberName;
}
- public E2ERequestParameters getRequestParameters() {
- return requestParameters;
- }
-
- public void setRequestParameters(E2ERequestParameters requestParameters) {
- this.requestParameters = requestParameters;
- }
-
public Map<String, Object> getAdditionalProperties() {
return additionalProperties;
}
@@ -106,5 +102,19 @@ public class E2EParameters {
public void setAdditionalProperties(Map<String, Object> additionalProperties) {
this.additionalProperties = additionalProperties;
}
+
+ /**
+ * @return Returns the resources.
+ */
+ public List<ResourceRequest> getResources() {
+ return resources;
+ }
+
+ /**
+ * @param resources The resources to set.
+ */
+ public void setResources(List<ResourceRequest> resources) {
+ this.resources = resources;
+ }
}
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
new file mode 100644
index 0000000000..c4c0c534ac
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/LocationConstraint.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans;
+
+/**
+ * <br>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version ONAP Amsterdam Release 2017-9-6
+ */
+public class LocationConstraint {
+
+ /**
+ * vnf profile id
+ */
+ private String vnfProfileId;
+
+ /**
+ * location constraints: vimId
+ */
+ private VimLocation locationConstraints;
+
+ /**
+ * @return Returns the vnfProfileId.
+ */
+ public String getVnfProfileId() {
+ return vnfProfileId;
+ }
+
+ /**
+ * @param vnfProfileId The vnfProfileId to set.
+ */
+ public void setVnfProfileId(String vnfProfileId) {
+ this.vnfProfileId = vnfProfileId;
+ }
+
+
+ /**
+ * @return Returns the locationConstraints.
+ */
+ public VimLocation getLocationConstraints() {
+ return locationConstraints;
+ }
+
+
+ /**
+ * @param locationConstraints The locationConstraints to set.
+ */
+ public void setLocationConstraints(VimLocation locationConstraints) {
+ this.locationConstraints = locationConstraints;
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2ERequestParameters.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/NsParameters.java
index ae8fe808f2..6121e47f83 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2ERequestParameters.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/NsParameters.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.
@@ -17,49 +17,52 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
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.JsonProperty;
-
-public class E2ERequestParameters {
-
- @JsonProperty("subscriptionServiceType")
- private String subscriptionServiceType;
-
- @JsonProperty("userParams")
- private List<E2EUserParam> userParams = null;
-
- @JsonIgnore
- private Map<String, Object> additionalProperties = new HashMap<>();
-
- public String getSubscriptionServiceType() {
- return subscriptionServiceType;
- }
-
- public void setSubscriptionServiceType(String subscriptionServiceType) {
- this.subscriptionServiceType = subscriptionServiceType;
- }
+/**
+ * <br>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version ONAP Amsterdam Release 2017-9-6
+ */
+public class NsParameters {
- public List<E2EUserParam> getUserParams() {
- return userParams;
- }
+ private List<LocationConstraint> locationConstraints;
- public void setUserParams(List<E2EUserParam> userParams) {
- this.userParams = userParams;
- }
+ private Map<String, Object> additionalParamForNs = new HashMap<String,Object>();
+ /**
+ * @return Returns the locationConstraints.
+ */
+ public List<LocationConstraint> getLocationConstraints() {
+ return locationConstraints;
+ }
- public Map<String, Object> getAdditionalProperties() {
- return additionalProperties;
- }
+ /**
+ * @param locationConstraints The locationConstraints to set.
+ */
+ public void setLocationConstraints(List<LocationConstraint> locationConstraints) {
+ this.locationConstraints = locationConstraints;
+ }
- public void setAdditionalProperties(Map<String, Object> additionalProperties) {
- this.additionalProperties = additionalProperties;
- }
+
+ /**
+ * @return Returns the additionalParamForNs.
+ */
+ public Map<String, Object> getAdditionalParamForNs() {
+ return additionalParamForNs;
+ }
+
+ /**
+ * @param additionalParamForNs The additionalParamForNs to set.
+ */
+ public void setAdditionalParamForNs(Map<String, Object> additionalParamForNs) {
+ this.additionalParamForNs = additionalParamForNs;
+ }
}
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
new file mode 100644
index 0000000000..5db3c3f73d
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/ResourceRequest.java
@@ -0,0 +1,110 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class ResourceRequest {
+
+ @JsonProperty("resourceName")
+ private String resourceName;
+
+ @JsonProperty("resourceDefId")
+ private String resourceDefId;
+
+ @JsonProperty("resourceId")
+ private String resourceId;
+
+ @JsonProperty("nsParameters")
+ private NsParameters nsParameters = null;
+
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<>();
+
+ /**
+ * @return Returns the resourceName.
+ */
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ /**
+ * @param resourceName The resourceName to set.
+ */
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ /**
+ * @return Returns the resourceDefId.
+ */
+ public String getResourceDefId() {
+ return resourceDefId;
+ }
+
+ /**
+ * @param resourceDefId The resourceDefId to set.
+ */
+ public void setResourceDefId(String resourceDefId) {
+ this.resourceDefId = resourceDefId;
+ }
+
+ /**
+ * @return Returns the resourceId.
+ */
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ /**
+ * @param resourceId The resourceId to set.
+ */
+ public void setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ /**
+ * @return Returns the nsParameters.
+ */
+ public NsParameters getNsParameters() {
+ return nsParameters;
+ }
+
+ /**
+ * @param nsParameters The nsParameters to set.
+ */
+ public void setNsParameters(NsParameters nsParameters) {
+ this.nsParameters = nsParameters;
+ }
+
+ public Map<String, Object> getAdditionalProperties() {
+ return additionalProperties;
+ }
+
+ public void setAdditionalProperties(Map<String, Object> additionalProperties) {
+ this.additionalProperties = additionalProperties;
+ }
+
+}
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
new file mode 100644
index 0000000000..3a72f03157
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/VimLocation.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans;
+
+/**
+ *
+ * <br>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version ONAP Amsterdam Release 2017-10-18
+ */
+public class VimLocation {
+ private String vimId;
+
+
+ /**
+ * @return Returns the vimId.
+ */
+ public String getVimId() {
+ return vimId;
+ }
+
+
+ /**
+ * @param vimId The vimId to set.
+ */
+ public void setVimId(String vimId) {
+ this.vimId = vimId;
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java
index b247d81d7f..203c41e9e5 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java
@@ -111,7 +111,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"domainHost\":\"localhost\",\"nodeTemplateName\":\"modelName:v3\",\"nodeType\":\"service\",\"globalSubscriberId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"subscriberName\":\"NEED THIS UUI - AAI\",\"requestParameters\":{\"subscriptionServiceType\":\"MOG\",\"userParams\":[{\"name\":\"someUserParam\",\"value\":\"someValue\"},{\"name\":\"segments\",\"value\":\"value\"},{\"name\":\"nsParameters\",\"value\":\"othervalue\"}]}}}}";
+ String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"globalSubscriberId\":\"123457\", \"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"MOG\",\"resourceDefId\":\"MOG\",\"resourceId\":\"MOG\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-vBAS-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}},{\"vnfProfileId\":\"zte-vMME-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}}],\"additionalParamForNs\":{}}}]}}}";
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.indexOf("Exception while creating record in DB null") != -1);
@@ -175,7 +175,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"domainHost\":\"localhost\",\"nodeTemplateName\":\"modelName:v3\",\"nodeType\":\"service\",\"globalSubscriberId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"subscriberName\":\"NEED THIS UUI - AAI\",\"requestParameters\":{\"subscriptionServiceType\":\"MOG\",\"userParams\":[{\"name\":\"someUserParam\",\"value\":\"someValue\"},{\"name\":\"segments\",\"value\":\"value\"},{\"name\":\"nsParameters\",\"value\":\"othervalue\"}]}}}}";
+ String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"globalSubscriberId\":\"123457\", \"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"MOG\",\"resourceDefId\":\"MOG\",\"resourceId\":\"MOG\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-vBAS-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}},{\"vnfProfileId\":\"zte-vMME-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}}],\"additionalParamForNs\":{}}}]}}}";
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.indexOf("Exception while creating record in DB null") != -1);
@@ -239,7 +239,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"domainHost\":\"localhost\",\"nodeTemplateName\":\"modelName:v3\",\"nodeType\":\"service\",\"globalSubscriberId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"subscriberName\":\"NEED THIS UUI - AAI\",\"requestParameters\":{\"subscriptionServiceType\":\"MOG\",\"userParams\":[{\"name\":\"someUserParam\",\"value\":\"someValue\"},{\"name\":\"segments\",\"value\":\"value\"},{\"name\":\"nsParameters\",\"value\":\"othervalue\"}]}}}}";
+ String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"globalSubscriberId\":\"123457\", \"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"MOG\",\"resourceDefId\":\"MOG\",\"resourceId\":\"MOG\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-vBAS-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}},{\"vnfProfileId\":\"zte-vMME-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}}],\"additionalParamForNs\":{}}}]}}}";
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.indexOf("Exception while creating record in DB null") != -1);
@@ -291,7 +291,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"domainHost\":\"localhost\",\"nodeTemplateName\":\"modelName:v3\",\"nodeType\":\"service\",\"globalSubscriberId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"subscriberName\":\"NEED THIS UUI - AAI\",\"requestParameters\":{\"subscriptionServiceType\":\"MOG\",\"userParams\":[{\"name\":\"someUserParam\",\"value\":\"someValue\"},{\"name\":\"segments\",\"value\":\"value\"},{\"name\":\"nsParameters\",\"value\":\"othervalue\"}]}}}}";
+ String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"globalSubscriberId\":\"123457\", \"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"MOG\",\"resourceDefId\":\"MOG\",\"resourceId\":\"MOG\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-vBAS-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}},{\"vnfProfileId\":\"zte-vMME-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}}],\"additionalParamForNs\":{}}}]}}}";
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.indexOf("Exception while creating record in DB null") != -1);
@@ -340,7 +340,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"domainHost\":\"localhost\",\"nodeTemplateName\":\"modelName:v3\",\"nodeType\":\"service\",\"globalSubscriberId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"subscriberName\":\"NEED THIS UUI - AAI\",\"requestParameters\":{\"subscriptionServiceType\":\"MOG\",\"userParams\":[{\"name\":\"someUserParam\",\"value\":\"someValue\"},{\"name\":\"segments\",\"value\":\"value\"},{\"name\":\"nsParameters\",\"value\":\"othervalue\"}]}}}}";
+ String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"globalSubscriberId\":\"123457\", \"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"MOG\",\"resourceDefId\":\"MOG\",\"resourceId\":\"MOG\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-vBAS-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}},{\"vnfProfileId\":\"zte-vMME-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}}],\"additionalParamForNs\":{}}}]}}}";
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.indexOf("Exception while creating record in DB null") != -1);
@@ -370,7 +370,7 @@ public class E2EServiceInstancesTest {
}
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"domainHost\":\"localhost\",\"nodeTemplateName\":\"modelName:v3\",\"nodeType\":\"service\",\"globalSubscriberId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"subscriberName\":\"NEED THIS UUI - AAI\",\"requestParameters\":{\"subscriptionServiceType\":\"MOG\",\"userParams\":[{\"name\":\"someUserParam\",\"value\":\"someValue\"},{\"name\":\"segments\",\"value\":\"value\"},{\"name\":\"nsParameters\",\"value\":\"othervalue\"}]}}}}";
+ String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"globalSubscriberId\":\"123457\", \"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"MOG\",\"resourceDefId\":\"MOG\",\"resourceId\":\"MOG\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-vBAS-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}},{\"vnfProfileId\":\"zte-vMME-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}}],\"additionalParamForNs\":{}}}]}}}";
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.indexOf("Exception while creating record in DB null") != -1);
@@ -422,7 +422,7 @@ public class E2EServiceInstancesTest {
}
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"domainHost\":\"localhost\",\"nodeTemplateName\":\"modelName:v3\",\"nodeType\":\"service\",\"globalSubscriberId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"subscriberName\":\"NEED THIS UUI - AAI\",\"requestParameters\":{\"subscriptionServiceType\":\"MOG\",\"userParams\":[{\"name\":\"someUserParam\",\"value\":\"someValue\"},{\"name\":\"segments\",\"value\":\"value\"},{\"name\":\"nsParameters\",\"value\":\"othervalue\"}]}}}}";
+ String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"globalSubscriberId\":\"123457\", \"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"MOG\",\"resourceDefId\":\"MOG\",\"resourceId\":\"MOG\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-vBAS-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}},{\"vnfProfileId\":\"zte-vMME-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}}],\"additionalParamForNs\":{}}}]}}}";
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.indexOf("The existing request must finish or be cleaned up before proceeding.") != -1);
@@ -447,7 +447,7 @@ public class E2EServiceInstancesTest {
@Test
public void createE2EServiceInstanceTestDBQueryFail(){
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"domainHost\":\"localhost\",\"nodeTemplateName\":\"modelName:v3\",\"nodeType\":\"service\",\"globalSubscriberId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"subscriberName\":\"NEED THIS UUI - AAI\",\"requestParameters\":{\"subscriptionServiceType\":\"MOG\",\"userParams\":[{\"name\":\"someUserParam\",\"value\":\"someValue\"},{\"name\":\"segments\",\"value\":\"value\"},{\"name\":\"nsParameters\",\"value\":\"othervalue\"}]}}}}";
+ String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"globalSubscriberId\":\"123457\", \"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"MOG\",\"resourceDefId\":\"MOG\",\"resourceId\":\"MOG\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-vBAS-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}},{\"vnfProfileId\":\"zte-vMME-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}}],\"additionalParamForNs\":{}}}]}}}";
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.indexOf("SVC2000") != -1);
@@ -465,7 +465,7 @@ public class E2EServiceInstancesTest {
@Test
public void deleteE2EServiceInstanceTestNormal(){
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"domainHost\":\"localhost\",\"nodeTemplateName\":\"modelName:v3\",\"nodeType\":\"service\",\"globalSubscriberId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"subscriberName\":\"NEED THIS UUI - AAI\",\"requestParameters\":{\"subscriptionServiceType\":\"MOG\",\"userParams\":[{\"name\":\"someUserParam\",\"value\":\"someValue\"},{\"name\":\"segments\",\"value\":\"value\"},{\"name\":\"nsParameters\",\"value\":\"othervalue\"}]}}}}";
+ String request = "{\"service\":{\"name\":\"service\",\"description\":\"so_test1\",\"serviceDefId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"templateId\":\"4050083f-465f-4838-af1e-47a545222ad1\",\"parameters\":{\"globalSubscriberId\":\"123457\", \"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"MOG\",\"resourceDefId\":\"MOG\",\"resourceId\":\"MOG\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-vBAS-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}},{\"vnfProfileId\":\"zte-vMME-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"}}],\"additionalParamForNs\":{}}}]}}}";
Response resp = instance.deleteE2EServiceInstance(request, "v3", "12345678");
String respStr = resp.getEntity().toString();
assertTrue(respStr.indexOf("SVC2000") != -1);