Example #1
0
def _load_comoditrc_conf(options):
    """
    """

    profile_name = None
    if options.profile:
        profile_name = options.profile

    config = Config()
    try:
        org = config._get_value(profile_name, 'default_organization')
    except:
        org = ''

    if options.organization:
        org = options.organization

    return {
        'api': config.get_api(profile_name),
        'username': config.get_username(profile_name),
        'password': config.get_password(profile_name),
        'organization': org
    }