def test_details_for_add(host_diff):
    assert data.details(host_diff) == [
        '++ ip: 10.0.0.3',
        "++ hosts_names: ['riak_server1.solar', 'riak_server2.solar', 'riak_server3.solar']",  # NOQA
        '++ ssh_user: vagrant',
        '++ ssh_key: /vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key'  # NOQA
    ]
def test_details_for_add(host_diff):
    assert data.details(host_diff) == [
        '++ ip: 10.0.0.3',
        "++ hosts_names: ['riak_server1.solar', 'riak_server2.solar', 'riak_server3.solar']",  # NOQA
        '++ ssh_user: vagrant',
        '++ ssh_key: /vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key'  # NOQA
    ]
Beispiel #3
0
def staged_item(uid):
    item = data.LogItem.get(uid)
    if not item:
        click.echo('No staged changes for {}'.format(uid))
    else:
        click.echo(data.compact(item))
        for line in data.details(item.diff):
            click.echo(' ' * 4 + line)
Beispiel #4
0
def staged_item(uid):
    item = data.LogItem.get(uid)
    if not item:
        click.echo('No staged changes for {}'.format(uid))
    else:
        click.echo(data.compact(item))
        for line in data.details(item.diff):
            click.echo(' ' * 4 + line)
Beispiel #5
0
def stage(d):
    log = change.stage_changes()
    log.reverse()
    for item in log:
        click.echo(data.compact(item))
        if d:
            for line in data.details(item.diff):
                click.echo(' ' * 4 + line)
    if not log:
        click.echo('No changes')
Beispiel #6
0
def stage(action, name, tag, d):
    if action and (name or tag):
        resource.stage_resources(name or tag, action)
    log = change.staged_log(populate_with_changes=True)
    for item in log:
        click.echo(data.compact(item))
        if d:
            for line in data.details(item.diff):
                click.echo(' ' * 4 + line)
    if not log:
        click.echo('No changes')
Beispiel #7
0
def stage(action, name, tag, d):
    if action and (name or tag):
        resource.stage_resources(name or tag, action)
    log = change.staged_log()
    for item in log:
        click.echo(data.compact(item))
        if d:
            for line in data.details(item.diff):
                click.echo(' ' * 4 + line)
    if not log:
        click.echo('No changes')
Beispiel #8
0
def history(n, d, s):
    log = data.CL()
    for item in log:
        if s:
            click.echo(item.uid)
            continue

        click.echo(data.compact(item))
        if d:
            for line in data.details(item.diff):
                click.echo(' ' * 4 + line)
    if not log:
        click.echo('No history')
Beispiel #9
0
def history(n, d, s):
    log = data.CL()
    for item in log:
        if s:
            click.echo(item.uid)
            continue

        click.echo(data.compact(item))
        if d:
            for line in data.details(item.diff):
                click.echo(' ' * 4 + line)
    if not log:
        click.echo('No history')
Beispiel #10
0
def test_single_details_for_change(single_change):
    assert data.details(single_change) == ['-+ riak_port_http: 18098 >> 88888']
Beispiel #11
0
def test_list_details_for_change(list_change):
    assert data.details(list_change) == [
        '-+ configs_ports:[0] : 18098 >> 88888'
    ]
def test_single_details_for_change(single_change):
    assert data.details(single_change) == ['-+ riak_port_http: 18098 >> 88888']
def test_list_details_for_change(list_change):
    assert data.details(list_change) == [
        '-+ configs_ports:[0] : 18098 >> 88888'
    ]