summaryrefslogtreecommitdiffstats
path: root/adaptors/ansible-adaptor/ansible-adaptor-bundle/src
diff options
context:
space:
mode:
authorSingal, Kapil (ks220y) <ks220y@att.com>2021-04-26 13:41:57 -0400
committerKAPIL SINGAL <ks220y@att.com>2021-04-27 14:30:34 +0000
commit7b25afd7fbb945686f5444e05e5e15716052b027 (patch)
tree98be595154b40b9cd07776800f6ea8a5020e1e86 /adaptors/ansible-adaptor/ansible-adaptor-bundle/src
parent70ac2b906e4e80f817185542a649f188fc9178b0 (diff)
Moving Netconf-adaptor from APPC to CCSDK SLI
Issue-ID: CCSDK-3198 Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com> Change-Id: I638d57729d100211325f4e3121970d6737b9a50c
Diffstat (limited to 'adaptors/ansible-adaptor/ansible-adaptor-bundle/src')
-rw-r--r--adaptors/ansible-adaptor/ansible-adaptor-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdaptorImpl.java10
-rw-r--r--adaptors/ansible-adaptor/ansible-adaptor-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdaptorPropertiesProviderImpl.java10
2 files changed, 10 insertions, 10 deletions
diff --git a/adaptors/ansible-adaptor/ansible-adaptor-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdaptorImpl.java b/adaptors/ansible-adaptor/ansible-adaptor-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdaptorImpl.java
index 790b10f92..8c9c14e54 100644
--- a/adaptors/ansible-adaptor/ansible-adaptor-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdaptorImpl.java
+++ b/adaptors/ansible-adaptor/ansible-adaptor-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdaptorImpl.java
@@ -56,7 +56,7 @@ public class AnsibleAdaptorImpl implements AnsibleAdaptor {
* Adaptor Name
*/
private static final String Adaptor_NAME = "Ansible Adaptor";
- private static final String APPC_EXCEPTION_CAUGHT = "APPCException caught";
+ private static final String SVC_LOGIC_EXCEPTION_CAUGHT = "SvcLogicException caught";
/**
* The logger to be used
@@ -254,7 +254,7 @@ public class AnsibleAdaptorImpl implements AnsibleAdaptor {
ctx.setAttribute("AnsibleTimeout", timeout);
logger.info("Updated Payload = {} timeout = {}", payload, timeout);
} catch (SvcLogicException e) {
- logger.error(APPC_EXCEPTION_CAUGHT, e);
+ logger.error(SVC_LOGIC_EXCEPTION_CAUGHT, e);
doFailure(ctx, AnsibleResultCodes.INVALID_PAYLOAD.getValue(),
"Error constructing request for execution of playbook due to missing mandatory parameters. Reason = "
+ e.getMessage());
@@ -302,7 +302,7 @@ public class AnsibleAdaptorImpl implements AnsibleAdaptor {
doFailure(ctx, code, "Ansible Test result is null");
}
} catch (SvcLogicException e) {
- logger.error(APPC_EXCEPTION_CAUGHT, e);
+ logger.error(SVC_LOGIC_EXCEPTION_CAUGHT, e);
doFailure(ctx, AnsibleResultCodes.UNKNOWN_EXCEPTION.getValue(),
"Exception encountered when posting request for execution of playbook. Reason = " + e.getMessage());
}
@@ -418,7 +418,7 @@ public class AnsibleAdaptorImpl implements AnsibleAdaptor {
}
logger.info("Got uri {}", reqUri);
} catch (SvcLogicException e) {
- logger.error(APPC_EXCEPTION_CAUGHT, e);
+ logger.error(SVC_LOGIC_EXCEPTION_CAUGHT, e);
doFailure(ctx, AnsibleResultCodes.INVALID_PAYLOAD.getValue(),
"Error constructing request to retrieve result due to missing parameters. Reason = "
+ e.getMessage());
@@ -463,7 +463,7 @@ public class AnsibleAdaptorImpl implements AnsibleAdaptor {
}
logger.info("Request response = " + message);
} catch (SvcLogicException e) {
- logger.error(APPC_EXCEPTION_CAUGHT, e);
+ logger.error(SVC_LOGIC_EXCEPTION_CAUGHT, e);
ctx.setAttribute(RESULTS_ATTRIBUTE_NAME, results);
ctx.setAttribute(OUTPUT_ATTRIBUTE_NAME, finalResponse);
doFailure(ctx, AnsibleResultCodes.UNKNOWN_EXCEPTION.getValue(),
diff --git a/adaptors/ansible-adaptor/ansible-adaptor-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdaptorPropertiesProviderImpl.java b/adaptors/ansible-adaptor/ansible-adaptor-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdaptorPropertiesProviderImpl.java
index d33fdd855..1ee032a4f 100644
--- a/adaptors/ansible-adaptor/ansible-adaptor-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdaptorPropertiesProviderImpl.java
+++ b/adaptors/ansible-adaptor/ansible-adaptor-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdaptorPropertiesProviderImpl.java
@@ -63,7 +63,7 @@ public class AnsibleAdaptorPropertiesProviderImpl implements AnsibleAdaptorPrope
/**
* The name of the properties file for database configuration
*/
- private static final String ANSIBLE_Adaptor_PROPERTIES = "ansible-adaptor.properties";
+ private static final String ANSIBLE_ADAPTOR_PROPERTIES = "ansible-adaptor.properties";
/**
* A prioritized list of strategies for resolving sql-resource properties files.
@@ -102,7 +102,7 @@ public class AnsibleAdaptorPropertiesProviderImpl implements AnsibleAdaptorPrope
}
} else {
// Try to read properties as resource
- InputStream propStr = getClass().getResourceAsStream("/" + ANSIBLE_Adaptor_PROPERTIES);
+ InputStream propStr = getClass().getResourceAsStream("/" + ANSIBLE_ADAPTOR_PROPERTIES);
if (propStr != null) {
properties = new EnvProperties();
try {
@@ -115,7 +115,7 @@ public class AnsibleAdaptorPropertiesProviderImpl implements AnsibleAdaptorPrope
}
if (properties == null) {
reportFailure(new ConfigurationException(
- "Missing configuration properties resource(3): " + ANSIBLE_Adaptor_PROPERTIES));
+ "Missing configuration properties resource(3): " + ANSIBLE_ADAPTOR_PROPERTIES));
LOG.info("Defaulting org.onap.appc.adaptor.ansible.clientType to TRUST_ALL");
properties = new Properties();
properties.setProperty("org.onap.appc.adaptor.ansible.clientType", "TRUST_ALL");
@@ -137,7 +137,7 @@ public class AnsibleAdaptorPropertiesProviderImpl implements AnsibleAdaptorPrope
}
if (properties == null) {
reportFailure(new ConfigurationException(
- "Missing configuration properties resource(3): " + ANSIBLE_Adaptor_PROPERTIES));
+ "Missing configuration properties resource(3): " + ANSIBLE_ADAPTOR_PROPERTIES));
LOG.info("Defaulting org.onap.appc.adaptor.ansible.clientType to TRUST_ALL");
properties = new Properties();
properties.setProperty("org.onap.appc.adaptor.ansible.clientType", "TRUST_ALL");
@@ -196,7 +196,7 @@ public class AnsibleAdaptorPropertiesProviderImpl implements AnsibleAdaptorPrope
*/
File determinePropertiesFile() {
for (final PropertiesFileResolver propertiesFileResolver : ansibleAdaptorPropertiesFileResolvers) {
- final Optional<File> fileOptional = propertiesFileResolver.resolveFile(ANSIBLE_Adaptor_PROPERTIES);
+ final Optional<File> fileOptional = propertiesFileResolver.resolveFile(ANSIBLE_ADAPTOR_PROPERTIES);
if (fileOptional.isPresent()) {
return reportSuccess(propertiesFileResolver.getSuccessfulResolutionMessage(), fileOptional);
}