aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2019-08-22 09:41:16 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-22 09:41:16 +0000
commit6a997ad7a4f3670387b19d989986047cc15c51e3 (patch)
treee692e0540f79fccc074f00638b7ad4a9c7cb0d69 /adapters/mso-openstack-adapters
parent8ecfa2367d322bdcaec91336d1ba1e16c1fb9830 (diff)
parent4a6c019d7a0c384ea80dec7e7d14a001d7820271 (diff)
Merge "Moved null check for outputs so that get() method call won't result in crash."
Diffstat (limited to 'adapters/mso-openstack-adapters')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
index be4cc5a05d..97c73a9e99 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java
@@ -915,7 +915,7 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
// Use MsoNeutronUtils for all NEUTRON commands
String mode;
- String neutronId;
+ String neutronId = null;
// Try Heat first, since networks may be named the same as the Heat stack
StackInfo heatStack = null;
long queryStackStarttime = System.currentTimeMillis();
@@ -931,12 +931,12 @@ public class MsoNetworkAdapterImpl implements MsoNetworkAdapter {
// Populate the outputs based on the returned Stack information
if (heatStack != null && heatStack.getStatus() != HeatStatus.NOTFOUND) {
// Found it. Get the neutronNetworkId for further query
+ Map<String, String> sMap = new HashMap<>();
Map<String, Object> outputs = heatStack.getOutputs();
- neutronId = (String) outputs.get(NETWORK_ID);
mode = "HEAT";
-
- Map<String, String> sMap = new HashMap<>();
if (outputs != null) {
+ neutronId = (String) outputs.get(NETWORK_ID);
+
for (String key : outputs.keySet()) {
if (key != null && key.startsWith("subnet_id_")) // multiples subnet_%aaid% outputs
{