mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 19:39:28 +00:00
libs, rip, isis: change northbound operation enum to DESTROY
Change the northbound lib operation from DELETE to DESTROY; make the required changes in the users of the northbound, in the cli, rip, ripng, and isis. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
d01b92fd75
commit
95ce849b58
@ -89,7 +89,7 @@ DEFPY(no_router_isis, no_router_isis_cmd, "no router isis WORD$tag",
|
|||||||
return CMD_ERR_NOTHING_TODO;
|
return CMD_ERR_NOTHING_TODO;
|
||||||
}
|
}
|
||||||
|
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
|
||||||
area = isis_area_lookup(tag);
|
area = isis_area_lookup(tag);
|
||||||
if (area && area->circuit_list && listcount(area->circuit_list)) {
|
if (area && area->circuit_list && listcount(area->circuit_list)) {
|
||||||
for (ALL_LIST_ELEMENTS(area->circuit_list, node, nnode,
|
for (ALL_LIST_ELEMENTS(area->circuit_list, node, nnode,
|
||||||
@ -103,7 +103,7 @@ DEFPY(no_router_isis, no_router_isis_cmd, "no router isis WORD$tag",
|
|||||||
temp_xpath, XPATH_MAXLEN,
|
temp_xpath, XPATH_MAXLEN,
|
||||||
"/frr-interface:lib/interface[name='%s'][vrf='%s']/frr-isisd:isis",
|
"/frr-interface:lib/interface[name='%s'][vrf='%s']/frr-isisd:isis",
|
||||||
circuit->interface->name, vrf_name);
|
circuit->interface->name, vrf_name);
|
||||||
nb_cli_enqueue_change(vty, temp_xpath, NB_OP_DELETE,
|
nb_cli_enqueue_change(vty, temp_xpath, NB_OP_DESTROY,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -289,7 +289,7 @@ DEFPY(no_ip_router_isis, no_ip_router_isis_cmd,
|
|||||||
&& !yang_dnode_get_bool(dnode,
|
&& !yang_dnode_get_bool(dnode,
|
||||||
"./frr-isisd:isis/ipv4-routing"))
|
"./frr-isisd:isis/ipv4-routing"))
|
||||||
nb_cli_enqueue_change(vty, "./frr-isisd:isis",
|
nb_cli_enqueue_change(vty, "./frr-isisd:isis",
|
||||||
NB_OP_DELETE, NULL);
|
NB_OP_DESTROY, NULL);
|
||||||
else
|
else
|
||||||
nb_cli_enqueue_change(vty,
|
nb_cli_enqueue_change(vty,
|
||||||
"./frr-isisd:isis/ipv6-routing",
|
"./frr-isisd:isis/ipv6-routing",
|
||||||
@ -299,7 +299,7 @@ DEFPY(no_ip_router_isis, no_ip_router_isis_cmd,
|
|||||||
&& !yang_dnode_get_bool(dnode,
|
&& !yang_dnode_get_bool(dnode,
|
||||||
"./frr-isisd:isis/ipv6-routing"))
|
"./frr-isisd:isis/ipv6-routing"))
|
||||||
nb_cli_enqueue_change(vty, "./frr-isisd:isis",
|
nb_cli_enqueue_change(vty, "./frr-isisd:isis",
|
||||||
NB_OP_DELETE, NULL);
|
NB_OP_DESTROY, NULL);
|
||||||
else
|
else
|
||||||
nb_cli_enqueue_change(vty,
|
nb_cli_enqueue_change(vty,
|
||||||
"./frr-isisd:isis/ipv4-routing",
|
"./frr-isisd:isis/ipv4-routing",
|
||||||
@ -336,7 +336,7 @@ DEFPY(net, net_cmd, "[no] net WORD",
|
|||||||
"XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
|
"XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./area-address",
|
nb_cli_enqueue_change(vty, "./area-address",
|
||||||
no ? NB_OP_DELETE : NB_OP_CREATE, net);
|
no ? NB_OP_DESTROY : NB_OP_CREATE, net);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
@ -589,7 +589,7 @@ DEFPY(no_area_passwd, no_area_passwd_cmd,
|
|||||||
"Configure the authentication password for an area\n"
|
"Configure the authentication password for an area\n"
|
||||||
"Set the authentication password for a routing domain\n")
|
"Set the authentication password for a routing domain\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, "./%s", cmd);
|
return nb_cli_apply_changes(vty, "./%s", cmd);
|
||||||
}
|
}
|
||||||
@ -892,7 +892,7 @@ DEFPY(no_spf_delay_ietf, no_spf_delay_ietf_cmd,
|
|||||||
"Maximum duration needed to learn all the events related to a single failure\n"
|
"Maximum duration needed to learn all the events related to a single failure\n"
|
||||||
"Maximum duration needed to learn all the events related to a single failure (in milliseconds)\n")
|
"Maximum duration needed to learn all the events related to a single failure (in milliseconds)\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./spf/ietf-backoff-delay", NB_OP_DELETE,
|
nb_cli_enqueue_change(vty, "./spf/ietf-backoff-delay", NB_OP_DESTROY,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
@ -947,7 +947,7 @@ DEFPY(no_isis_mpls_te_on, no_isis_mpls_te_on_cmd, "no mpls-te [on]",
|
|||||||
"Disable the MPLS-TE functionality\n"
|
"Disable the MPLS-TE functionality\n"
|
||||||
"Enable the MPLS-TE functionality\n")
|
"Enable the MPLS-TE functionality\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "/frr-isisd:isis/mpls-te", NB_OP_DELETE,
|
nb_cli_enqueue_change(vty, "/frr-isisd:isis/mpls-te", NB_OP_DESTROY,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
@ -1014,16 +1014,16 @@ DEFPY(isis_default_originate, isis_default_originate_cmd,
|
|||||||
"Pointer to route-map entries\n")
|
"Pointer to route-map entries\n")
|
||||||
{
|
{
|
||||||
if (no)
|
if (no)
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
|
||||||
else {
|
else {
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
|
||||||
nb_cli_enqueue_change(vty, "./always", NB_OP_MODIFY,
|
nb_cli_enqueue_change(vty, "./always", NB_OP_MODIFY,
|
||||||
always ? "true" : "false");
|
always ? "true" : "false");
|
||||||
nb_cli_enqueue_change(vty, "./route-map",
|
nb_cli_enqueue_change(vty, "./route-map",
|
||||||
rmap ? NB_OP_MODIFY : NB_OP_DELETE,
|
rmap ? NB_OP_MODIFY : NB_OP_DESTROY,
|
||||||
rmap ? rmap : NULL);
|
rmap ? rmap : NULL);
|
||||||
nb_cli_enqueue_change(vty, "./metric",
|
nb_cli_enqueue_change(vty, "./metric",
|
||||||
metric ? NB_OP_MODIFY : NB_OP_DELETE,
|
metric ? NB_OP_MODIFY : NB_OP_DESTROY,
|
||||||
metric ? metric_str : NULL);
|
metric ? metric_str : NULL);
|
||||||
if (strmatch(ip, "ipv6") && !always) {
|
if (strmatch(ip, "ipv6") && !always) {
|
||||||
vty_out(vty,
|
vty_out(vty,
|
||||||
@ -1094,14 +1094,14 @@ DEFPY(isis_redistribute, isis_redistribute_cmd,
|
|||||||
"Pointer to route-map entries\n")
|
"Pointer to route-map entries\n")
|
||||||
{
|
{
|
||||||
if (no)
|
if (no)
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
|
||||||
else {
|
else {
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
|
||||||
nb_cli_enqueue_change(vty, "./route-map",
|
nb_cli_enqueue_change(vty, "./route-map",
|
||||||
route_map ? NB_OP_MODIFY : NB_OP_DELETE,
|
route_map ? NB_OP_MODIFY : NB_OP_DESTROY,
|
||||||
route_map ? route_map : NULL);
|
route_map ? route_map : NULL);
|
||||||
nb_cli_enqueue_change(vty, "./metric",
|
nb_cli_enqueue_change(vty, "./metric",
|
||||||
metric ? NB_OP_MODIFY : NB_OP_DELETE,
|
metric ? NB_OP_MODIFY : NB_OP_DESTROY,
|
||||||
metric ? metric_str : NULL);
|
metric ? metric_str : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1182,7 +1182,7 @@ DEFPY(isis_topology, isis_topology_cmd,
|
|||||||
topology);
|
topology);
|
||||||
|
|
||||||
if (no)
|
if (no)
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
|
||||||
else {
|
else {
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
|
||||||
nb_cli_enqueue_change(vty, "./overload", NB_OP_MODIFY,
|
nb_cli_enqueue_change(vty, "./overload", NB_OP_MODIFY,
|
||||||
@ -1297,7 +1297,7 @@ DEFPY(no_isis_passwd, no_isis_passwd_cmd, "no isis password [<md5|clear> WORD]",
|
|||||||
"Cleartext password\n"
|
"Cleartext password\n"
|
||||||
"Circuit password\n")
|
"Circuit password\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./frr-isisd:isis/password", NB_OP_DELETE,
|
nb_cli_enqueue_change(vty, "./frr-isisd:isis/password", NB_OP_DESTROY,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
|
4
lib/if.c
4
lib/if.c
@ -1160,7 +1160,7 @@ DEFPY (no_interface,
|
|||||||
if (!vrfname)
|
if (!vrfname)
|
||||||
vrfname = VRF_DEFAULT_NAME;
|
vrfname = VRF_DEFAULT_NAME;
|
||||||
|
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(
|
return nb_cli_apply_changes(
|
||||||
vty, "/frr-interface:lib/interface[name='%s'][vrf='%s']",
|
vty, "/frr-interface:lib/interface[name='%s'][vrf='%s']",
|
||||||
@ -1207,7 +1207,7 @@ DEFPY (no_interface_desc,
|
|||||||
NO_STR
|
NO_STR
|
||||||
"Interface specific description\n")
|
"Interface specific description\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./description", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, "./description", NB_OP_DESTROY, NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ static unsigned int nb_node_validate_cbs(const struct nb_node *nb_node)
|
|||||||
!!nb_node->cbs.create, false);
|
!!nb_node->cbs.create, false);
|
||||||
error += nb_node_validate_cb(nb_node, NB_OP_MODIFY,
|
error += nb_node_validate_cb(nb_node, NB_OP_MODIFY,
|
||||||
!!nb_node->cbs.modify, false);
|
!!nb_node->cbs.modify, false);
|
||||||
error += nb_node_validate_cb(nb_node, NB_OP_DELETE,
|
error += nb_node_validate_cb(nb_node, NB_OP_DESTROY,
|
||||||
!!nb_node->cbs.destroy, false);
|
!!nb_node->cbs.destroy, false);
|
||||||
error += nb_node_validate_cb(nb_node, NB_OP_MOVE, !!nb_node->cbs.move,
|
error += nb_node_validate_cb(nb_node, NB_OP_MOVE, !!nb_node->cbs.move,
|
||||||
false);
|
false);
|
||||||
@ -417,7 +417,7 @@ static void nb_config_diff(const struct nb_config *config1,
|
|||||||
break;
|
break;
|
||||||
case LYD_DIFF_DELETED:
|
case LYD_DIFF_DELETED:
|
||||||
dnode = diff->first[i];
|
dnode = diff->first[i];
|
||||||
operation = NB_OP_DELETE;
|
operation = NB_OP_DESTROY;
|
||||||
break;
|
break;
|
||||||
case LYD_DIFF_CHANGED:
|
case LYD_DIFF_CHANGED:
|
||||||
dnode = diff->second[i];
|
dnode = diff->second[i];
|
||||||
@ -485,7 +485,7 @@ int nb_candidate_edit(struct nb_config *candidate,
|
|||||||
lyd_validate(&dnode, LYD_OPT_CONFIG, ly_native_ctx);
|
lyd_validate(&dnode, LYD_OPT_CONFIG, ly_native_ctx);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NB_OP_DELETE:
|
case NB_OP_DESTROY:
|
||||||
dnode = yang_dnode_get(candidate->dnode, xpath_edit);
|
dnode = yang_dnode_get(candidate->dnode, xpath_edit);
|
||||||
if (!dnode)
|
if (!dnode)
|
||||||
/*
|
/*
|
||||||
@ -741,7 +741,7 @@ static int nb_configuration_callback(const enum nb_event event,
|
|||||||
case NB_OP_MODIFY:
|
case NB_OP_MODIFY:
|
||||||
ret = (*nb_node->cbs.modify)(event, dnode, resource);
|
ret = (*nb_node->cbs.modify)(event, dnode, resource);
|
||||||
break;
|
break;
|
||||||
case NB_OP_DELETE:
|
case NB_OP_DESTROY:
|
||||||
ret = (*nb_node->cbs.destroy)(event, dnode);
|
ret = (*nb_node->cbs.destroy)(event, dnode);
|
||||||
break;
|
break;
|
||||||
case NB_OP_MOVE:
|
case NB_OP_MOVE:
|
||||||
@ -912,7 +912,7 @@ static void nb_transaction_apply_finish(struct nb_transaction *transaction)
|
|||||||
* (the 'apply_finish' callbacks from the node ancestors should
|
* (the 'apply_finish' callbacks from the node ancestors should
|
||||||
* be called though).
|
* be called though).
|
||||||
*/
|
*/
|
||||||
if (change->cb.operation == NB_OP_DELETE) {
|
if (change->cb.operation == NB_OP_DESTROY) {
|
||||||
char xpath[XPATH_MAXLEN];
|
char xpath[XPATH_MAXLEN];
|
||||||
|
|
||||||
dnode = dnode->parent;
|
dnode = dnode->parent;
|
||||||
@ -1359,7 +1359,7 @@ bool nb_operation_is_valid(enum nb_operation operation,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case NB_OP_DELETE:
|
case NB_OP_DESTROY:
|
||||||
if (!CHECK_FLAG(snode->flags, LYS_CONFIG_W))
|
if (!CHECK_FLAG(snode->flags, LYS_CONFIG_W))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -1511,8 +1511,8 @@ const char *nb_operation_name(enum nb_operation operation)
|
|||||||
return "create";
|
return "create";
|
||||||
case NB_OP_MODIFY:
|
case NB_OP_MODIFY:
|
||||||
return "modify";
|
return "modify";
|
||||||
case NB_OP_DELETE:
|
case NB_OP_DESTROY:
|
||||||
return "delete";
|
return "destroy";
|
||||||
case NB_OP_MOVE:
|
case NB_OP_MOVE:
|
||||||
return "move";
|
return "move";
|
||||||
case NB_OP_APPLY_FINISH:
|
case NB_OP_APPLY_FINISH:
|
||||||
|
@ -65,7 +65,7 @@ enum nb_event {
|
|||||||
enum nb_operation {
|
enum nb_operation {
|
||||||
NB_OP_CREATE,
|
NB_OP_CREATE,
|
||||||
NB_OP_MODIFY,
|
NB_OP_MODIFY,
|
||||||
NB_OP_DELETE,
|
NB_OP_DESTROY,
|
||||||
NB_OP_MOVE,
|
NB_OP_MOVE,
|
||||||
NB_OP_APPLY_FINISH,
|
NB_OP_APPLY_FINISH,
|
||||||
NB_OP_GET_ELEM,
|
NB_OP_GET_ELEM,
|
||||||
|
@ -228,7 +228,7 @@ frr_confd_cdb_diff_iter(confd_hkeypath_t *kp, enum cdb_iter_op cdb_op,
|
|||||||
nb_op = NB_OP_CREATE;
|
nb_op = NB_OP_CREATE;
|
||||||
break;
|
break;
|
||||||
case MOP_DELETED:
|
case MOP_DELETED:
|
||||||
nb_op = NB_OP_DELETE;
|
nb_op = NB_OP_DESTROY;
|
||||||
break;
|
break;
|
||||||
case MOP_VALUE_SET:
|
case MOP_VALUE_SET:
|
||||||
if (nb_operation_is_valid(NB_OP_MODIFY, nb_node->snode))
|
if (nb_operation_is_valid(NB_OP_MODIFY, nb_node->snode))
|
||||||
|
@ -202,10 +202,10 @@ static int frr_sr_process_change(struct nb_config *candidate,
|
|||||||
* notified about the removal of all of its leafs, even the ones
|
* notified about the removal of all of its leafs, even the ones
|
||||||
* that are non-optional. We need to ignore these notifications.
|
* that are non-optional. We need to ignore these notifications.
|
||||||
*/
|
*/
|
||||||
if (!nb_operation_is_valid(NB_OP_DELETE, nb_node->snode))
|
if (!nb_operation_is_valid(NB_OP_DESTROY, nb_node->snode))
|
||||||
return NB_OK;
|
return NB_OK;
|
||||||
|
|
||||||
nb_op = NB_OP_DELETE;
|
nb_op = NB_OP_DESTROY;
|
||||||
break;
|
break;
|
||||||
case SR_OP_MOVED:
|
case SR_OP_MOVED:
|
||||||
nb_op = NB_OP_MOVE;
|
nb_op = NB_OP_MOVE;
|
||||||
|
@ -62,7 +62,7 @@ DEFPY (no_router_rip,
|
|||||||
"Enable a routing process\n"
|
"Enable a routing process\n"
|
||||||
"Routing Information Protocol (RIP)\n")
|
"Routing Information Protocol (RIP)\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "/frr-ripd:ripd/instance", NB_OP_DELETE,
|
nb_cli_enqueue_change(vty, "/frr-ripd:ripd/instance", NB_OP_DESTROY,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
@ -213,9 +213,9 @@ DEFPY (rip_distance_source,
|
|||||||
nb_cli_enqueue_change(vty, "./distance", NB_OP_MODIFY,
|
nb_cli_enqueue_change(vty, "./distance", NB_OP_MODIFY,
|
||||||
distance_str);
|
distance_str);
|
||||||
nb_cli_enqueue_change(vty, "./access-list",
|
nb_cli_enqueue_change(vty, "./access-list",
|
||||||
acl ? NB_OP_MODIFY : NB_OP_DELETE, acl);
|
acl ? NB_OP_MODIFY : NB_OP_DESTROY, acl);
|
||||||
} else
|
} else
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, "./distance/source[prefix='%s']",
|
return nb_cli_apply_changes(vty, "./distance/source[prefix='%s']",
|
||||||
prefix_str);
|
prefix_str);
|
||||||
@ -244,7 +244,7 @@ DEFPY (rip_neighbor,
|
|||||||
"Neighbor address\n")
|
"Neighbor address\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./explicit-neighbor",
|
nb_cli_enqueue_change(vty, "./explicit-neighbor",
|
||||||
no ? NB_OP_DELETE : NB_OP_CREATE, neighbor_str);
|
no ? NB_OP_DESTROY : NB_OP_CREATE, neighbor_str);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
@ -266,7 +266,7 @@ DEFPY (rip_network_prefix,
|
|||||||
"IP prefix <network>/<length>, e.g., 35.0.0.0/8\n")
|
"IP prefix <network>/<length>, e.g., 35.0.0.0/8\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./network",
|
nb_cli_enqueue_change(vty, "./network",
|
||||||
no ? NB_OP_DELETE : NB_OP_CREATE, network_str);
|
no ? NB_OP_DESTROY : NB_OP_CREATE, network_str);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
@ -288,7 +288,7 @@ DEFPY (rip_network_if,
|
|||||||
"Interface name\n")
|
"Interface name\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./interface",
|
nb_cli_enqueue_change(vty, "./interface",
|
||||||
no ? NB_OP_DELETE : NB_OP_CREATE, network);
|
no ? NB_OP_DESTROY : NB_OP_CREATE, network);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
@ -319,7 +319,7 @@ DEFPY (rip_offset_list,
|
|||||||
nb_cli_enqueue_change(vty, "./metric", NB_OP_MODIFY,
|
nb_cli_enqueue_change(vty, "./metric", NB_OP_MODIFY,
|
||||||
metric_str);
|
metric_str);
|
||||||
} else
|
} else
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(
|
return nb_cli_apply_changes(
|
||||||
vty, "./offset-list[interface='%s'][direction='%s']",
|
vty, "./offset-list[interface='%s'][direction='%s']",
|
||||||
@ -379,9 +379,9 @@ DEFPY (rip_passive_interface,
|
|||||||
"Interface name\n")
|
"Interface name\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./passive-interface",
|
nb_cli_enqueue_change(vty, "./passive-interface",
|
||||||
no ? NB_OP_DELETE : NB_OP_CREATE, ifname);
|
no ? NB_OP_DESTROY : NB_OP_CREATE, ifname);
|
||||||
nb_cli_enqueue_change(vty, "./non-passive-interface",
|
nb_cli_enqueue_change(vty, "./non-passive-interface",
|
||||||
no ? NB_OP_CREATE : NB_OP_DELETE, ifname);
|
no ? NB_OP_CREATE : NB_OP_DESTROY, ifname);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
@ -417,13 +417,13 @@ DEFPY (rip_redistribute,
|
|||||||
if (!no) {
|
if (!no) {
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
|
||||||
nb_cli_enqueue_change(vty, "./route-map",
|
nb_cli_enqueue_change(vty, "./route-map",
|
||||||
route_map ? NB_OP_MODIFY : NB_OP_DELETE,
|
route_map ? NB_OP_MODIFY : NB_OP_DESTROY,
|
||||||
route_map);
|
route_map);
|
||||||
nb_cli_enqueue_change(vty, "./metric",
|
nb_cli_enqueue_change(vty, "./metric",
|
||||||
metric_str ? NB_OP_MODIFY : NB_OP_DELETE,
|
metric_str ? NB_OP_MODIFY : NB_OP_DESTROY,
|
||||||
metric_str);
|
metric_str);
|
||||||
} else
|
} else
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, "./redistribute[protocol='%s']",
|
return nb_cli_apply_changes(vty, "./redistribute[protocol='%s']",
|
||||||
protocol);
|
protocol);
|
||||||
@ -454,7 +454,7 @@ DEFPY (rip_route,
|
|||||||
"IP prefix <network>/<length>\n")
|
"IP prefix <network>/<length>\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./static-route",
|
nb_cli_enqueue_change(vty, "./static-route",
|
||||||
no ? NB_OP_DELETE : NB_OP_CREATE, route_str);
|
no ? NB_OP_DESTROY : NB_OP_CREATE, route_str);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
@ -942,7 +942,7 @@ DEFPY (no_ip_rip_authentication_key_chain,
|
|||||||
"Authentication key-chain\n"
|
"Authentication key-chain\n"
|
||||||
"name of key-chain\n")
|
"name of key-chain\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./authentication-key-chain", NB_OP_DELETE,
|
nb_cli_enqueue_change(vty, "./authentication-key-chain", NB_OP_DESTROY,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, "./frr-ripd:rip");
|
return nb_cli_apply_changes(vty, "./frr-ripd:rip");
|
||||||
|
@ -62,7 +62,7 @@ DEFPY (no_router_ripng,
|
|||||||
"Enable a routing process\n"
|
"Enable a routing process\n"
|
||||||
"Make RIPng instance command\n")
|
"Make RIPng instance command\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "/frr-ripngd:ripngd/instance", NB_OP_DELETE,
|
nb_cli_enqueue_change(vty, "/frr-ripngd:ripngd/instance", NB_OP_DESTROY,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
@ -170,7 +170,7 @@ DEFPY (ripng_network_prefix,
|
|||||||
"IPv6 network\n")
|
"IPv6 network\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./network",
|
nb_cli_enqueue_change(vty, "./network",
|
||||||
no ? NB_OP_DELETE : NB_OP_CREATE, network_str);
|
no ? NB_OP_DESTROY : NB_OP_CREATE, network_str);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ DEFPY (ripng_network_if,
|
|||||||
"Interface name\n")
|
"Interface name\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./interface",
|
nb_cli_enqueue_change(vty, "./interface",
|
||||||
no ? NB_OP_DELETE : NB_OP_CREATE, network);
|
no ? NB_OP_DESTROY : NB_OP_CREATE, network);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ DEFPY (ripng_offset_list,
|
|||||||
nb_cli_enqueue_change(vty, "./metric", NB_OP_MODIFY,
|
nb_cli_enqueue_change(vty, "./metric", NB_OP_MODIFY,
|
||||||
metric_str);
|
metric_str);
|
||||||
} else
|
} else
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(
|
return nb_cli_apply_changes(
|
||||||
vty, "./offset-list[interface='%s'][direction='%s']",
|
vty, "./offset-list[interface='%s'][direction='%s']",
|
||||||
@ -257,7 +257,7 @@ DEFPY (ripng_passive_interface,
|
|||||||
"Interface name\n")
|
"Interface name\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./passive-interface",
|
nb_cli_enqueue_change(vty, "./passive-interface",
|
||||||
no ? NB_OP_DELETE : NB_OP_CREATE, ifname);
|
no ? NB_OP_DESTROY : NB_OP_CREATE, ifname);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
@ -286,13 +286,13 @@ DEFPY (ripng_redistribute,
|
|||||||
if (!no) {
|
if (!no) {
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
|
||||||
nb_cli_enqueue_change(vty, "./route-map",
|
nb_cli_enqueue_change(vty, "./route-map",
|
||||||
route_map ? NB_OP_MODIFY : NB_OP_DELETE,
|
route_map ? NB_OP_MODIFY : NB_OP_DESTROY,
|
||||||
route_map);
|
route_map);
|
||||||
nb_cli_enqueue_change(vty, "./metric",
|
nb_cli_enqueue_change(vty, "./metric",
|
||||||
metric_str ? NB_OP_MODIFY : NB_OP_DELETE,
|
metric_str ? NB_OP_MODIFY : NB_OP_DESTROY,
|
||||||
metric_str);
|
metric_str);
|
||||||
} else
|
} else
|
||||||
nb_cli_enqueue_change(vty, ".", NB_OP_DELETE, NULL);
|
nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, "./redistribute[protocol='%s']",
|
return nb_cli_apply_changes(vty, "./redistribute[protocol='%s']",
|
||||||
protocol);
|
protocol);
|
||||||
@ -323,7 +323,7 @@ DEFPY (ripng_route,
|
|||||||
"Set static RIPng route announcement\n")
|
"Set static RIPng route announcement\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./static-route",
|
nb_cli_enqueue_change(vty, "./static-route",
|
||||||
no ? NB_OP_DELETE : NB_OP_CREATE, route_str);
|
no ? NB_OP_DESTROY : NB_OP_CREATE, route_str);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
@ -345,7 +345,7 @@ DEFPY (ripng_aggregate_address,
|
|||||||
"Aggregate network\n")
|
"Aggregate network\n")
|
||||||
{
|
{
|
||||||
nb_cli_enqueue_change(vty, "./aggregate-address",
|
nb_cli_enqueue_change(vty, "./aggregate-address",
|
||||||
no ? NB_OP_DELETE : NB_OP_CREATE,
|
no ? NB_OP_DESTROY : NB_OP_CREATE,
|
||||||
aggregate_address_str);
|
aggregate_address_str);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
|
@ -54,7 +54,7 @@ static struct nb_callback_info {
|
|||||||
"enum nb_event event, const struct lyd_node *dnode, union nb_resource *resource",
|
"enum nb_event event, const struct lyd_node *dnode, union nb_resource *resource",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.operation = NB_OP_DELETE,
|
.operation = NB_OP_DESTROY,
|
||||||
.return_type = "int ",
|
.return_type = "int ",
|
||||||
.return_value = "NB_OK",
|
.return_value = "NB_OK",
|
||||||
.arguments =
|
.arguments =
|
||||||
|
Loading…
Reference in New Issue
Block a user