X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=appc-config%2Fappc-data-services%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fappc%2Fdata%2Fservices%2Fnode%2FConfigResourceNode.java;fp=appc-config%2Fappc-data-services%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fappc%2Fdata%2Fservices%2Fnode%2FConfigResourceNode.java;h=b60e6a81afac68e4f138e348734a7091efdac9dd;hb=4829b9b8f90cf3b2d3f5594e8343bee80d51a5ad;hp=8b9b8ddfaf2ac87152ac66cd1bd3acd8865d34b0;hpb=70228960a9b605d6de401fb94a164286346d770a;p=appc.git 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 inParams, SvcLogicContext ctx) throws SvcLogicException { log.info("Received getTemplate call with params : " + inParams);