From 13300c7f3b2cd087d74981006e5a98f8099c3cb3 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Thu, 10 May 2018 17:23:13 -0400 Subject: Set default http client type If ansible-adapter.properties cannot be found, default the http client type. Change-Id: Iddebd8f1b6ff1a70d6dfbf78105d305bf1870e03 Issue-ID: CCSDK-273 Signed-off-by: Timoney, Dan (dt5972) --- .../impl/AnsibleAdapterPropertiesProviderImpl.java | 5 +++ .../src/main/resources/ansible-adapter.properties | 48 ++++++++++++++++++++++ .../src/main/resources/ansible-adaptor.properties | 48 ---------------------- 3 files changed, 53 insertions(+), 48 deletions(-) create mode 100644 ansible-adapter/ansible-adapter-bundle/src/main/resources/ansible-adapter.properties delete mode 100644 ansible-adapter/ansible-adapter-bundle/src/main/resources/ansible-adaptor.properties diff --git a/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdapterPropertiesProviderImpl.java b/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdapterPropertiesProviderImpl.java index bffb494f..482aaf8e 100755 --- a/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdapterPropertiesProviderImpl.java +++ b/ansible-adapter/ansible-adapter-bundle/src/main/java/org/onap/ccsdk/sli/adaptors/ansible/impl/AnsibleAdapterPropertiesProviderImpl.java @@ -115,6 +115,11 @@ public class AnsibleAdapterPropertiesProviderImpl implements AnsibleAdapterPrope if (properties == null) { reportFailure("Missing configuration properties resource(3)", new ConfigurationException( "Missing configuration properties resource(3): " + ANSIBLEADAPTER_PROP_FILE_NAME)); + + LOG.info("Defaulting org.onap.appc.adapter.ansible.clientType to TRUST_ALL"); + + properties = new Properties(); + properties.setProperty("org.onap.appc.adapter.ansible.clientType", "TRUST_ALL"); } } diff --git a/ansible-adapter/ansible-adapter-bundle/src/main/resources/ansible-adapter.properties b/ansible-adapter/ansible-adapter-bundle/src/main/resources/ansible-adapter.properties new file mode 100644 index 00000000..761758bb --- /dev/null +++ b/ansible-adapter/ansible-adapter-bundle/src/main/resources/ansible-adapter.properties @@ -0,0 +1,48 @@ +### +# ============LICENSE_START======================================================= +# ONAP : APPC +# ================================================================================ +# Copyright (C) 2017 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========================================================= +### + +# +# Default properties for the APP-C TestService Adapter +# +# ------------------------------------------------------------------------------------------------- +# +# Define the name and path of any user-provided configuration (bootstrap) file that can be loaded +# to supply configuration options +org.onap.appc.bootstrap.file=appc.properties +org.onap.appc.bootstrap.path=${user.home},/opt/opendaylight/current/properties + +appc.application.name=APPC + +# +# Define the message resource bundle name to be loaded +org.onap.appc.resources=org.onap/appc/i18n/MessageResources +# +# The name of the adapter. +org.onap.appc.provider.adaptor.name=org.onap.appc.appc_ansible_adapter + + +# Default truststore path and password +org.onap.appc.adapter.ansible.trustStore=/opt/opendaylight/tls-client/mykeystore.js +org.onap.appc.adapter.ansible.trustStore.trustPasswd=changeit +org.onap.appc.adapter.ansible.clientType=TRUST_ALL diff --git a/ansible-adapter/ansible-adapter-bundle/src/main/resources/ansible-adaptor.properties b/ansible-adapter/ansible-adapter-bundle/src/main/resources/ansible-adaptor.properties deleted file mode 100644 index d49c0396..00000000 --- a/ansible-adapter/ansible-adapter-bundle/src/main/resources/ansible-adaptor.properties +++ /dev/null @@ -1,48 +0,0 @@ -### -# ============LICENSE_START======================================================= -# ONAP : APPC -# ================================================================================ -# Copyright (C) 2017 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========================================================= -### - -# -# Default properties for the APP-C TestService Adapter -# -# ------------------------------------------------------------------------------------------------- -# -# Define the name and path of any user-provided configuration (bootstrap) file that can be loaded -# to supply configuration options -org.onap.appc.bootstrap.file=appc.properties -org.onap.appc.bootstrap.path=${user.home},/opt/opendaylight/current/properties - -appc.application.name=APPC - -# -# Define the message resource bundle name to be loaded -org.onap.appc.resources=org.onap/appc/i18n/MessageResources -# -# The name of the adapter. -org.onap.appc.provider.adaptor.name=org.onap.appc.appc_ansible_adapter - - -# Default truststore path and password -org.onap.appc.adapter.ansible.trustStore=/opt/opendaylight/tls-client/mykeystore.js -org.onap.appc.adapter.ansible.trustStore.trustPasswd=changeit -org.onap.appc.adapter.ansible.clientType=DEFAULT -- cgit 1.2.3-korg