]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: add YANG attr to YANG cmd
authorLoïc Sang <loic.sang@6wind.com>
Tue, 8 Apr 2025 13:23:01 +0000 (15:23 +0200)
committerLoïc Sang <loic.sang@6wind.com>
Tue, 8 Apr 2025 13:24:41 +0000 (15:24 +0200)
Those commands are using northbound api, add YANG attr to them. This
will allow them to use with pending commit, else the validation will
failed as they are detected as non YANG cmd.

Signed-off-by: Loïc Sang <loic.sang@6wind.com>
isisd/isis_cli.c

index c86d929903efc2971ae4a807ed674e453555cdc9..46611a75ec73dbf14ede3c3840f0b925e2c310a5 100644 (file)
@@ -2157,7 +2157,7 @@ DEFPY_YANG_NOSH (isis_srv6_node_msd,
 /*
  * XPath: /frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-segs-left
  */
-DEFPY (isis_srv6_node_msd_max_segs_left,
+DEFPY_YANG (isis_srv6_node_msd_max_segs_left,
        isis_srv6_node_msd_max_segs_left_cmd,
        "[no] max-segs-left (0-255)$max_segs_left",
        NO_STR
@@ -2177,7 +2177,7 @@ DEFPY (isis_srv6_node_msd_max_segs_left,
 /*
  * XPath: /frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-end-pop
  */
-DEFPY (isis_srv6_node_msd_max_end_pop,
+DEFPY_YANG (isis_srv6_node_msd_max_end_pop,
        isis_srv6_node_msd_max_end_pop_cmd,
        "[no] max-end-pop (0-255)$max_end_pop",
        NO_STR
@@ -2196,7 +2196,7 @@ DEFPY (isis_srv6_node_msd_max_end_pop,
 /*
  * XPath: /frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-h-encaps
  */
-DEFPY (isis_srv6_node_msd_max_h_encaps,
+DEFPY_YANG (isis_srv6_node_msd_max_h_encaps,
        isis_srv6_node_msd_max_h_encaps_cmd,
        "[no] max-h-encaps (0-255)$max_h_encaps",
        NO_STR
@@ -2216,7 +2216,7 @@ DEFPY (isis_srv6_node_msd_max_h_encaps,
 /*
  * XPath: /frr-isisd:isis/instance/segment-routing-srv6/msd/node-msd/max-end-d
  */
-DEFPY (isis_srv6_node_msd_max_end_d,
+DEFPY_YANG (isis_srv6_node_msd_max_end_d,
        isis_srv6_node_msd_max_end_d_cmd,
        "[no] max-end-d (0-255)$max_end_d",
        NO_STR
@@ -2262,7 +2262,7 @@ void cli_show_isis_srv6_node_msd_end(struct vty *vty, const struct lyd_node *dno
 /*
  * XPath: /frr-isisd:isis/instance/segment-routing-srv6/interface
  */
-DEFPY (isis_srv6_interface,
+DEFPY_YANG (isis_srv6_interface,
        isis_srv6_interface_cmd,
        "[no] interface WORD$interface",
        NO_STR
@@ -3268,7 +3268,7 @@ void cli_show_ip_isis_frr(struct vty *vty, const struct lyd_node *dnode,
 /*
  * XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/lfa/enable
  */
-DEFPY(isis_lfa, isis_lfa_cmd,
+DEFPY_YANG(isis_lfa, isis_lfa_cmd,
       "[no] isis fast-reroute lfa [level-1|level-2]$level",
       NO_STR
       "IS-IS routing protocol\n"
@@ -3311,7 +3311,7 @@ DEFPY(isis_lfa, isis_lfa_cmd,
  * XPath:
  * /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/lfa/exclude-interface
  */
-DEFPY(isis_lfa_exclude_interface, isis_lfa_exclude_interface_cmd,
+DEFPY_YANG(isis_lfa_exclude_interface, isis_lfa_exclude_interface_cmd,
       "[no] isis fast-reroute lfa [level-1|level-2]$level exclude interface IFNAME$ifname",
       NO_STR
       "IS-IS routing protocol\n"
@@ -3362,7 +3362,7 @@ void cli_show_frr_lfa_exclude_interface(struct vty *vty,
  * XPath:
  * /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/remote-lfa/enable
  */
-DEFPY(isis_remote_lfa, isis_remote_lfa_cmd,
+DEFPY_YANG(isis_remote_lfa, isis_remote_lfa_cmd,
       "[no] isis fast-reroute remote-lfa tunnel mpls-ldp [level-1|level-2]$level",
       NO_STR
       "IS-IS routing protocol\n"
@@ -3407,7 +3407,7 @@ DEFPY(isis_remote_lfa, isis_remote_lfa_cmd,
  * XPath:
  * /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/remote-lfa/maximum-metric
  */
-DEFPY(isis_remote_lfa_max_metric, isis_remote_lfa_max_metric_cmd,
+DEFPY_YANG(isis_remote_lfa_max_metric, isis_remote_lfa_max_metric_cmd,
       "[no] isis fast-reroute remote-lfa maximum-metric (1-16777215)$metric [level-1|level-2]$level",
       NO_STR
       "IS-IS routing protocol\n"
@@ -3460,7 +3460,7 @@ void cli_show_frr_remote_lfa_max_metric(struct vty *vty,
 /*
  * XPath: /frr-interface:lib/interface/frr-isisd:isis/fast-reroute/level-{1,2}/ti-lfa/enable
  */
-DEFPY(isis_ti_lfa, isis_ti_lfa_cmd,
+DEFPY_YANG(isis_ti_lfa, isis_ti_lfa_cmd,
       "[no] isis fast-reroute ti-lfa [level-1|level-2]$level [node-protection$node_protection [link-fallback$link_fallback]]",
       NO_STR
       "IS-IS routing protocol\n"
@@ -3578,7 +3578,7 @@ void cli_show_isis_log_pdu_drops(struct vty *vty, const struct lyd_node *dnode,
 /*
  * XPath: /frr-isisd:isis/instance/mpls/ldp-sync
  */
-DEFPY(isis_mpls_ldp_sync, isis_mpls_ldp_sync_cmd, "mpls ldp-sync",
+DEFPY_YANG(isis_mpls_ldp_sync, isis_mpls_ldp_sync_cmd, "mpls ldp-sync",
       MPLS_STR MPLS_LDP_SYNC_STR)
 {
        nb_cli_enqueue_change(vty, "./mpls/ldp-sync", NB_OP_CREATE, NULL);
@@ -3586,7 +3586,7 @@ DEFPY(isis_mpls_ldp_sync, isis_mpls_ldp_sync_cmd, "mpls ldp-sync",
        return nb_cli_apply_changes(vty, NULL);
 }
 
-DEFPY(no_isis_mpls_ldp_sync, no_isis_mpls_ldp_sync_cmd, "no mpls ldp-sync",
+DEFPY_YANG(no_isis_mpls_ldp_sync, no_isis_mpls_ldp_sync_cmd, "no mpls ldp-sync",
       NO_STR MPLS_STR NO_MPLS_LDP_SYNC_STR)
 {
        nb_cli_enqueue_change(vty, "./mpls/ldp-sync", NB_OP_DESTROY, NULL);
@@ -3600,7 +3600,7 @@ void cli_show_isis_mpls_ldp_sync(struct vty *vty, const struct lyd_node *dnode,
        vty_out(vty, " mpls ldp-sync\n");
 }
 
-DEFPY(isis_mpls_ldp_sync_holddown, isis_mpls_ldp_sync_holddown_cmd,
+DEFPY_YANG(isis_mpls_ldp_sync_holddown, isis_mpls_ldp_sync_holddown_cmd,
       "mpls ldp-sync holddown (0-10000)",
       MPLS_STR MPLS_LDP_SYNC_STR
       "Time to wait for LDP-SYNC to occur before restoring interface metric\n"
@@ -3612,7 +3612,7 @@ DEFPY(isis_mpls_ldp_sync_holddown, isis_mpls_ldp_sync_holddown_cmd,
        return nb_cli_apply_changes(vty, NULL);
 }
 
-DEFPY(no_isis_mpls_ldp_sync_holddown, no_isis_mpls_ldp_sync_holddown_cmd,
+DEFPY_YANG(no_isis_mpls_ldp_sync_holddown, no_isis_mpls_ldp_sync_holddown_cmd,
       "no mpls ldp-sync holddown [<(1-10000)>]",
       NO_STR MPLS_STR MPLS_LDP_SYNC_STR NO_MPLS_LDP_SYNC_HOLDDOWN_STR "Time in seconds\n")
 {
@@ -3633,7 +3633,7 @@ void cli_show_isis_mpls_ldp_sync_holddown(struct vty *vty,
 /*
  * XPath: /frr-interface:lib/interface/frr-isisd:isis/mpls/ldp-sync
  */
-DEFPY(isis_mpls_if_ldp_sync, isis_mpls_if_ldp_sync_cmd,
+DEFPY_YANG(isis_mpls_if_ldp_sync, isis_mpls_if_ldp_sync_cmd,
       "[no] isis mpls ldp-sync",
       NO_STR "IS-IS routing protocol\n" MPLS_STR MPLS_LDP_SYNC_STR)
 {
@@ -3663,7 +3663,7 @@ void cli_show_isis_mpls_if_ldp_sync(struct vty *vty,
        vty_out(vty, " isis mpls ldp-sync\n");
 }
 
-DEFPY(isis_mpls_if_ldp_sync_holddown, isis_mpls_if_ldp_sync_holddown_cmd,
+DEFPY_YANG(isis_mpls_if_ldp_sync_holddown, isis_mpls_if_ldp_sync_holddown_cmd,
       "isis mpls ldp-sync holddown (0-10000)",
       "IS-IS routing protocol\n" MPLS_STR MPLS_LDP_SYNC_STR
       "Time to wait for LDP-SYNC to occur before restoring interface metric\n"
@@ -3684,7 +3684,7 @@ DEFPY(isis_mpls_if_ldp_sync_holddown, isis_mpls_if_ldp_sync_holddown_cmd,
        return nb_cli_apply_changes(vty, NULL);
 }
 
-DEFPY(no_isis_mpls_if_ldp_sync_holddown, no_isis_mpls_if_ldp_sync_holddown_cmd,
+DEFPY_YANG(no_isis_mpls_if_ldp_sync_holddown, no_isis_mpls_if_ldp_sync_holddown_cmd,
       "no isis mpls ldp-sync holddown [<(1-10000)>]",
       NO_STR "IS-IS routing protocol\n" MPLS_STR NO_MPLS_LDP_SYNC_STR
              NO_MPLS_LDP_SYNC_HOLDDOWN_STR "Time in seconds\n")