def test_second_from_node2_with_node1_walked(riak_plan): success = {"hosts_file1.run", "riak_service1.run", "node1.run"} for n in success: riak_plan.node[n]["status"] = states.SUCCESS.name filters.filter(riak_plan, start=["node2.run"]) pending = {n for n in riak_plan if riak_plan.node[n]["status"] == states.PENDING.name} assert pending == {"hosts_file2.run", "riak_service2.run", "node2.run", "riak_service2.join"}
def test_end_joins(riak_plan): filters.filter( riak_plan, start=["node1.run", "node2.run", "node3.run"], end=["riak_service2.join", "riak_service3.join"] ) skipped = {n for n in riak_plan if riak_plan.node[n]["status"] == states.SKIPPED.name} assert skipped == {"riak_service1.commit"}
def test_end_joins(riak_plan): filters.filter(riak_plan, start=['node1.run', 'node2.run', 'node3.run'], end=['riak_service2.join', 'riak_service3.join']) compare_task_to_names( {n for n in riak_plan if n.status == states.SKIPPED.name}, {'riak_service1.commit'})
def test_initial_from_node1_traverse(riak_plan): filters.filter(riak_plan, start=['node1.run']) pending = { n for n in riak_plan if riak_plan.node[n]['status'] == states.PENDING.name } assert pending == {'hosts_file1.run', 'riak_service1.run', 'node1.run'}
def test_end_joins(riak_plan): filters.filter( riak_plan, start=['node1.run', 'node2.run', 'node3.run'], end=['riak_service2.join', 'riak_service3.join']) skipped = {n for n in riak_plan if riak_plan.node[n]['status'] == states.SKIPPED.name} assert skipped == {'riak_service1.commit'}
def test_second_from_node2_with_node1_walked(riak_plan): success = {'hosts_file1.run', 'riak_service1.run', 'node1.run'} for n in success: riak_plan.node[n]['status'] = states.SUCCESS.name filters.filter(riak_plan, start=['node2.run']) pending = {n for n in riak_plan if riak_plan.node[n]['status'] == states.PENDING.name} assert pending == {'hosts_file2.run', 'riak_service2.run', 'node2.run', 'riak_service2.join'}
def test_end_joins(riak_plan): filters.filter(riak_plan, start=['node1.run', 'node2.run', 'node3.run'], end=['riak_service2.join', 'riak_service3.join']) skipped = { n for n in riak_plan if riak_plan.node[n]['status'] == states.SKIPPED.name } assert skipped == {'riak_service1.commit'}
def test_second_from_node2_with_node1_walked(riak_plan): success = {'hosts_file1.run', 'riak_service1.run', 'node1.run'} for task in riak_plan.nodes(): if task.name in success: task.status = states.SUCCESS.name filters.filter(riak_plan, start=['node2.run']) compare_task_to_names( {t for t in riak_plan if t.status == states.PENDING.name}, {'hosts_file2.run', 'riak_service2.run', 'node2.run', 'riak_service2.join'})
def test_second_from_node2_with_node1_walked(riak_plan): success = {'hosts_file1.run', 'riak_service1.run', 'node1.run'} for n in success: riak_plan.node[n]['status'] = states.SUCCESS.name filters.filter(riak_plan, start=['node2.run']) pending = { n for n in riak_plan if riak_plan.node[n]['status'] == states.PENDING.name } assert pending == { 'hosts_file2.run', 'riak_service2.run', 'node2.run', 'riak_service2.join' }
def dg(uid, start, end): plan = graph.get_graph(uid) if start or end: errors = filters.filter(plan, start=start, end=end) if errors: raise click.ClickException('\n'.join(errors)) utils.write_graph(plan) click.echo('Created {name}.svg'.format(name=plan.graph['name']))
def dg(uid, start, end): plan = graph.get_graph(uid) if start or end: errors = filters.filter(plan, start=start, end=end) if errors: raise click.ClickException('\n'.join(errors)) utils.write_graph(plan) click.echo('Created {name}.png'.format(name=plan.graph['name']))
def filter(uid, start, end): graph.reset_filtered(uid) plan = graph.get_graph(uid) errors = filters.filter(plan, start=start, end=end) if errors: raise click.ClickException('\n'.join(errors)) graph.update_graph(plan) utils.write_graph(plan) click.echo('Created {name}.png'.format(name=plan.graph['name']))
def filter(uid, start, end): graph.reset_filtered(uid) plan = graph.get_graph(uid) errors = filters.filter(plan, start=start, end=end) if errors: raise click.ClickException('\n'.join(errors)) graph.save_graph(uid, plan) utils.write_graph(plan) click.echo('Created {name}.png'.format(name=plan.graph['name']))
def test_initial_from_node1_traverse(riak_plan): filters.filter(riak_plan, start=['node1.run']) pending = {n for n in riak_plan if riak_plan.node[n]['status'] == states.PENDING.name} assert pending == {'hosts_file1.run', 'riak_service1.run', 'node1.run'}
def test_initial_from_node1_traverse(riak_plan): filters.filter(riak_plan, start=["node1.run"]) pending = {n for n in riak_plan if riak_plan.node[n]["status"] == states.PENDING.name} assert pending == {"hosts_file1.run", "riak_service1.run", "node1.run"}
def test_initial_from_node1_traverse(riak_plan): filters.filter(riak_plan, start=['node1.run']) compare_task_to_names( {t for t in riak_plan if t.status == states.PENDING.name}, {'hosts_file1.run', 'riak_service1.run', 'node1.run'})