tree: 7b38a91dc77b215bfda5abf4ff9af13bda5b06d7 [path history] [tgz]
  1. onap_dcae_cbs_docker_client/
  2. tests/
  3. .coveragerc
  4. .gitignore
  5. Changelog.md
  6. MANIFEST.in
  7. pom.xml
  8. README.md
  9. setup.py
  10. tox-local.ini
  11. tox.ini
onap-dcae-cbs-docker-client/README.md

Python CBS Docker Client

Used for DCAE Dockerized microservices written in Python. Pulls your configuration from the config_binding_service. Expects that CONSUL_HOST and HOSTNAME are set as env variables, which is true in DCAE.

Client Usage

Development outside of Docker

To test your raw code without Docker, you will need to set the env variables CONSUL_HOST and HOSTNAME (name of your key to pull from) that are set in DCAEs Docker enviornment.

  1. CONSUL_HOST is the hostname only of the Consul instance you are talking to
  2. HOSTNAME is the name of your component in Consul

Usage in your code

>>> from onap_dcae_cbs_docker_client import client
>>> client.get_config()

Installation

Via pip

pip install onap-dcae-cbs-docker-client

Testing

tox -c tox-local.ini