summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-08-10 17:35:54 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-10 17:35:54 +0000
commitb9f40c3b2ef6ca8a74e87c0855a82568d619cee2 (patch)
treeac32b2c80476f8fb2ace6fd529564e95fb87912e /bpmn/MSOCommonBPMN/src/main
parent87c36c7497c3d0078d117cc0bd1eddfb8fa26a6a (diff)
parent709352852e50aa92edc9cf80a7d1c0387c532521 (diff)
Merge "GR-API flow, VF Module, SDNC GR API Fixes"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java6
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigurationParametersUpgrade.java16
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java8
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java5
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java1
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java10
7 files changed, 41 insertions, 15 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java
index d3ddc60d3e..ca1acc5963 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/PayloadClient.java
@@ -48,8 +48,8 @@ public class PayloadClient {
UpgradeAction payloadResult = new UpgradeAction();
ConfigurationParametersUpgrade configParams = new ConfigurationParametersUpgrade();
String payloadString = payload.isPresent() ? payload.get() : "";
- String existingSoftware = JsonUtils.getJsonValue(payloadString, "existing-software-version");
- String newSoftware = JsonUtils.getJsonValue(payloadString, "new-software-version");
+ String existingSoftware = JsonUtils.getJsonValue(payloadString, "existing_software_version");
+ String newSoftware = JsonUtils.getJsonValue(payloadString, "new_software_version");
configParams.setExistingSoftwareVersion(existingSoftware);
configParams.setNewSoftwareVersion(newSoftware);
configParams.setVnfName(vnfName);
@@ -69,7 +69,7 @@ public class PayloadClient {
QuiesceTrafficAction payloadResult = new QuiesceTrafficAction();
ConfigurationParametersQuiesce configParams = new ConfigurationParametersQuiesce();
String payloadString = payload.isPresent() ? payload.get() : "";
- String operationsTimeout = JsonUtils.getJsonValue(payloadString, "operations-timeout");
+ String operationsTimeout = JsonUtils.getJsonValue(payloadString, "operations_timeout");
configParams.setOperationsTimeout(operationsTimeout);
configParams.setVnfName(vnfName);
payloadResult.setConfigurationParameters(configParams);
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigurationParametersUpgrade.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigurationParametersUpgrade.java
index ff51b06dbe..6bd397a63a 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigurationParametersUpgrade.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/appc/payload/beans/ConfigurationParametersUpgrade.java
@@ -27,15 +27,15 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"vnf_name",
-"existing-software-version",
-"new-software-version"
+"existing_software_version",
+"new_software_version"
})
public class ConfigurationParametersUpgrade {
@JsonProperty("vnf_name")
private String vnfName;
-@JsonProperty("existing-software-version")
+@JsonProperty("existing_software_version")
private String existingSoftwareVersion;
-@JsonProperty("new-software-version")
+@JsonProperty("new_software_version")
private String newSoftwareVersion;
@JsonProperty("vnf_name")
@@ -48,22 +48,22 @@ public void setVnfName(String vnfName) {
this.vnfName = vnfName;
}
-@JsonProperty("existing-software-version")
+@JsonProperty("existing_software_version")
public String getExistingSoftwareVersion() {
return existingSoftwareVersion;
}
-@JsonProperty("existing-software-version")
+@JsonProperty("existing_software_version")
public void setExistingSoftwareVersion(String existingSoftwareVersion) {
this.existingSoftwareVersion = existingSoftwareVersion;
}
-@JsonProperty("new-software-version")
+@JsonProperty("new_software_version")
public String getNewSoftwareVersion() {
return newSoftwareVersion;
}
-@JsonProperty("new-software-version")
+@JsonProperty("new_software_version")
public void setNewSoftwareVersion(String newSoftwareVersion) {
this.newSoftwareVersion = newSoftwareVersion;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java
index 5746dcd586..38f974168e 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlock.java
@@ -38,6 +38,8 @@ public class BuildingBlock implements Serializable{
private String key;
@JsonProperty("is-virtual-link")
private boolean isVirtualLink;
+ @JsonProperty("virtual-link-key")
+ private String virtualLinkKey;
public String getBpmnFlowName() {
return bpmnFlowName;
@@ -63,4 +65,10 @@ public class BuildingBlock implements Serializable{
public void setIsVirtualLink(boolean isVirtualLink) {
this.isVirtualLink = isVirtualLink;
}
+ public String getVirtualLinkKey() {
+ return virtualLinkKey;
+ }
+ public void setVirtualLinkKey(String virtualLinkKey) {
+ this.virtualLinkKey = virtualLinkKey;
+ }
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java
index 6ceac935f1..349010781d 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/modelinfo/ModelInfoCollection.java
@@ -27,7 +27,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public class ModelInfoCollection implements Serializable {
private static final long serialVersionUID = 8380534468706675508L;
-
+
+ @JsonProperty("model-customization-uuid")
+ private String modelCustomizationUUID;
@JsonProperty("model-version-id")
private String modelVersionId;
@JsonProperty("model-invariant-uuid")
@@ -43,6 +45,12 @@ public class ModelInfoCollection implements Serializable {
@JsonProperty("quantity")
private int quantity;
+ public String getModelCustomizationUUID() {
+ return modelCustomizationUUID;
+ }
+ public void setModelCustomizationUUID(String modelCustomizationUUID) {
+ this.modelCustomizationUUID = modelCustomizationUUID;
+ }
public String getModelVersionId() {
return modelVersionId;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
index aa68114011..ab6ae35ace 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
@@ -65,6 +65,7 @@ import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResource;
import org.onap.so.db.catalog.beans.CollectionResourceCustomization;
import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
+import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization;
import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
import org.onap.so.db.catalog.beans.OrchestrationStatus;
import org.onap.so.db.catalog.beans.Service;
@@ -1452,7 +1453,9 @@ public class BBInputSetup implements JavaDelegate {
aaiCollection = aaiCollectionOp.get();
Collection collection = this.mapperLayer.mapAAICollectionIntoCollection(aaiCollection);
-
+ NetworkCollectionResourceCustomization collectionResourceCust =
+ bbInputSetupUtils.getCatalogNetworkCollectionResourceCustByID(aaiCollection.getCollectionCustomizationId());
+ collection.setModelInfoCollection(mapperLayer.mapCatalogCollectionToCollection(collectionResourceCust, collectionResourceCust.getCollectionResource()));
Optional<Relationships> relationshipsOp = collectionWrapper.getRelationships();
Relationships relationships = null;
if (relationshipsOp.isPresent()) {
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
index 04f9cdcb86..abd7ed5a8e 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
@@ -201,6 +201,7 @@ public class BBInputSetupMapperLayer {
modelInfoCollection.setDescription(collectionResource.getDescription());
modelInfoCollection.setModelInvariantUUID(collectionResource.getModelInvariantUUID());
modelInfoCollection.setModelVersionId(collectionResource.getModelUUID());
+ modelInfoCollection.setModelCustomizationUUID(collectionCust.getModelCustomizationUUID());
return modelInfoCollection;
}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
index 14c162935a..3a88377a51 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
@@ -49,6 +49,7 @@ import org.onap.so.client.db.request.RequestsDbClient;
import org.onap.so.client.graphinventory.entities.uri.Depth;
import org.onap.so.db.catalog.beans.CollectionNetworkResourceCustomization;
import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization;
+import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization;
import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization;
import org.onap.so.db.catalog.client.CatalogDbClient;
@@ -127,6 +128,11 @@ public class BBInputSetupUtils {
return catalogDbClient.getCollectionNetworkResourceCustomizationByID(key);
}
+ public NetworkCollectionResourceCustomization getCatalogNetworkCollectionResourceCustByID(
+ String collectionCustomizationId) {
+ return catalogDbClient.getNetworkCollectionResourceCustomizationByID(collectionCustomizationId);
+ }
+
public List<VnfcInstanceGroupCustomization> getVnfcInstanceGroups(String modelCustomizationUUID) {
return catalogDbClient.getVnfcInstanceGroupsByVnfResourceCust(modelCustomizationUUID);
}
@@ -389,8 +395,8 @@ public class BBInputSetupUtils {
}
}
- public Optional<VolumeGroup> getRelatedVolumeGroupByNameFromVfModule(String vfModuleId, String volumeGroupName) throws Exception {
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vfModuleId);
+ public Optional<VolumeGroup> getRelatedVolumeGroupByNameFromVfModule(String vnfId, String vfModuleId, String volumeGroupName) throws Exception {
+ AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId);
uri.relatedTo(AAIObjectPlurals.VOLUME_GROUP).queryParam("volume-group-name", volumeGroupName);
Optional<VolumeGroups> volumeGroups = injectionHelper.getAaiClient().get(VolumeGroups.class, uri);
VolumeGroup volumeGroup = null;