aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2019-04-26 17:51:39 -0700
committerEric Multanen <eric.w.multanen@intel.com>2019-04-26 18:00:57 -0700
commit97063f90cfa7b9bfc591ee6dba1a5ffa68e00643 (patch)
tree7e3dee5326377a43c6a64344082e21db989217f2 /adapters
parenta8bce119e8900a95f1f1b61b1caa375a19a2f1a1 (diff)
Fix multicloud query of non-existant stack
Fix handling of Not Found status for multicloud plugin query of a workload. Change-Id: Ie33b8728bf71fbcf0eaaa6496520351404928a36 Issue-ID: SO-1821 Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java2
-rw-r--r--adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java1
2 files changed, 2 insertions, 1 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
index 7bf68fff78..4b68ddb674 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java
@@ -340,7 +340,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin {
workloadStack = JSON_MAPPER.treeToValue(node.at("/stacks/0"), Stack.class);
} else {
workloadStack = new Stack();
- workloadStack.setStackStatus(HeatStatus.NOTFOUND.toString());
+ workloadStack.setStackStatus("NOT_FOUND");
}
} catch (Exception e) {
logger.debug("Multicloud Get Exception mapping /stack/0: {} ", node.toString(), e);
diff --git a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java
index 8efa48ce79..d830e706f7 100644
--- a/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java
+++ b/adapters/mso-adapters-rest-interface/src/main/java/org/onap/so/openstack/mappers/StackInfoMapper.java
@@ -95,5 +95,6 @@ public class StackInfoMapper {
heatStatusMap.put("UPDATE_IN_PROGRESS", HeatStatus.UPDATING);
heatStatusMap.put("UPDATE_FAILED", HeatStatus.FAILED);
heatStatusMap.put("UPDATE_COMPLETE", HeatStatus.UPDATED);
+ heatStatusMap.put("NOT_FOUND", HeatStatus.NOTFOUND);
}
}