aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-12 20:48:37 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-12 20:48:59 -0400
commit7484d69ad7fb0bb17a3fffdaa06b6dffb4f816cd (patch)
tree3c1c0e2e64722fbe2866dfeb3f0ef85cc671e467
parent48478b9531fb2901c392ce1142f9443b5d805148 (diff)
PNFs are not picked from SNIRO response
vnfHostName with empty value is present. PNFName should be use a key to pnf AAI object (not pnfId). FIxed bug recently introduced in ConfigurationResourceCustomizationRepository. Change-Id: I968ad84d282d9c16ead16d1559a5e790057e6e1e Issue-ID: SO-1785 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java2
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ConfigurationResourceCustomizationRepository.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
index 29037980cc..2f898b6697 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
@@ -531,7 +531,7 @@ public class SniroHomingV2 {
si.setServiceInstanceId(identifierValue);
si.setOrchestrationStatus(OrchestrationStatus.CREATED);
cloud.setLcpCloudRegionId(assignmentsMap.get("cloudRegionId"));
- if (assignmentsMap.containsKey("vnfHostName")) {
+ if (assignmentsMap.containsKey("vnfHostName") && !assignmentsMap.get("vnfHostName").isEmpty()) {
logger.debug("Resources has been homed to a vnf");
GenericVnf vnf = setVnf(assignmentsMap);
vnf.setCloudRegion(cloud);
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ConfigurationResourceCustomizationRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ConfigurationResourceCustomizationRepository.java
index 43104986ff..74c4c8cb04 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ConfigurationResourceCustomizationRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ConfigurationResourceCustomizationRepository.java
@@ -26,6 +26,6 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "configurationResourceCustomization",
path = "configurationResourceCustomization")
public interface ConfigurationResourceCustomizationRepository
- extends JpaRepository<ConfigurationResourceCustomization, String> {
+ extends JpaRepository<ConfigurationResourceCustomization, Integer> {
}