auth dict different between file config and env vars config

Bug #1489617 reported by Everett Toews
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-client-config
New
Undecided
Unassigned

Bug Description

This code

    import pprint

    import os_client_config

    occ = os_client_config.OpenStackConfig()
    cloud_config = occ.get_one_cloud('test_cloud')

    print('test_cloud')
    pprint.pprint(cloud_config.config)

    occ = os_client_config.OpenStackConfig()
    cloud_config = occ.get_one_cloud('envvars')

    print('envvars')
    pprint.pprint(cloud_config.config)

produces output like the following

    test_cloud
    {'api_timeout': None,
     'auth': {
       'auth_url': 'http://xxx.xxx.xxx.xxx:5000/v2.0',
       'password': 'devstack',
       'project_name': 'demo',
       'username': 'demo'},
     'auth_type': 'password',
     'region_name': 'RegionOne',
     ...
     'volume_api_version': '1'}

    envvars
    {'api_timeout': None,
     'auth': {
       'project_name': 'demo'},
     'auth_type': 'password',
     'auth_url': 'http://xxx.xxx.xxx.xxx:5000/v2.0',
     'password': 'devstack',
     'username': 'demo',
     'region_name': 'RegionOne',
     ...
     'volume_api_version': '1'}

Note how the auth dict between the file config taken from 'test_cloud' is different from the env vars config taken from 'envvars'.

This makes it impossible to have code that uses occ to treat config taken from a file or from env vars the same.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.