Esempio n. 1
0
def topology_list(config, upstream):
    lpcli = LinchpinCli()
    click.echo(": TOPOLOGIES LIST :")
    files = lpcli.lp_topo_list(upstream)
    t_files = []
    for i in range(0, len(files)):
        t_files.append((i + 1, files[i]["name"]))
    headers = ["Sno", "Name"]
    print tabulate(t_files, headers, tablefmt="fancy_grid")
Esempio n. 2
0
def topology_list(config, upstream):
    lpcli = LinchpinCli()
    click.echo(": TOPOLOGIES LIST :")
    files = lpcli.lp_topo_list(upstream)
    t_files = []
    for i in range(0, len(files)):
        t_files.append((i+1, files[i]["name"]))
    headers = ["Sno", "Name"]
    print tabulate(t_files, headers, tablefmt="fancy_grid")
Esempio n. 3
0
 def test_lp_topo_list_with_wrong_upstream(self):
     lp = LinchpinCli()
     upstream = "www.example.com"
     lp = lp.lp_topo_list(upstream)
Esempio n. 4
0
 def test_lp_topo_list_without_params(self):
     lp = LinchpinCli()
     lp = lp.lp_topo_list()
     assert_equal(isinstance(lp, list), True)