Exemplo n.º 1
0
def test_pillow_settings(env_name, pillows_by_group, extra_debugging=False):
    def dump_yaml(pillow_configs):
        names = [config.name for config in pillow_configs]
        return yaml.safe_dump(names, default_flow_style=False)

    if extra_debugging:
        print('Pillow settings overview for {}'.format(env_name))
        print(
            dump_yaml([
                action.to_json()
                for action in get_pillow_actions_for_env(env_name)
            ]))

    from fab.utils import get_pillow_env_config
    pillows = list(
        get_pillows_for_env([get_pillow_env_config(env_name)],
                            pillows_by_group=pillows_by_group))

    print('Included Pillows')
    print(dump_yaml(sorted(pillows)))

    print('Excluded Pillows')
    pillow_configs = list(
        _get_pillow_configs_from_settings_dict(pillows_by_group))
    print(dump_yaml(sorted(set(pillow_configs) - set(pillows))))
Exemplo n.º 2
0
def test_pillow_settings(env_name, pillows_by_group):
    from fab.fabfile import load_env
    from fab.utils import get_pillow_env_config
    load_env(env_name)
    pillows = get_pillows_for_env(get_pillow_env_config(env_name), pillows_by_group=pillows_by_group)

    print("Configured Pillows")
    print(json.dumps(pillows, sort_keys=True, indent=2))
def test_pillow_settings(env_name, pillows_by_group):
    from fab.fabfile import load_env
    from fab.utils import get_pillow_env_config
    load_env(env_name)
    pillows = get_pillows_for_env(get_pillow_env_config(env_name),
                                  pillows_by_group=pillows_by_group)

    print("Configured Pillows")
    print(json.dumps(pillows, sort_keys=True, indent=2))
Exemplo n.º 4
0
def test_pillow_settings(env_name, pillows_by_group, extra_debugging=False):
    def dump_yaml(pillow_configs):
        names = [config.name for config in pillow_configs]
        return yaml.safe_dump(names, default_flow_style=False)

    if extra_debugging:
        print "Pillow settings overview for {}".format(env_name)
        print dump_yaml([action.to_json() for action in get_pillow_actions_for_env(env_name)])

    from fab.utils import get_pillow_env_config

    pillows = list(get_pillows_for_env([get_pillow_env_config(env_name)], pillows_by_group=pillows_by_group))

    print "Included Pillows"
    print dump_yaml(sorted(pillows))

    print "Excluded Pillows"
    pillow_configs = list(_get_pillow_configs_from_settings_dict(pillows_by_group))
    print dump_yaml(sorted(set(pillow_configs) - set(pillows)))