From 337a745aa7862178028dec4e3a538531a0484d46 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Jun 08 2017 12:32:32 +0000 Subject: Refine configuration Move internal specific configuration into configrh.py, and add missing options for LightBlue. Signed-off-by: Chenxiong Qi --- diff --git a/conf/config.py b/conf/config.py index 4b1fa99..badcc5d 100644 --- a/conf/config.py +++ b/conf/config.py @@ -127,22 +127,6 @@ class BaseConfiguration(object): # }, # } - LIGHTBLUE_SERVER_URL = '' # replace with default server url - LIGHTBLUE_VERIFY_SSL = True - - # Lookup versions of each entity: /rest/metadata/{entity name} - LIGHTBLUE_ENTITY_VERSIONS = { - 'containerRepository': '0.0.11', - 'containerImage': '0.0.12', - } - - # Pulp server url, e.g. http://localhost/ - PULP_SERVER_URL = '' - - # Username and password used to query Pulp server - PULP_USERNAME = '' - PULP_PASSWORD = '' - class DevConfiguration(BaseConfiguration): DEBUG = True diff --git a/conf/configrh.py b/conf/configrh.py index cd80b17..44fb809 100644 --- a/conf/configrh.py +++ b/conf/configrh.py @@ -27,6 +27,30 @@ class BaseConfiguration(config.BaseConfiguration): HANDLERS = [ ] + # LightBlue server URL, e.g. http://localhost/ + LIGHTBLUE_SERVER_URL = '' # replace with default server url + LIGHTBLUE_VERIFY_SSL = True + # Path to LightBlue certificate file + LIGHTBLUE_CERTIFICATE = '' + # Path to LightBlue private key file + LIGHTBLUE_PRIVATE_KEY = '' + + # Lookup versions of each entity: /rest/metadata/{entity name} + LIGHTBLUE_ENTITY_VERSIONS = { + 'containerRepository': '0.0.11', + 'containerImage': '0.0.12', + } + + # replace with real value when deploy + ERRATA_TOOL_SERVER_URL = '' + + # Pulp server url, e.g. http://localhost/ + PULP_SERVER_URL = '' + + # Username and password used to query Pulp server + PULP_USERNAME = '' + PULP_PASSWORD = '' + class DevConfiguration(BaseConfiguration): DEBUG = True diff --git a/freshmaker/config.py b/freshmaker/config.py index 7e02826..ea89192 100644 --- a/freshmaker/config.py +++ b/freshmaker/config.py @@ -205,6 +205,30 @@ class Config(object): 'type': bool, 'default': True, 'desc': 'Whether to enable SSL verification over HTTP with lightblue.'}, + 'lightblue_certificate': { + 'type': str, + 'default': '', + 'desc': 'Path to LightBlue certificate file.'}, + 'lightblue_private_key': { + 'type': str, + 'default': '', + 'desc': 'Path to LightBlue private key file.'}, + 'errata_tool_server_url': { + 'type': str, + 'default': '', + 'desc': 'Server URL of Errata Tool.'}, + 'pulp_server_url': { + 'type': str, + 'default': '', + 'desc': 'Server URL of Pulp.'}, + 'pulp_username': { + 'type': str, + 'default': '', + 'desc': 'Username to login Pulp.'}, + 'pulp_password': { + 'type': str, + 'default': '', + 'desc': 'Password to login Pulp.'}, } def __init__(self, conf_section_obj):