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")
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")
def test_lp_topo_list_with_wrong_upstream(self): lp = LinchpinCli() upstream = "www.example.com" lp = lp.lp_topo_list(upstream)
def test_lp_topo_list_without_params(self): lp = LinchpinCli() lp = lp.lp_topo_list() assert_equal(isinstance(lp, list), True)