diff options
Diffstat (limited to 'adaptors/ansible-adaptor/ansible-adaptor-bundle')
3 files changed, 28 insertions, 23 deletions
diff --git a/adaptors/ansible-adaptor/ansible-adaptor-bundle/pom.xml b/adaptors/ansible-adaptor/ansible-adaptor-bundle/pom.xml index be24ed12d..87cc609ee 100644 --- a/adaptors/ansible-adaptor/ansible-adaptor-bundle/pom.xml +++ b/adaptors/ansible-adaptor/ansible-adaptor-bundle/pom.xml @@ -1,18 +1,23 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- ============LICENSE_START======================================================= - ONAP : APPC ================================================================================ - Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. - ================================================================================ - Copyright (C) 2017 Amdocs ============================================================================= - Licensed under the Apache License, Version 2.0 (the "License"); you may not - use this file except in compliance with the License. You may obtain a copy - of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required - by applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - OF ANY KIND, either express or implied. See the License for the specific - language governing permissions and limitations under the License. ECOMP is - a trademark and service mark of AT&T Intellectual Property. ============LICENSE_END========================================================= --> +<!-- + ============LICENSE_START======================================================= + ONAP : APPC + ================================================================================ + Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= + --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> 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); } |