aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java')
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java b/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java
index 89b07f8..7dbb1a9 100644
--- a/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java
+++ b/src/main/java/org/onap/pomba/contextbuilder/networkdiscovery/service/SpringServiceImpl.java
@@ -154,6 +154,9 @@ public class SpringServiceImpl implements SpringService {
@Autowired
private Client jerseyClient;
+ @javax.annotation.Resource
+ private Map<String, String> networkDiscoveryCtxBuilderResourceTypeMapping;
+
private static final ReentrantLock lock = new ReentrantLock();
@Override
@@ -436,7 +439,12 @@ public class SpringServiceImpl implements SpringService {
for (Resource resource : resourceList) {
String resourceId = resource.getResourceId();
- String resourceType = resource.getResourceType();
+ String origResourceType = resource.getResourceType();
+ String resourceType = networkDiscoveryCtxBuilderResourceTypeMapping.get(origResourceType);
+ if (resourceType == null) {
+ log.error("Unable to find " + origResourceType + " from networkDiscoveryCtxBuilderResourceTypeMapping");
+ continue;
+ }
// The old_requestId is inherited from ServiceDecomposition.
// Before we send a