def prefixes( cli_opts: Any, # noqa: B902 nodes: List[str], json: bool, prefix: str, client_type: str, ) -> None: """ show the prefixes in the network """ nodes = parse_nodes(cli_opts, nodes) kvstore.PrefixesCmd(cli_opts).run(nodes, json, prefix, client_type)
def prefixes( cli_opts: Any, # noqa: B902 nodes: List[str], json: bool, prefix: str, client_type: str, ) -> None: """ show the prefixes from Decision module """ nodes = parse_nodes(cli_opts, nodes) decision.DecisionPrefixesCmd(cli_opts).run(nodes, json, prefix, client_type)
def unset_adj_metric(cli_opts, node, interface, yes): # noqa: B902 """ Unset previously set custom metric value on the node. """ question_str = "Are you sure to unset metric " "for adjacency {} {} ?".format( node, interface) if not utils.yesno(question_str, yes): return lm.UnsetAdjMetricCmd(cli_opts).run(node, interface, yes) nodes = parse_nodes(cli_opts, "") kvstore.ShowAdjNodeCmd(cli_opts).run(nodes, node, interface)
def unset_adj_metric(cli_opts, node, interface, yes): # noqa: B902 ''' Unset previously set custom metric value on the node. ''' question_str = 'Are you sure to unset metric ' \ 'for adjacency {} {} ?'.format(node, interface) if not utils.yesno(question_str, yes): return lm.UnsetAdjMetricCmd(cli_opts).run(node, interface, yes) nodes = parse_nodes(cli_opts.host, '', cli_opts.lm_cmd_port) kvstore.ShowAdjNodeCmd(cli_opts).run(nodes, node, interface)
def set_adj_metric(cli_opts, node, interface, metric, yes): # noqa: B902 ''' Set custom metric value for the adjacency ''' question_str = 'Are you sure to override metric '\ 'for adjacency {} {} ?'.format(node, interface) if not utils.yesno(question_str, yes): return lm.SetAdjMetricCmd(cli_opts).run(node, interface, metric, yes) nodes = parse_nodes(cli_opts.host, '', cli_opts.lm_cmd_port) kvstore.ShowAdjNodeCmd(cli_opts).run(nodes, node, interface)
def set_adj_metric(cli_opts, node, interface, metric, yes): # noqa: B902 """ Set custom metric value for the adjacency """ question_str = "Are you sure to override metric for adjacency {} {} ?".format( node, interface) if not utils.yesno(question_str, yes): return lm.SetAdjMetricCmd(cli_opts).run(node, interface, metric, yes) nodes = parse_nodes(cli_opts, "") kvstore.ShowAdjNodeCmd(cli_opts).run(nodes, node, interface)
def print_decision_routes(self): if not self.print_routes: return nodes = parse_nodes(self.cli_opts, "") decision.DecisionRoutesComputedCmd(self.cli_opts).run(nodes, [], [], False)
def adj(cli_opts, json): # noqa: B902 """Dump all formed adjacencies of the current host""" nodes = parse_nodes(cli_opts, "") lm.LMAdjCmd(cli_opts).run(nodes, json)
def interfaces(cli_opts, nodes, json, all): # noqa: B902 ''' dump interface information ''' nodes = parse_nodes(cli_opts.host, nodes, cli_opts.lm_cmd_port) kvstore.InterfacesCmd(cli_opts).run(nodes, json, all)
def adj(cli_opts, nodes, bidir, json): # noqa: B902 """ dump the link-state adjacencies from Decision module """ nodes = parse_nodes(cli_opts, nodes) decision.DecisionAdjCmd(cli_opts).run(nodes, bidir, json)
def routes(cli_opts, nodes, prefixes, json): # noqa: B902 ''' Request the routing table from Decision module ''' nodes = parse_nodes(cli_opts.host, nodes, cli_opts.lm_cmd_port) decision.DecisionRoutesComputedCmd(cli_opts).run(nodes, prefixes, json)
def adj(cli_opts, nodes, bidir, json): # noqa: B902 """ dump the link-state adjacencies """ nodes = parse_nodes(cli_opts, nodes) kvstore.AdjCmd(cli_opts).run(nodes, bidir, json)
def prefixes(cli_opts, nodes, json): # noqa: B902 """ show the prefixes from Decision module """ nodes = parse_nodes(cli_opts, nodes) decision.DecisionPrefixesCmd(cli_opts).run(nodes, json)
def prefixes(cli_opts, nodes, json): # noqa: B902 ''' show the prefixes in the network ''' nodes = parse_nodes(cli_opts.host, nodes, cli_opts.lm_cmd_port) kvstore.PrefixesCmd(cli_opts).run(nodes, json)
def print_decision_routes(self): if not self.print_routes: return nodes = parse_nodes(self.cli_opts.host, "", self.cli_opts.lm_cmd_port) decision.DecisionRoutesComputedCmd(self.cli_opts).run(nodes, [], False)
def adj(cli_opts, nodes, bidir, json): # noqa: B902 ''' dump the link-state adjacencies from Decision module ''' nodes = parse_nodes(cli_opts.host, nodes, cli_opts.lm_cmd_port) decision.DecisionAdjCmd(cli_opts).run(nodes, bidir, json)
def interfaces(cli_opts, nodes, json, all): # noqa: B902 """ dump interface information """ nodes = parse_nodes(cli_opts, nodes) kvstore.InterfacesCmd(cli_opts).run(nodes, json, all)
def prefixes(cli_opts, nodes, json): # noqa: B902 ''' show the prefixes from Decision module ''' nodes = parse_nodes(cli_opts.host, nodes, cli_opts.lm_cmd_port) decision.DecisionPrefixesCmd(cli_opts).run(nodes, json)
def prefixes(cli_opts, nodes, json): # noqa: B902 """ show the prefixes in the network """ nodes = parse_nodes(cli_opts, nodes) kvstore.PrefixesCmd(cli_opts).run(nodes, json)
def routes(cli_opts, nodes, prefixes, labels, json): # noqa: B902 """ Request the routing table from Decision module """ nodes = parse_nodes(cli_opts, nodes) decision.DecisionRoutesComputedCmd(cli_opts).run( nodes, prefixes, labels, json)
def adj(cli_opts, nodes, bidir, json): # noqa: B902 ''' dump the link-state adjacencies ''' nodes = parse_nodes(cli_opts.host, nodes, cli_opts.lm_cmd_port) kvstore.AdjCmd(cli_opts).run(nodes, bidir, json)