From 1d2990b9b712a019bf553863a847eff90066f58a Mon Sep 17 00:00:00 2001 From: efiacor Date: Mon, 27 Apr 2020 10:25:36 +0100 Subject: CBS client ConnectionError exc fix Signed-off-by: efiacor Issue-ID: DCAEGEN2-2213 Change-Id: I1cb52b67bdc1609e53a519ae7d6790d7b631f46e --- onap-dcae-cbs-docker-client/Changelog.md | 3 +++ onap-dcae-cbs-docker-client/onap_dcae_cbs_docker_client/client.py | 4 ++-- onap-dcae-cbs-docker-client/pom.xml | 2 +- onap-dcae-cbs-docker-client/setup.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'onap-dcae-cbs-docker-client') diff --git a/onap-dcae-cbs-docker-client/Changelog.md b/onap-dcae-cbs-docker-client/Changelog.md index fa4764d..d0ee35b 100644 --- a/onap-dcae-cbs-docker-client/Changelog.md +++ b/onap-dcae-cbs-docker-client/Changelog.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [2.1.1] - 04/27/2020 +* Bug fix DCAEGEN2-2213 ConnectionError exception is lost when CBSUnreachable is raised + ## [2.1.0] - 6/24/2019 * Add support for connecting to the CBS if it is running as HTTPS instead of HTTP diff --git a/onap-dcae-cbs-docker-client/onap_dcae_cbs_docker_client/client.py b/onap-dcae-cbs-docker-client/onap_dcae_cbs_docker_client/client.py index c1193d9..d02b1d1 100644 --- a/onap-dcae-cbs-docker-client/onap_dcae_cbs_docker_client/client.py +++ b/onap-dcae-cbs-docker-client/onap_dcae_cbs_docker_client/client.py @@ -66,8 +66,8 @@ def _get_path(path): res.text, ) raise CantGetConfig(res.status_code, res.text) - except requests.exceptions.ConnectionError: # this is thrown if requests.get cant even connect to the endpoint - raise CBSUnreachable() + except requests.exceptions.ConnectionError as e: # this is thrown if requests.get cant even connect to the endpoint + raise CBSUnreachable(e) ######### diff --git a/onap-dcae-cbs-docker-client/pom.xml b/onap-dcae-cbs-docker-client/pom.xml index cd20ce9..6910bde 100644 --- a/onap-dcae-cbs-docker-client/pom.xml +++ b/onap-dcae-cbs-docker-client/pom.xml @@ -28,7 +28,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. org.onap.dcaegen2.utils onap-dcae-cbs-docker-client dcaegen2-utils-python-cbs-docker-client - 2.1.0-SNAPSHOT + 2.1.1-SNAPSHOT http://maven.apache.org diff --git a/onap-dcae-cbs-docker-client/setup.py b/onap-dcae-cbs-docker-client/setup.py index 77518ee..017f7b3 100644 --- a/onap-dcae-cbs-docker-client/setup.py +++ b/onap-dcae-cbs-docker-client/setup.py @@ -19,7 +19,7 @@ from setuptools import setup, find_packages setup( name="onap_dcae_cbs_docker_client", description="very lightweight client for a DCAE dockerized component to get it's config from the CBS", - version="2.1.0", + version="2.1.1", packages=find_packages(), author="Tommy Carpenter", author_email="tommy@research.att.com", -- cgit 1.2.3-korg