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 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)