summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-vnf-adapter/pom.xml5
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/AriaVduPlugin.java305
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/CSAR.java185
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy59
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/GenericResourceApi.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/ServiceRpcInputEntityBuilder.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInformationEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInputPaarametersEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRequestInputEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkResponseInformationEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationInputEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationOutputEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/OnapModelInformationEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ParamEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RequestInformationEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationInputEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationOutputEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationInputEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationOutputEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/SdncRequestHeaderEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInformationEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInputParametersEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceRequestInputEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceResponseInformationEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationInputEntity.java3
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationOutputEntity.java3
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java19
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EParameters.java85
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EService.java67
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/LocationConstraint.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/ResourceRequest.java78
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/VimLocation.java13
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java104
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java42
42 files changed, 723 insertions, 335 deletions
diff --git a/adapters/mso-vnf-adapter/pom.xml b/adapters/mso-vnf-adapter/pom.xml
index 9a290f4f00..643f42f2ba 100644
--- a/adapters/mso-vnf-adapter/pom.xml
+++ b/adapters/mso-vnf-adapter/pom.xml
@@ -145,6 +145,11 @@
<version>${project.version}</version>
</dependency>
<dependency>
+ <groupId>org.onap.so</groupId>
+ <artifactId>aria-client</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<version>1.8</version>
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/AriaVduPlugin.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/AriaVduPlugin.java
new file mode 100644
index 0000000000..5258b978cc
--- /dev/null
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/AriaVduPlugin.java
@@ -0,0 +1,305 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. 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.adapters.vnf;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import com.gigaspaces.aria.rest.client.AriaClient;
+import com.gigaspaces.aria.rest.client.AriaClientFactory;
+import com.gigaspaces.aria.rest.client.ExecutionDetails;
+import com.gigaspaces.aria.rest.client.Input;
+import com.gigaspaces.aria.rest.client.InputImpl;
+import com.gigaspaces.aria.rest.client.Output;
+import com.gigaspaces.aria.rest.client.Service;
+import com.gigaspaces.aria.rest.client.ServiceTemplate;
+import com.gigaspaces.aria.rest.client.ServiceTemplateImpl;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.openstack.exceptions.MsoAdapterException;
+import org.openecomp.mso.openstack.exceptions.MsoException;
+import org.openecomp.mso.vdu.utils.VduBlueprint;
+import org.openecomp.mso.vdu.utils.VduInfo;
+import org.openecomp.mso.vdu.utils.VduPlugin;
+import org.openecomp.mso.vdu.utils.VduStatus;
+
+/**
+ * ARIA VDU Plugin. Pluggable interface for the ARIA REST API to support TOSCA
+ * orchestration.
+ *
+ * @author DeWayne
+ *
+ */
+public class AriaVduPlugin implements VduPlugin {
+ private static final String API_VERSION = "0.1";
+ private static final MsoLogger logger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA);
+ private AriaClient client=null;
+ private Map<String,Integer> templateIds = new HashMap<>();
+ private Map<String,Integer> serviceIds = new HashMap<>();
+ private Map<String,Map<String,Object>> inputsCache = new HashMap<>();
+
+ public AriaVduPlugin() {
+ super();
+ }
+
+ public AriaVduPlugin( String host, int port) {
+ try {
+ client = new AriaClientFactory().createRestClient("http", host, port, API_VERSION);
+ }catch(Exception e) {
+ logger.error (MessageEnum.RA_CREATE_VNF_ERR, "", "", "", "", "aria", MsoLogger.ErrorCode.AvailabilityError, "Connection to ARIA REST API failed", e);
+ throw e;
+ }
+ }
+
+ /**
+ * Instantiate VDU in ARIA. <code>vduInstanceName</code> is used for both service template
+ * name and service name.<
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public VduInfo instantiateVdu(String cloudSiteId, String tenantId, String vduInstanceName,
+ VduBlueprint vduBlueprint, Map<String, ? extends Object> inputs, String environmentFile, int timeoutMinutes,
+ boolean suppressBackout) throws MsoException {
+
+ VduInfo vinfo = new VduInfo(vduInstanceName);
+ byte[] csar = new CSAR(vduBlueprint).create();
+ ServiceTemplate template = new ServiceTemplateImpl( vduInstanceName, csar);
+ try {
+ client.install_service_template(template);
+ }
+ catch(Exception e) {
+ logger.error(MessageEnum.RA_CREATE_VNF_ERR, "","","","", vduInstanceName, MsoLogger.ErrorCode.BusinessProcesssError,
+ "instantiate vdu via csar failed", e);
+ throw new MsoAdapterException(e.getMessage());
+ }
+
+ /**
+ * Create a service
+ */
+
+ try {
+ int templateId=-1;
+ for(ServiceTemplate stemplate:(List<ServiceTemplate>)client.list_service_templates()) {
+ if(stemplate.getName().equals(vduInstanceName)) {
+ templateId = stemplate.getId();
+ }
+ }
+ List<Input> sinputs = new ArrayList<Input>();
+ for(Map.Entry<String, ? extends Object> entry: inputs.entrySet()) {
+ Input inp = new InputImpl(entry.getKey(),entry.getValue().toString(),"");
+ sinputs.add(inp);
+ }
+ client.create_service(templateId, vduInstanceName, sinputs);
+ }
+ catch(Exception e) {
+ logger.error(MessageEnum.RA_CREATE_VNF_ERR, "","","","", vduInstanceName, MsoLogger.ErrorCode.BusinessProcesssError,
+ "aria service creation failed", e);
+ throw new MsoAdapterException(e.getMessage());
+ }
+
+ // Get the service ID and cache it
+ int sid = getServiceId(vduInstanceName);
+ serviceIds.put(vduInstanceName, sid);
+
+ /**
+ * Run install
+ */
+
+ try {
+ client.start_execution( sid, "install", new ExecutionDetails());
+ }
+ catch(Exception e) {
+ logger.error(MessageEnum.RA_CREATE_VNF_ERR, "","","","", vduInstanceName, MsoLogger.ErrorCode.BusinessProcesssError,
+ "aria install workflow failed", e);
+ throw new MsoAdapterException(e.getMessage());
+ }
+
+ /**
+ * Get the outputs and return
+ */
+
+ try {
+ Map<String,Object> voutputs = getOutputs(sid);
+
+ VduInfo vi = new VduInfo(vduInstanceName);
+ vi.setInputs((Map<String,Object>)inputs);
+ inputsCache.put(vduInstanceName,vi.getInputs());
+ vi.setOutputs(voutputs);
+ vi.setStatus(VduStatus.INSTANTIATED);
+ return vi;
+ }
+ catch(Exception e) {
+ logger.error(MessageEnum.RA_CREATE_VNF_ERR, "","","","", vduInstanceName, MsoLogger.ErrorCode.BusinessProcesssError,
+ "aria service output fetch failed", e);
+ throw new MsoAdapterException(e.getMessage());
+ }
+
+ }
+
+ /**
+ * Queries ARIA for VDU status. vduInstanceId used as template and service name in ARIA (by convention).
+ */
+ @Override
+ public VduInfo queryVdu(String cloudSiteId, String tenantId, String vduInstanceId) throws MsoException {
+ if(client == null) {
+ throw new MsoAdapterException("Internal error: no ARIA connection found");
+ }
+
+ VduInfo vif = new VduInfo(vduInstanceId);
+ Integer sid = serviceIds.get(vduInstanceId);
+ if(sid == null) {
+ // service doesn't exist
+ vif.setStatus(VduStatus.NOTFOUND);
+ return vif;
+ }
+ Service service = client.get_service(sid);
+ if(service == null) {
+ throw new MsoAdapterException(String.format("Internal error: cached service id %s not found in ARIA",sid));
+ }
+ Map<String,Object> voutputs = getOutputs(sid);
+ vif.setOutputs(voutputs);
+ vif.setInputs(inputsCache.get(vduInstanceId));
+ vif.setStatus(VduStatus.INSTANTIATED);
+ return vif;
+ }
+
+ @Override
+ public VduInfo deleteVdu(String cloudSiteId, String tenantId, String vduInstanceId, int timeoutMinutes,
+ boolean keepBlueprintLoaded) throws MsoException {
+
+ if(client == null) {
+ throw new MsoAdapterException("Internal error: no ARIA connection found");
+ }
+ Integer sid = serviceIds.get(vduInstanceId);
+ VduInfo vif = new VduInfo(vduInstanceId);
+ if(sid == null) {
+ // service doesn't exist
+ vif.setStatus(VduStatus.NOTFOUND);
+ return vif;
+ }
+
+ /**
+ * Run uninstall
+ */
+ try {
+ client.start_execution( sid, "uninstall", new ExecutionDetails());
+ }
+ catch(Exception e) {
+ logger.error(MessageEnum.RA_CREATE_VNF_ERR, "","","","", vduInstanceId, MsoLogger.ErrorCode.BusinessProcesssError,
+ "aria uninstall workflow failed", e);
+ throw new MsoAdapterException(e.getMessage());
+ }
+
+ /**
+ * Delete the service
+ */
+ try {
+ client.delete_service(sid);
+ }
+ catch(Exception e) {
+ logger.error(MessageEnum.RA_CREATE_VNF_ERR, "","","","", vduInstanceId, MsoLogger.ErrorCode.BusinessProcesssError,
+ String.format("aria service delete failed. Service id: %d",sid), e);
+ throw new MsoAdapterException(e.getMessage());
+ }
+
+ /**
+ * Delete the blueprint
+ */
+ try {
+ client.delete_service_template(templateIds.get(vduInstanceId));
+ }
+ catch(Exception e) {
+ logger.error(MessageEnum.RA_CREATE_VNF_ERR, "","","","", vduInstanceId, MsoLogger.ErrorCode.BusinessProcesssError,
+ "aria template delete failed", e);
+ throw new MsoAdapterException(e.getMessage());
+ }
+
+ vif.setStatus(VduStatus.DELETED);
+ return vif;
+ }
+
+ /**
+ * Deployment update not possible with ARIA
+ */
+ @Override
+ public VduInfo updateVdu(String cloudSiteId, String tenantId, String vduInstanceId, VduBlueprint vduBlueprint,
+ Map<String, ? extends Object> inputs, String environmentFile, int timeoutMinutes) throws MsoException {
+ throw new MsoAdapterException("NOT IMPLEMENTED");
+ }
+
+ /**
+ * Nonsensical in the context of ARIA: blueprint lifespan = vdulifespan
+ */
+ @Override
+ public boolean isBlueprintLoaded(String cloudSiteId, String vduModelId) throws MsoException {
+ throw new MsoAdapterException("NOT IMPLEMENTED");
+ }
+
+ /**
+ * Nonsensical in the context of ARIA: blueprint lifespan = vdulifespan
+ */
+ @Override
+ public void uploadBlueprint(String cloudSiteId, VduBlueprint vduBlueprint, boolean failIfExists)
+ throws MsoException {
+ throw new MsoAdapterException("NOT IMPLEMENTED");
+ }
+
+ @Override
+ public boolean blueprintUploadSupported() {
+ return false;
+ }
+
+ /**
+ * Private
+ */
+
+ /**p
+ * Gets and repacks service outputs for internal use
+ * @param sid the service id (ARIA service id)
+ * @return
+ */
+ private Map<String,Object> getOutputs(int sid) {
+ @SuppressWarnings("unchecked")
+ List<Output> outputs=(List<Output>)client.list_service_outputs(sid);
+ Map<String,Object> voutputs = new HashMap<>();
+ for(Output output: outputs) {
+ voutputs.put(output.getName(), output.getValue());
+ }
+ return voutputs;
+ }
+
+ @SuppressWarnings("unchecked")
+ private int getServiceId(String service_name) throws MsoAdapterException{
+ int sid = -1;
+ List<Service> services = (List<Service>)client.list_services();
+ for(Service service:services) {
+ if(service.getName().equals(service_name)) {
+ sid = service.getId();
+ }
+ }
+ if(sid == -1) {
+ throw new MsoAdapterException(String.format("Internal error: just created service not found: %s",service_name));
+ }
+ return sid;
+ }
+
+}
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/CSAR.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/CSAR.java
new file mode 100644
index 0000000000..8bea228629
--- /dev/null
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/CSAR.java
@@ -0,0 +1,185 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2017 Cloudify.co. 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.adapters.vnf;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.util.Map;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import org.openecomp.mso.vdu.utils.VduBlueprint;
+
+import com.google.common.io.Files;
+
+/**
+ * The purpose of this class is to create a CSAR byte array from Vdu inputs for the purpose
+ * of forwarding to a TOSCA orchestrator.
+ *
+ * @author DeWayne
+ *
+ */
+public class CSAR {
+ private static final String MANIFEST_FILENAME = "MANIFEST.MF";
+
+ private VduBlueprint blueprint;
+
+
+ public CSAR(VduBlueprint blueprint) {
+ this.blueprint = blueprint;
+ }
+
+ /**
+ * Creates a byte array representation of a CSAR corresponding to the VduBlueprint arg in the
+ * constructor.
+ *
+ * @return
+ */
+ public byte[] create() {
+ File dir = Files.createTempDir();
+
+ /**
+ * Create subdir
+ */
+ File metadir = new File(dir.getAbsolutePath() + "/" + "TOSCA-Metadata");
+ if (!metadir.mkdir()) {
+ throw new RuntimeException("CSAR TOSCA-Metadata directory create failed");
+ }
+
+ /**
+ * Write template files
+ */
+ OutputStream ofs = null;
+ try {
+ ofs = new FileOutputStream(new File(dir, blueprint.getMainTemplateName()));
+ ofs.write(blueprint.getTemplateFiles().get(blueprint.getMainTemplateName()));
+ ofs.close();
+
+ /**
+ * Write other files
+ */
+ if (blueprint.getTemplateFiles() != null) {
+ for (Map.Entry<String, byte[]> entry : blueprint.getTemplateFiles().entrySet()) {
+ if (!entry.getKey().equals(blueprint.getMainTemplateName())) {
+ ofs = new FileOutputStream(new File(dir, entry.getKey()));
+ ofs.write(entry.getValue());
+ ofs.close();
+ }
+ }
+ }
+
+ /**
+ * Write attached files
+ */
+ if (blueprint.getAttachedFiles() != null) {
+ for (Map.Entry<String, byte[]> entry : blueprint.getAttachedFiles().entrySet()) {
+ ofs = new FileOutputStream(new File(dir, entry.getKey()));
+ ofs.write(entry.getValue());
+ ofs.close();
+ }
+ }
+
+ /**
+ * Create manifest
+ */
+ PrintStream mfstream = new PrintStream(new File(metadir.getAbsolutePath() + "/" + MANIFEST_FILENAME));
+ mfstream.println("TOSCA-Meta-File-Version: 1.0");
+ mfstream.println("CSAR-Version: 1.1");
+ mfstream.println("Created-by: ONAP");
+ mfstream.println("Entry-Definitions: " + blueprint.getMainTemplateName());
+ mfstream.close();
+
+ /**
+ * ZIP it up
+ */
+ ByteArrayOutputStream zipbytes = new ByteArrayOutputStream();
+ ZipOutputStream zos = new ZipOutputStream(zipbytes);
+ compressTree(zos, "", dir, dir);
+ zos.close();
+ return zipbytes.toByteArray();
+
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to create CSAR: " + e.getMessage());
+ } finally {
+
+ /**
+ * Clean up tmpdir
+ */
+ deleteDirectory(dir);
+ }
+ }
+
+ /**
+ * Private methods
+ */
+
+ /**
+ * Compresses (ZIPs) a directory tree
+ *
+ * @param dir
+ * @throws IOException
+ */
+ private void compressTree(ZipOutputStream zos, String path, File basedir, File dir) throws IOException {
+ if (!dir.isDirectory())
+ return;
+
+ for (File f : dir.listFiles()) {
+ if (f.isDirectory()) {
+ String newpath = path + f.getName() + "/";
+ ZipEntry entry = new ZipEntry(newpath);
+ zos.putNextEntry(entry);
+ zos.closeEntry();
+ compressTree(zos, newpath, basedir, f);
+ } else {
+ ZipEntry ze = new ZipEntry(
+ f.getAbsolutePath().substring(basedir.getAbsolutePath().length() + 1).replaceAll("\\\\", "/"));
+ zos.putNextEntry(ze);
+ // read the file and write to ZipOutputStream
+ FileInputStream fis = new FileInputStream(f);
+ byte[] buffer = new byte[1024];
+ int len;
+ while ((len = fis.read(buffer)) > 0) {
+ zos.write(buffer, 0, len);
+ }
+ zos.closeEntry();
+ fis.close();
+ }
+ }
+ }
+
+ private boolean deleteDirectory(File directory) {
+ if (directory.exists()) {
+ File[] files = directory.listFiles();
+ if (null != files) {
+ for (int i = 0; i < files.length; i++) {
+ if (files[i].isDirectory()) {
+ deleteDirectory(files[i]);
+ } else {
+ files[i].delete();
+ }
+ }
+ }
+ }
+ return (directory.delete());
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java
index 1cddc54f43..0a008d1044 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceInput.java
@@ -304,7 +304,7 @@ public class ResourceInput {
@Override
public String toString() {
ObjectMapper mapper = new ObjectMapper();
- mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
String jsonStr = "";
try {
jsonStr = mapper.writeValueAsString(this);
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index 7a7f7cf131..959689e556 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -21,6 +21,7 @@
package org.openecomp.mso.bpmn.infrastructure.scripts;
import static org.apache.commons.lang3.StringUtils.*;
+import org.apache.http.HttpResponse
import groovy.xml.XmlUtil
import groovy.json.*
@@ -446,47 +447,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.log("INFO", "======== COMPLETED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
}
- /**
- * prepare resource create request
- */
- public void preResourceRequest(execution){
- String resourceType = execution.getVariable("resourceType")
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String serviceInstanceName = execution.getVariable("serviceInstanceName")
- String nsServiceName = resourceType + "_" + serviceInstanceName
- execution.setVariable("nsServiceName", nsServiceName)
- utils.log("INFO", "Prepare Resource Request nsServiceName:" + nsServiceName, isDebugEnabled)
- String globalSubscriberId = execution.getVariable("globalSubscriberId")
- String serviceType = execution.getVariable("serviceType")
- String serviceId = execution.getVariable("serviceInstanceId")
- execution.setVariable("serviceId", serviceId)
- String operationId = execution.getVariable("operationId")
- String incomingRequest = execution.getVariable("uuiRequest")
- String resourcesStr = jsonUtil.getJsonValue(incomingRequest, "service.parameters.resources")
- String nsServiceDescription = jsonUtil.getJsonValue(incomingRequest, "service.description")
- execution.setVariable("nsServiceDescription", nsServiceDescription)
- utils.log("INFO", "Prepare Resource Request nsServiceDescription:" + nsServiceDescription, isDebugEnabled)
- List<String> resourceList = jsonUtil.StringArrayToList(execution, resourcesStr)
- //reset the variables
- execution.setVariable("resourceUUID", "")
- execution.setVariable("resourceInvariantUUID", "")
- execution.setVariable("resourceParameters", "")
- for(String resource : resourceList){
- String resourceName = jsonUtil.getJsonValue(resource, "resourceName")
- if(StringUtils.containsIgnoreCase(resourceName, resourceType)){
- String resourceUUID = jsonUtil.getJsonValue(resource, "resourceId")
- String resourceInvariantUUID = jsonUtil.getJsonValue(resource, "resourceDefId")
- String resourceParameters = jsonUtil.getJsonValue(resource, "nsParameters")
- execution.setVariable("resourceUUID", resourceUUID)
- execution.setVariable("resourceInvariantUUID", resourceInvariantUUID)
- execution.setVariable("resourceParameters", resourceParameters)
- utils.log("INFO", "Prepare Resource Request resourceType:" + resourceType, isDebugEnabled)
- utils.log("INFO", "Prepare Resource Request resourceUUID:" + resourceUUID, isDebugEnabled)
- utils.log("INFO", "Prepare Resource Request resourceParameters:" + resourceParameters, isDebugEnabled)
- }
- }
- utils.log("INFO", "Prepare Controller Request finished", isDebugEnabled)
- }
+
/**
* sequence resource. we should analyze resource sequence from service template
* Here we make VF first, and then network for E2E service.
@@ -603,4 +564,20 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("resourceInput", resourceInput)
utils.log("INFO", "======== COMPLETED prepareResourceRecipeRequest Process ======== ", isDebugEnabled)
}
+
+ public void executeResourceRecipe(execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start executeResourceRecipe Process ======== ", isDebugEnabled)
+ String requestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceType = execution.getVariable("serviceType")
+ ResourceInput resourceInput = execution.getVariable("resourceInput")
+ String requestAction = resourceInput.getOperationType()
+ JSONObject resourceRecipe = cutils.getResourceRecipe(execution, resourceInput.getResourceUuid(), requestAction)
+ String recipeUri = resourceRecipe.getString("orchestrationUri")
+ String recipeTimeOut = resourceRecipe.getString("recipeTimeout")
+ String recipeParamXsd = resourceRecipe.get("paramXSD")
+ HttpResponse resp = BpmnRestClient.post(recipeUri, requestId, recipeTimeout, requestAction, serviceInstanceId, serviceType, resourceInput.toString(), recipeParamXsd)
+
+ }
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
index 0749c789b4..3a8b6b9036 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncOperationTask.java
@@ -51,9 +51,6 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-/**
- * Created by 10112215 on 2017/9/16.
- */
public abstract class AbstractSdncOperationTask extends BaseTask {
private static final Logger logger = LoggerFactory.getLogger(AbstractSdncOperationTask.class);
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
index 646ed92705..46a45883ef 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncNetworkTopologyOperationTask.java
@@ -38,9 +38,6 @@ import org.slf4j.LoggerFactory;
import java.util.Map;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class SdncNetworkTopologyOperationTask extends AbstractSdncOperationTask {
private static final Logger sdncLogger = LoggerFactory.getLogger(SdncNetworkTopologyOperationTask.class);
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
index dab96b0613..28fe802012 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncServiceTopologyOperationTask.java
@@ -39,9 +39,6 @@ import org.slf4j.LoggerFactory;
import java.util.Map;
-/**
- * Created by 10112215 on 2017/9/26.
- */
public class SdncServiceTopologyOperationTask extends AbstractSdncOperationTask {
private static final Logger sdncLogger = LoggerFactory.getLogger(SdncServiceTopologyOperationTask.class);
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
index add87b131e..2bca17a9ca 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnOperationClient.java
@@ -35,9 +35,6 @@ import org.openecomp.mso.requestsdb.ResourceOperationStatus;
import java.util.Map;
-/**
- * Created by 10112215 on 2017/9/21.
- */
public class SdncUnderlayVpnOperationClient {
private static final String DEFAULT_MSB_IP = "127.0.0.1";
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java
index 90effd39e3..3989bad482 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/SdncUnderlayVpnPreprocessTask.java
@@ -26,9 +26,6 @@ import org.openecomp.mso.bpmn.core.BaseTask;
import org.openecomp.mso.requestsdb.RequestsDatabase;
import org.openecomp.mso.requestsdb.ResourceOperationStatus;
-/**
- * Created by 10112215 on 2017/9/26.
- */
public class SdncUnderlayVpnPreprocessTask extends BaseTask {
public static final String RESOURCE_OPER_TYPE = "resourceOperType";
private RequestsDatabase requestsDB = RequestsDatabase.getInstance();
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/GenericResourceApi.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/GenericResourceApi.java
index 23ad422599..8544051bcb 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/GenericResourceApi.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/GenericResourceApi.java
@@ -29,9 +29,6 @@ import retrofit2.http.Body;
import retrofit2.http.Header;
import retrofit2.http.POST;
-/**
- * Created by 10112215 on 2017/9/16.
- */
@ServiceHttpEndPoint(serviceName = "sdnc", serviceVersion = "v1")
public interface GenericResourceApi {
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java
index 299c1c546b..de50fe11b5 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/AbstractBuilder.java
@@ -33,12 +33,6 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
-//import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.request.information.RequestInformation;
-//import org.opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.sdnc.request.header.SdncRequestHeader;
-
-/**
- * Created by 10112215 on 2017/9/20.
- */
public abstract class AbstractBuilder<IN, OUT> {
public static final String OPERATION_TYPE = "operationType";
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java
index 8d0caaa765..c558247dea 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/NetworkRpcInputEntityBuilder.java
@@ -26,9 +26,6 @@ import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.
import java.util.List;
import java.util.Map;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class NetworkRpcInputEntityBuilder extends AbstractBuilder<Map<String, String>, RpcNetworkTopologyOperationInputEntity> {
@Override
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/ServiceRpcInputEntityBuilder.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/ServiceRpcInputEntityBuilder.java
index 7867358bb6..d451c3ef02 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/ServiceRpcInputEntityBuilder.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/builder/ServiceRpcInputEntityBuilder.java
@@ -26,9 +26,6 @@ import org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity.
import java.util.List;
import java.util.Map;
-/**
- * Created by 10112215 on 2017/9/26.
- */
public class ServiceRpcInputEntityBuilder extends AbstractBuilder<Map<String, String>, RpcServiceTopologyOperationInputEntity> {
@Override
public RpcServiceTopologyOperationInputEntity build(DelegateExecution execution, Map<String, String> inputs) throws Exception {
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInformationEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInformationEntity.java
index 3d59d3b73e..ce92e31003 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInformationEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInformationEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class NetworkInformationEntity {
@JsonProperty("GENERIC-RESOURCE-API:network-id")
private String networkId;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInputPaarametersEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInputPaarametersEntity.java
index f7b055efcf..e455bdb4c8 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInputPaarametersEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkInputPaarametersEntity.java
@@ -24,9 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class NetworkInputPaarametersEntity {
public List<ParamEntity> getParamList() {
return paramList;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRequestInputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRequestInputEntity.java
index 420d547a39..b0733f70c4 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRequestInputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkRequestInputEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class NetworkRequestInputEntity {
@JsonProperty("GENERIC-RESOURCE-API:network-name")
private String networkName;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkResponseInformationEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkResponseInformationEntity.java
index aa8ea39cd1..c8b2a2d182 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkResponseInformationEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkResponseInformationEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/22.
- */
public class NetworkResponseInformationEntity {
@JsonProperty("GENERIC-RESOURCE-API:instance-id")
private String instanceId;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationInputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationInputEntity.java
index 1ce0b455ed..3c776ebec3 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationInputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationInputEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class NetworkTopologyOperationInputEntity {
@JsonProperty("GENERIC-RESOURCE-API:sdnc-request-header")
private SdncRequestHeaderEntity sdncRequestHeader;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationOutputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationOutputEntity.java
index c835efb9ed..b13df33291 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationOutputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/NetworkTopologyOperationOutputEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/22.
- */
public class NetworkTopologyOperationOutputEntity {
@JsonProperty("GENERIC-RESOURCE-API:svc-request-id")
private String svcRequestId;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/OnapModelInformationEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/OnapModelInformationEntity.java
index eeb8eda61f..6580efea4d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/OnapModelInformationEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/OnapModelInformationEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class OnapModelInformationEntity {
@JsonProperty("GENERIC-RESOURCE-API:model-invariant-uuid")
private String modelInvariantUuid;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ParamEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ParamEntity.java
index b45a1c3265..3b9241b93d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ParamEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ParamEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class ParamEntity {
@JsonProperty("GENERIC-RESOURCE-API:name")
private String name;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RequestInformationEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RequestInformationEntity.java
index 2982e5afc5..934a1978b4 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RequestInformationEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RequestInformationEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class RequestInformationEntity {
public String getRequestId() {
return requestId;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationInputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationInputEntity.java
index b20e9ab833..914bbf5dbe 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationInputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationInputEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class RpcNetworkTopologyOperationInputEntity {
public NetworkTopologyOperationInputEntity getInput() {
return input;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationOutputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationOutputEntity.java
index 40d336e000..92312db24a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationOutputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcNetworkTopologyOperationOutputEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class RpcNetworkTopologyOperationOutputEntity {
public NetworkTopologyOperationOutputEntity getOutput() {
return output;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationInputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationInputEntity.java
index 54933cce2a..05eedc79b1 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationInputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationInputEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/26.
- */
public class RpcServiceTopologyOperationInputEntity {
public ServiceTopologyOperationInputEntity getServiceTopologyOperationInputEntity() {
return serviceTopologyOperationInputEntity;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationOutputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationOutputEntity.java
index 02fb1116e1..2e0362bdd2 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationOutputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/RpcServiceTopologyOperationOutputEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/26.
- */
public class RpcServiceTopologyOperationOutputEntity {
@JsonProperty("GENERIC-RESOURCE-API:output")
private ServiceTopologyOperationOutputEntity output;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/SdncRequestHeaderEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/SdncRequestHeaderEntity.java
index 7e28aa07b6..49d3d52911 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/SdncRequestHeaderEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/SdncRequestHeaderEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class SdncRequestHeaderEntity {
@JsonProperty("GENERIC-RESOURCE-API:svc-request-id")
private String svcRequestId;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInformationEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInformationEntity.java
index 46b53902a4..f1b1561a4f 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInformationEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInformationEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/20.
- */
public class ServiceInformationEntity {
@JsonProperty("GENERIC-RESOURCE-API:service-id")
private String serviceId;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInputParametersEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInputParametersEntity.java
index c056ffa5d9..f708aa6b18 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInputParametersEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceInputParametersEntity.java
@@ -24,9 +24,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/**
- * Created by 10112215 on 2017/9/26.
- */
public class ServiceInputParametersEntity {
public List<ParamEntity> getParamList() {
return paramList;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceRequestInputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceRequestInputEntity.java
index 934a94610d..bf88fb9f20 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceRequestInputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceRequestInputEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/26.
- */
public class ServiceRequestInputEntity {
@JsonProperty("GENERIC-RESOURCE-API:service-instance-name")
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceResponseInformationEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceResponseInformationEntity.java
index ee0104bff0..090aaf6ed1 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceResponseInformationEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceResponseInformationEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/22.
- */
public class ServiceResponseInformationEntity {
@JsonProperty("GENERIC-RESOURCE-API:instance-id")
private String instanceId;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationInputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationInputEntity.java
index ba46eb7ee1..6e399dc43d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationInputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationInputEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/26.
- */
public class ServiceTopologyOperationInputEntity {
@JsonProperty("GENERIC-RESOURCE-API:sdnc-request-header")
private SdncRequestHeaderEntity sdncRequestHeader;
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationOutputEntity.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationOutputEntity.java
index 216a3d41bd..8ad6a5347f 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationOutputEntity.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/client/entity/ServiceTopologyOperationOutputEntity.java
@@ -22,9 +22,6 @@ package org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.client.entity
import com.fasterxml.jackson.annotation.JsonProperty;
-/**
- * Created by 10112215 on 2017/9/26.
- */
public class ServiceTopologyOperationOutputEntity {
@JsonProperty("GENERIC-RESOURCE-API:svc-request-id")
private String svcRequestId;
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 e1ba94cdb7..c27e8277da 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;
@@ -693,7 +693,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);
@@ -743,7 +743,7 @@ public class E2EServiceInstances {
// return response;
// }
- String serviceInstanceType = e2eSir.getService().getParameters().getServiceType();
+ String serviceInstanceType = e2eSir.getService().getServiceType();
String serviceId = "";
RequestClient requestClient = null;
@@ -963,10 +963,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();
@@ -992,12 +992,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;
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 529165128d..b1906d143f 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
@@ -60,6 +60,84 @@ import mockit.MockUp;
public class E2EServiceInstancesTest {
+ String jsonBody = "{" +
+ "\"service\": {" +
+ "\"name\": \"so_test4\"," +
+ "\"description\": \"so_test2\"," +
+ "\"serviceInvariantUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561519\"," +
+ "\"serviceUuid\": \"592f9437-a9c0-4303-b9f6-c445bb7e9814\"," +
+ "\"globalSubscriberId\": \"123457\"," +
+ "\"serviceType\": \"voLTE\"," +
+ "\"parameters\": {" +
+ "\"resources\": [" +
+ "{" +
+ "\"resourceName\": \"vIMS\"," +
+ "\"resourceInvariantUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561516\"," +
+ "\"resourceUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561512\"," +
+ "\"parameters\": {" +
+ "\"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\"" +
+ "}" +
+ "}" +
+ "]" +
+ "}" +
+ "}," +
+ "{" +
+ "\"resourceName\": \"vEPC\"," +
+ "\"resourceInvariantUuid\": \"61c3e96e-0970-4871-b6e0-3b6de7561516\"," +
+ "\"resourceUuid\": \"62c3e96e-0970-4871-b6e0-3b6de7561512\"," +
+ "\"parameters\": {" +
+ "\"locationConstraints\": [" +
+ "{" +
+ "\"vnfProfileId\": \"zte-CSCF-1.0\"," +
+ "\"locationConstraints\": {" +
+ "\"vimId\": \"4050083f-465f-4838-af1e-47a545222ad1\"" +
+ "}" +
+ "}" +
+ "]" +
+ "}" +
+ "}," +
+ "{" +
+ "\"resourceName\": \"underlayvpn\"," +
+ "\"resourceInvariantUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561513\"," +
+ "\"resourceUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561514\"," +
+ "\"parameters\": {" +
+ "\"locationConstraints\": []" +
+ "}" +
+ "}," +
+ "{" +
+ "\"resourceName\": \"overlayvpn\"," +
+ "\"resourceInvariantUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561517\"," +
+ "\"resourceUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561518\"," +
+ "\"parameters\": {" +
+ "\"locationConstraints\": []" +
+ "}" +
+ "}" +
+ "]," +
+ "\"requestInputs\": {" +
+ "\"externalDataNetworkName\": \"Flow_out_net\"," +
+ "\"m6000_mng_ip\": \"181.18.20.2\"," +
+ "\"externalCompanyFtpDataNetworkName\": \"Flow_out_net\"," +
+ "\"externalPluginManageNetworkName\": \"plugin_net_2014\"," +
+ "\"externalManageNetworkName\": \"mng_net_2017\"," +
+ "\"sfc_data_network\": \"sfc_data_net_2016\"," +
+ "\"NatIpRange\": \"210.1.1.10-210.1.1.20\"," +
+ "\"location\": \"4050083f-465f-4838-af1e-47a545222ad0\"," +
+ "\"sdncontroller\": \"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"" +
+ "}" +
+ "}" +
+ "}" +
+ "}";
+
@Test
public void createE2EServiceInstanceTestSuccess() {
new MockUp<RequestsDatabase>() {
@@ -125,7 +203,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
@@ -196,7 +274,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
@@ -267,7 +345,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
@@ -331,7 +409,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
@@ -391,7 +469,7 @@ public class E2EServiceInstancesTest {
}
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
@@ -432,7 +510,7 @@ public class E2EServiceInstancesTest {
}
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
@@ -457,7 +535,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
@@ -483,7 +561,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
@@ -508,7 +586,7 @@ public class E2EServiceInstancesTest {
}
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
@@ -525,7 +603,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
@@ -551,7 +629,7 @@ public class E2EServiceInstancesTest {
}
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
@@ -679,7 +757,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.updateE2EServiceInstance(request, "v3", "12345");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("success"));
@@ -750,7 +828,7 @@ public class E2EServiceInstancesTest {
};
E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"service\":{\"name\":\"so_test4\",\"description\":\"so_test2\",\"serviceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561519\",\"templateId\":\"592f9437-a9c0-4303-b9f6-c445bb7e9814\",\"parameters\":{\"globalSubscriberId\":\"123457\",\"subscriberName\":\"Customer1\",\"serviceType\":\"voLTE\",\"templateName\":\"voLTE Service:1.0\",\"resources\":[{\"resourceName\":\"vIMS\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561512\",\"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\":{}}},{\"resourceName\":\"vEPC\",\"resourceDefId\":\"61c3e96e-0970-4871-b6e0-3b6de7561516\",\"resourceId\":\"62c3e96e-0970-4871-b6e0-3b6de7561512\",\"nsParameters\":{\"locationConstraints\":[{\"vnfProfileId\":\"zte-CSCF-1.0\",\"locationConstraints\":{\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad1\"}}],\"additionalParamForNs\":{}}},{\"resourceName\":\"underlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561513\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561514\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}},{\"resourceName\":\"overlayvpn\",\"resourceDefId\":\"60c3e96e-0970-4871-b6e0-3b6de7561517\",\"resourceId\":\"60c3e96e-0970-4871-b6e0-3b6de7561518\",\"nsParameters\":{\"locationConstraints\":[],\"additionalParamForNs\":{\"externalDataNetworkName\":\"Flow_out_net\",\"m6000_mng_ip\":\"181.18.20.2\",\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\"externalPluginManageNetworkName\":\"plugin_net_2014\",\"externalManageNetworkName\":\"mng_net_2017\",\"sfc_data_network\":\"sfc_data_net_2016\",\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"}}}]}}}";
+ String request = jsonBody;
Response resp = instance.updateE2EServiceInstance(request, "v3", "12345");
String respStr = resp.getEntity().toString();
assertTrue(respStr.contains("SVC2000"));
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
index 6b27c50609..e1d590531f 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
@@ -4205,28 +4205,6 @@ public class CatalogDatabase implements Closeable {
}
}
- @Deprecated
- public void saveNestedHeatTemplate (int parentTemplateId, HeatTemplate childTemplate, String yamlFile) {
- /*
- long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - save nested Heat template with name "
- + childTemplate.getTemplateName ());
- try {
-
- saveHeatTemplate(childTemplate, childTemplate.getParameters());
- if (getNestedHeatTemplate(parentTemplateId,childTemplate.getId()) == null) {
- HeatNestedTemplate nestedTemplate = new HeatNestedTemplate ();
- nestedTemplate.setParentTemplateId (parentTemplateId);
- nestedTemplate.setChildTemplateId (childTemplate.getId ());
- nestedTemplate.setProviderResourceFile (yamlFile);
- session.save (nestedTemplate);
- }
- } finally {
- LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveNestedHeatTemplate", null);
- }
- */
- }
-
// 1707
public void saveNestedHeatTemplate (String parentTemplateId, HeatTemplate childTemplate, String yamlFile) {
long startTime = System.currentTimeMillis ();
@@ -4357,26 +4335,6 @@ public class CatalogDatabase implements Closeable {
}
}
- @Deprecated
- public void saveVfModuleToHeatFiles (int parentVfModuleId, HeatFiles childFile) {
- /*
- long startTime = System.currentTimeMillis ();
- LOGGER.debug ("Catalog database - save Heat File to VFmodule link "
- + childFile.getFileName());
- try {
- saveHeatFiles (childFile);
- VfModuleToHeatFiles vfModuleToHeatFile = new VfModuleToHeatFiles ();
- vfModuleToHeatFile.setVfModuleId(parentVfModuleId);
- vfModuleToHeatFile.setHeatFilesId(childFile.getId());
-
- session.save (vfModuleToHeatFile);
-
- } finally {
- LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "saveVfModuleToHeatFiles", null);
- }
- */
- }
-
public void saveVfModuleToHeatFiles (String parentVfModuleId, HeatFiles childFile) {
long startTime = System.currentTimeMillis ();
LOGGER.debug ("Catalog database - save Heat File to VFmodule link "