diff options
author | kurczews <krzysztof.kurczewski@nokia.com> | 2018-01-30 12:37:22 +0100 |
---|---|---|
committer | Patrick Brady <pb071s@att.com> | 2018-02-02 21:22:14 +0000 |
commit | 4829b9b8f90cf3b2d3f5594e8343bee80d51a5ad (patch) | |
tree | 90a2d4773e7ba5b31658f058397cc67568961f84 /appc-config/appc-data-services/provider/src/main/java/org | |
parent | 70228960a9b605d6de401fb94a164286346d770a (diff) |
Add coverage for ConfigResourceNode-2
Change-Id: I064bbd34f5d8b1a12eb9019e295279fd61b57d99
Issue-ID: APPC-441
Signed-off-by: kurczews <krzysztof.kurczewski@nokia.com>
Diffstat (limited to 'appc-config/appc-data-services/provider/src/main/java/org')
-rw-r--r-- | appc-config/appc-data-services/provider/src/main/java/org/onap/appc/data/services/node/ConfigResourceNode.java | 14 |
1 files changed, 9 insertions, 5 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 8b9b8ddfa..b60e6a81a 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 @@ -54,6 +54,9 @@ public class ConfigResourceNode implements SvcLogicJavaPlugin { static final String LOG_PREFIX = "configfilereference-log"; static final String LOG_FILE_TYPE = "log"; + static final String DEVICE_PROTOCOL_PREFIX = "tmp.deviceinterfaceprotocol"; + static final String CONF_ACTION_PREFIX = "tmp.configureactiondg"; + private static final EELFLogger log = EELFManager.getInstance().getLogger(ConfigResourceNode.class); private final DGGeneralDBService db; @@ -118,17 +121,17 @@ public class ConfigResourceNode implements SvcLogicJavaPlugin { try { responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix + ".") : ""; - QueryStatus status = db.getDeviceProtocolByVnfType(ctx, "tmp.deviceinterfaceprotocol"); + QueryStatus status = db.getDeviceProtocolByVnfType(ctx, DEVICE_PROTOCOL_PREFIX); if (status == QueryStatus.NOT_FOUND || status == QueryStatus.FAILURE) throw new Exception("Unable to Read device_interface_protocol"); - status = db.getConfigureActionDGByVnfTypeNAction(ctx, "tmp.configureactiondg"); + status = db.getConfigureActionDGByVnfTypeNAction(ctx, CONF_ACTION_PREFIX); if (status == QueryStatus.FAILURE) throw new Exception("Unable to Read configure_action_dg"); if (status == QueryStatus.NOT_FOUND) { - status = db.getConfigureActionDGByVnfType(ctx, "tmp.configureactiondg"); + status = db.getConfigureActionDGByVnfType(ctx, CONF_ACTION_PREFIX); if (status == QueryStatus.NOT_FOUND || status == QueryStatus.FAILURE) throw new Exception("Unable to Read configure_action_dg"); @@ -147,8 +150,9 @@ public class ConfigResourceNode implements SvcLogicJavaPlugin { } } - - // fileCategory Can be config_template, parameter_definitions, parameter_yang + /** + * FileCategory can be config_template, parameter_definitions, parameter_yang + */ public void getTemplate(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException { log.info("Received getTemplate call with params : " + inParams); |