from requests.packages import urllib3 from mgrctl.settings.platform import ( PLATFORM_TYPE, PLATFORM_VERIFY_SSL_WARNING ) # Name of nginx container: INPUT_HOSTNAME = 'input' if PLATFORM_TYPE == 'vm' else 'dci_input_1' # Port that nginx container is listening: INPUT_PORT = '1500' # Internal API url: INPUT_URL = f'http://{INPUT_HOSTNAME}:{INPUT_PORT}' # Headers for internal auth: HEADERS = {"Internal-Auth": "on", "Accept": "application/json"} # Suppress warning from urllib3: if not PLATFORM_VERIFY_SSL_WARNING: # ! This is not recommended, # ! the user will not see a message about an untrusted SSL connection urllib3.disable_warnings( category=urllib3.exceptions.InsecureRequestWarning )