aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/main/java/org')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java14
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java26
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java20
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java12
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java4
13 files changed, 66 insertions, 40 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java
index 403e9407a6..0914516598 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
@@ -314,7 +314,7 @@ public class E2EServiceInstances {
response = requestClient.post(requestId, false,
recipeLookupResult.getRecipeTimeout(), action.name(),
serviceId, null, null, null, null, serviceInstanceType,
- null, null, null, bpmnRequest);
+ null, null, null, bpmnRequest, recipeLookupResult.getRecipeParamXsd());
msoLogger.recordMetricEvent(subStartTime,
MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
@@ -542,7 +542,7 @@ public class E2EServiceInstances {
msoLogger.debug("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl());
response = requestClient.post(requestId, false, recipeLookupResult.getRecipeTimeout(), action.name(),
- serviceId, null, null, null, null, serviceInstanceType, null, null, null, sirRequestJson);
+ serviceId, null, null, null, null, serviceInstanceType, null, null, null, sirRequestJson, recipeLookupResult.getRecipeParamXsd());
msoLogger.recordMetricEvent(subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
"Successfully received response from BPMN engine", "BPMN", recipeLookupResult.getOrchestrationURI(),
@@ -723,7 +723,7 @@ public class E2EServiceInstances {
return null;
}
return new RecipeLookupResult(recipe.getOrchestrationUri(),
- recipe.getRecipeTimeout());
+ recipe.getRecipeTimeout(), recipe.getServiceParamXSD());
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
index 7d45c4b0a2..79ac76ff04 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
@@ -738,7 +738,7 @@ public class MsoRequest {
if ((status == Status.FAILED) || (status == Status.COMPLETE)) {
aq.setStatusMessage (this.errorMessage);
aq.setResponseBody (this.responseBody);
- aq.setProgress(new Long(100));
+ aq.setProgress(100L);
Timestamp endTimeStamp = new Timestamp (System.currentTimeMillis());
aq.setEndTime (endTimeStamp);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java
index bcea8fd8d5..4e1468c4e9 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java
@@ -295,8 +295,8 @@ public class NetworkInfoHandler {
private String translateNetworkRequests (List <NetworkRequest> queryResponseList) {
NetworkRequests queryResponses = new NetworkRequests ();
- for (int i = 0; i < queryResponseList.size (); i++) {
- queryResponses.getNetworkRequest ().add (queryResponseList.get (i));
+ for (NetworkRequest aQueryResponseList : queryResponseList) {
+ queryResponses.getNetworkRequest().add(aQueryResponseList);
}
StringWriter stringWriter = new StringWriter ();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java
index 981fee9fb6..79247deca8 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java
@@ -323,8 +323,8 @@ public class NetworkRequestHandler {
private String translateNetworkRequests (List <NetworkRequest> queryResponseList) {
NetworkRequests queryResponses = new NetworkRequests ();
- for (int i = 0; i < queryResponseList.size (); i++) {
- queryResponses.getNetworkRequest ().add (queryResponseList.get (i));
+ for (NetworkRequest aQueryResponseList : queryResponseList) {
+ queryResponses.getNetworkRequest().add(aQueryResponseList);
}
StringWriter stringWriter = new StringWriter ();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java
index b01c6d6e2a..43f2d2afbb 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java
@@ -78,13 +78,13 @@ public class NetworkTypesHandler {
ObjectFactory beansObjectFactory = new ObjectFactory ();
NetworkTypes networkTypes = beansObjectFactory.createNetworkTypes ();
- for (int i = 0; i < networkResources.size (); i++) {
- NetworkType networkType = beansObjectFactory.createNetworkType ();
- NetworkResource vr = networkResources.get (i);
- networkType.setType (vr.getModelName());
- networkType.setDescription (vr.getDescription ());
- networkType.setId (String.valueOf (vr.getModelUUID()));
- networkTypes.getNetworkType ().add (networkType);
+ for (NetworkResource networkResource : networkResources) {
+ NetworkType networkType = beansObjectFactory.createNetworkType();
+ NetworkResource vr = networkResource;
+ networkType.setType(vr.getModelName());
+ networkType.setDescription(vr.getDescription());
+ networkType.setId(String.valueOf(vr.getModelUUID()));
+ networkTypes.getNetworkType().add(networkType);
}
StringWriter stringWriter = new StringWriter ();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java
index ac4c01175a..2a02344ab3 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResult.java
@@ -25,12 +25,20 @@ public class RecipeLookupResult {
private String orchestrationURI;
private int recipeTimeout;
+ // the service recipe param.
+ private String recipeParamXsd;
public RecipeLookupResult(String orchestrationURI, int recipeTimeout) {
this.orchestrationURI = orchestrationURI;
this.recipeTimeout = recipeTimeout;
}
+ public RecipeLookupResult(String orchestrationURI, int recipeTimeout, String recipeParamXsd) {
+ this.orchestrationURI = orchestrationURI;
+ this.recipeTimeout = recipeTimeout;
+ this.recipeParamXsd = recipeParamXsd;
+ }
+
public String getOrchestrationURI () {
return orchestrationURI;
}
@@ -46,5 +54,23 @@ public class RecipeLookupResult {
public void setRecipeTimeout (int recipeTimeout) {
this.recipeTimeout = recipeTimeout;
}
+
+
+ /**
+ * @return Returns the recipeParamXsd.
+ */
+ public String getRecipeParamXsd() {
+ return recipeParamXsd;
+ }
+
+
+ /**
+ * @param recipeParamXsd The recipeParamXsd to set.
+ */
+ public void setRecipeParamXsd(String recipeParamXsd) {
+ this.recipeParamXsd = recipeParamXsd;
+ }
+
+
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
index 6f6d2972d1..287b0ad812 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/ServiceInstances.java
@@ -633,7 +633,7 @@ public class ServiceInstances {
serviceInstanceId, vnfId, vfModuleId, volumeGroupId, networkId,
msoRequest.getServiceInstanceType (),
msoRequest.getVnfType (), msoRequest.getVfModuleType (),
- msoRequest.getNetworkType (), msoRequest.getRequestJSON());
+ msoRequest.getNetworkType (), msoRequest.getRequestJSON(), null);
msoLogger.recordMetricEvent (subStartTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully received response from BPMN engine", "BPMN", recipeLookupResult.getOrchestrationURI (), null);
} catch (Exception e) {
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java
index 57720dcfba..df51a8f96a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java
@@ -74,17 +74,17 @@ public class VfModuleModelNamesHandler {
ObjectFactory beansObjectFactory = new ObjectFactory ();
VfModuleModelNames vfModuleModelNames = beansObjectFactory.createVfModuleModelNames ();
- for (int i = 0; i < vfModules.size (); i++) {
- VfModuleModelName vfModuleModelName = beansObjectFactory.createVfModuleModelName ();
- VfModule vm = vfModules.get (i);
- vfModuleModelName.setModelName (vm.getModelName ());
- vfModuleModelName.setModelVersion (vm.getVersion ());
- vfModuleModelName.setModelInvariantUuid (vm.getModelInvariantUuid ());
+ for (VfModule vfModule : vfModules) {
+ VfModuleModelName vfModuleModelName = beansObjectFactory.createVfModuleModelName();
+ VfModule vm = vfModule;
+ vfModuleModelName.setModelName(vm.getModelName());
+ vfModuleModelName.setModelVersion(vm.getVersion());
+ vfModuleModelName.setModelInvariantUuid(vm.getModelInvariantUuid());
vfModuleModelName.setIsBase(vm.isBase());
- vfModuleModelName.setDescription (vm.getDescription ());
- vfModuleModelName.setId (String.valueOf (vm.getModelUUID()));
- vfModuleModelName.setAsdcServiceModelVersion(vm.getVersion ());
- vfModuleModelNames.getVfModuleModelName ().add (vfModuleModelName);
+ vfModuleModelName.setDescription(vm.getDescription());
+ vfModuleModelName.setId(String.valueOf(vm.getModelUUID()));
+ vfModuleModelName.setAsdcServiceModelVersion(vm.getVersion());
+ vfModuleModelNames.getVfModuleModelName().add(vfModuleModelName);
}
StringWriter stringWriter = new StringWriter ();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java
index 7071ed50c3..a5e1f6f4e2 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java
@@ -332,8 +332,8 @@ public class VnfInfoHandler {
private String translateVnfRequests (List <VnfRequest> queryResponseList) {
VnfRequests queryResponses = new VnfRequests ();
- for (int i = 0; i < queryResponseList.size (); i++) {
- queryResponses.getVnfRequest ().add (queryResponseList.get (i));
+ for (VnfRequest aQueryResponseList : queryResponseList) {
+ queryResponses.getVnfRequest().add(aQueryResponseList);
}
StringWriter stringWriter = new StringWriter ();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java
index a55c13baed..7a61c641ae 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java
@@ -363,8 +363,8 @@ public class VnfRequestHandler {
private String translateVnfRequests (List <VnfRequest> queryResponseList) {
VnfRequests queryResponses = new VnfRequests ();
- for (int i = 0; i < queryResponseList.size (); i++) {
- queryResponses.getVnfRequest ().add (queryResponseList.get (i));
+ for (VnfRequest aQueryResponseList : queryResponseList) {
+ queryResponses.getVnfRequest().add(aQueryResponseList);
}
StringWriter stringWriter = new StringWriter ();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java
index 44cf038ef8..3d87d131b3 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java
@@ -85,12 +85,12 @@ public class VnfTypesHandler {
ObjectFactory beansObjectFactory = new ObjectFactory ();
VnfTypes vnfTypes = beansObjectFactory.createVnfTypes ();
- for (int i = 0; i < vnfResources.size (); i++) {
- VnfType vnfType = beansObjectFactory.createVnfType ();
- VnfResource vr = vnfResources.get (i);
- vnfType.setDescription (vr.getDescription ());
- vnfType.setId (String.valueOf (vr.getModelUuid()));
- vnfTypes.getVnfType ().add (vnfType);
+ for (VnfResource vnfResource : vnfResources) {
+ VnfType vnfType = beansObjectFactory.createVnfType();
+ VnfResource vr = vnfResource;
+ vnfType.setDescription(vr.getDescription());
+ vnfType.setId(String.valueOf(vr.getModelUuid()));
+ vnfTypes.getVnfType().add(vnfType);
}
StringWriter stringWriter = new StringWriter ();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java
index 6618fcfb00..3de945a275 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java
@@ -314,8 +314,8 @@ public class VolumeInfoHandler {
private String translateVolumeRequests (List <VolumeRequest> queryResponseList) {
VolumeRequests queryResponses = new VolumeRequests ();
- for (int i = 0; i < queryResponseList.size (); i++) {
- queryResponses.getVolumeRequest ().add (queryResponseList.get (i));
+ for (VolumeRequest aQueryResponseList : queryResponseList) {
+ queryResponses.getVolumeRequest().add(aQueryResponseList);
}
StringWriter stringWriter = new StringWriter ();
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java
index 2c1f506943..3fa4a7a9e8 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java
@@ -346,8 +346,8 @@ public class VolumeRequestHandler {
private String translateVolumeRequests (List <VolumeRequest> queryResponseList) {
VolumeRequests queryResponses = new VolumeRequests ();
- for (int i = 0; i < queryResponseList.size (); i++) {
- queryResponses.getVolumeRequest ().add (queryResponseList.get (i));
+ for (VolumeRequest aQueryResponseList : queryResponseList) {
+ queryResponses.getVolumeRequest().add(aQueryResponseList);
}
StringWriter stringWriter = new StringWriter ();