summaryrefslogtreecommitdiffstats
path: root/onap-dcae-cbs-docker-client
diff options
context:
space:
mode:
Diffstat (limited to 'onap-dcae-cbs-docker-client')
-rw-r--r--onap-dcae-cbs-docker-client/Changelog.md3
-rw-r--r--onap-dcae-cbs-docker-client/onap_dcae_cbs_docker_client/client.py2
-rw-r--r--onap-dcae-cbs-docker-client/pom.xml2
-rw-r--r--onap-dcae-cbs-docker-client/setup.py6
-rw-r--r--onap-dcae-cbs-docker-client/tests/test_client.py6
5 files changed, 11 insertions, 8 deletions
diff --git a/onap-dcae-cbs-docker-client/Changelog.md b/onap-dcae-cbs-docker-client/Changelog.md
index c70aff4..dd284fe 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.2.1] 2021/07/20
+* DCAEGEN2-2733/DCAEGEN2-2753 - onap-dcae-cbs-docker-client remove "config" level for get_config()
+
## [2.2.0] 2021/06/22
* DCAEGEN2-2733/DCAEGEN2-2753 - onap-dcae-cbs-docker-client support local config and policy files
Support $CBS_CLIENT_CONFIG_PATH and $CBS_CLIENT_POLICY_PATH,
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 c42b4ae..a9bfa34 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
@@ -219,7 +219,7 @@ def get_config():
config = yaml.safe_load(fp)
logger.debug(f"Returning config read from {config_path}")
- return _recurse({"config": config})
+ return _recurse(config)
except yaml.scanner.ScannerError as e:
logger.error(f"The configuration file '{config_path}' has invalid YAML: {e}")
diff --git a/onap-dcae-cbs-docker-client/pom.xml b/onap-dcae-cbs-docker-client/pom.xml
index 4783ada..b70bf48 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.
<groupId>org.onap.dcaegen2.utils</groupId>
<artifactId>onap-dcae-cbs-docker-client</artifactId>
<name>dcaegen2-utils-python-cbs-docker-client</name>
- <version>2.2.0-SNAPSHOT</version>
+ <version>2.2.1-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<properties>
diff --git a/onap-dcae-cbs-docker-client/setup.py b/onap-dcae-cbs-docker-client/setup.py
index 585d628..2656a1f 100644
--- a/onap-dcae-cbs-docker-client/setup.py
+++ b/onap-dcae-cbs-docker-client/setup.py
@@ -20,10 +20,10 @@ 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.2.0",
+ version="2.2.1",
packages=find_packages(),
- author="Tommy Carpenter",
- author_email="tommy@research.att.com",
+ author="Tony Hansen",
+ author_email="tony@att.com",
license="Apache 2",
url="https://gerrit.onap.org/r/#/admin/projects/dcaegen2/utils",
install_requires=["requests>= 2.0.0, < 3.0.0"],
diff --git a/onap-dcae-cbs-docker-client/tests/test_client.py b/onap-dcae-cbs-docker-client/tests/test_client.py
index 76249d4..48e1f78 100644
--- a/onap-dcae-cbs-docker-client/tests/test_client.py
+++ b/onap-dcae-cbs-docker-client/tests/test_client.py
@@ -247,7 +247,7 @@ def test_config_file_both_exist(monkeypatch, monkeyed_requests_get):
else:
monkeypatch.delenv("CBS_CLIENT_CONFIG_PATH")
- expected_get_config = {"config": expected_config}
+ expected_get_config = expected_config
for (policy_path, expected_policy, set_policy) in [
("policy/path", json.loads(found_policy_path)['policies'], True),
@@ -292,7 +292,7 @@ def test_config_file_config_exists_policy_does_not(monkeypatch, monkeyed_request
else:
monkeypatch.delenv("CBS_CLIENT_CONFIG_PATH")
- expected_get_config = {"config": expected_config}
+ expected_get_config = expected_config
expected_get_all = {"config": expected_config}
for (policy_path, expected_policy, set_policy) in [
@@ -381,7 +381,7 @@ def test_config_file_various_exceptions(monkeypatch, monkeyed_requests_get):
else:
monkeypatch.delenv("CBS_CLIENT_CONFIG_PATH")
- expected_get_config = {"config": expected_config}
+ expected_get_config = expected_config
expected_get_all = {"config": expected_config}
for policy_path in ["bad/policy", "bad/policy2",