diff options
author | Ramya Balaji <rb111y@att.com> | 2018-01-15 11:02:37 -0500 |
---|---|---|
committer | Skip Wonnell <skip@att.com> | 2018-01-17 19:06:59 +0000 |
commit | c554733ede49bd0be16c5a665577ce2a32bae565 (patch) | |
tree | f7d0585a2d8715fedc301954a37dc26a795778f4 /appc-config/appc-data-services/provider/src/main/java | |
parent | 00059922c48d98a45e760e7fe82d3e5a8b5bc361 (diff) |
Improved logging,error handling-VM capabilities
Code corrections for graceful failure,
added info log statements
Issue-ID: APPC-409
Change-Id: Ibae80a4392508d1de5e68933beed048ff6ae016d
Signed-off-by: Ramya Balaji <rb111y@att.com>
Diffstat (limited to 'appc-config/appc-data-services/provider/src/main/java')
-rw-r--r-- | appc-config/appc-data-services/provider/src/main/java/org/onap/appc/data/services/node/ConfigResourceNode.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/appc-config/appc-data-services/provider/src/main/java/org/onap/appc/data/services/node/ConfigResourceNode.java b/appc-config/appc-data-services/provider/src/main/java/org/onap/appc/data/services/node/ConfigResourceNode.java index a9d3dbb8f..30fcbbdcc 100644 --- a/appc-config/appc-data-services/provider/src/main/java/org/onap/appc/data/services/node/ConfigResourceNode.java +++ b/appc-config/appc-data-services/provider/src/main/java/org/onap/appc/data/services/node/ConfigResourceNode.java @@ -748,6 +748,12 @@ public class ConfigResourceNode implements SvcLogicJavaPlugin { } String vnfcFunctionCode = getVnfcFunctionCodeForVserver(ctx, vServerId); + if (StringUtils.isBlank(vnfcFunctionCode)) { + log.info("processCapabilitiesForVMLevel() :: vnfcFunctionCode is not present in context!!!"); + ctx.setAttribute("capabilities", "Not-Supported"); + return; + } + if (vmCaps.toString().contains(vnfcFunctionCode)) ctx.setAttribute("capabilities", "Supported"); else @@ -756,9 +762,15 @@ public class ConfigResourceNode implements SvcLogicJavaPlugin { } private String getVnfcFunctionCodeForVserver(SvcLogicContext ctx, String vServerId) throws Exception { - log.debug("getVnfcFunctionCodeForVserver()::vServerId=" + vServerId); + log.info("getVnfcFunctionCodeForVserver()::vServerId=" + vServerId); + for (Object key : ctx.getAttributeKeySet()) { + String parmName = (String) key; + String parmValue = ctx.getAttribute(parmName); + log.info(parmName + "=" + parmValue); + + } String vnfcFunctionCode = ctx.getAttribute("tmp.vnfInfo.vm.vnfc.vnfc-function-code"); - log.debug("getVnfcFunctionCodeForVserver()::vnfcFunctionCode=" + vnfcFunctionCode); + log.info("getVnfcFunctionCodeForVserver()::vnfcFunctionCode=" + vnfcFunctionCode); return vnfcFunctionCode; } |