]> git.proxmox.com Git - mirror_frr.git/commitdiff
*: apply DEFUN_NOSH for node-switch CLI commands
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 22 Mar 2017 09:38:22 +0000 (10:38 +0100)
committerQuentin Young <qlyoung@users.noreply.github.com>
Tue, 28 Mar 2017 19:48:07 +0000 (15:48 -0400)
These have copies in vtysh that do the node-switch locally and are
listed in extract.pl's ignore list.  The ignore list however is
redundant since DEFUN_NOSH does the same thing...

ldpd is a bit hacky, but Renato is reworking this anyway.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
14 files changed:
bgpd/bgp_vty.c
bgpd/rfapi/bgp_rfapi_cfg.c
isisd/isisd.c
ldpd/Makefile.am
lib/keychain.c
lib/ns.c
lib/routemap.c
lib/vrf.c
lib/vty.c
ospf6d/ospf6_top.c
ospfd/ospf_vty.c
ripd/ripd.c
ripngd/ripngd.c
zebra/interface.c

index dba336051acabb87154e82e0541b3761f48753c8..e94de682d58af1feea9f0ad2b0c3130e64e24efa 100644 (file)
@@ -806,7 +806,7 @@ DEFUN (no_auto_summary,
 }
 
 /* "router bgp" commands. */
-DEFUN (router_bgp,
+DEFUN_NOSH (router_bgp,
        router_bgp_cmd,
        "router bgp [(1-4294967295) [<view|vrf> WORD]]",
        ROUTER_STR
@@ -5647,7 +5647,7 @@ DEFUN (no_neighbor_addpath_tx_bestpath_per_as,
                                 PEER_FLAG_ADDPATH_TX_BESTPATH_PER_AS);
 }
 
-DEFUN (address_family_ipv4_safi,
+DEFUN_NOSH (address_family_ipv4_safi,
        address_family_ipv4_safi_cmd,
        "address-family ipv4 [<unicast|multicast|vpn|encap>]",
        "Enter Address Family command mode\n"
@@ -5680,7 +5680,7 @@ DEFUN (address_family_ipv4_safi,
   return CMD_SUCCESS;
 }
 
-DEFUN (address_family_ipv6_safi,
+DEFUN_NOSH (address_family_ipv6_safi,
        address_family_ipv6_safi_cmd,
        "address-family ipv6 [<unicast|multicast|vpn|encap>]",
        "Enter Address Family command mode\n"
@@ -5714,7 +5714,7 @@ DEFUN (address_family_ipv6_safi,
 }
 
 #ifdef KEEP_OLD_VPN_COMMANDS
-DEFUN (address_family_vpnv4,
+DEFUN_NOSH (address_family_vpnv4,
        address_family_vpnv4_cmd,
        "address-family vpnv4 [unicast]",
        "Enter Address Family command mode\n"
@@ -5725,7 +5725,7 @@ DEFUN (address_family_vpnv4,
   return CMD_SUCCESS;
 }
 
-DEFUN (address_family_vpnv6,
+DEFUN_NOSH (address_family_vpnv6,
        address_family_vpnv6_cmd,
        "address-family vpnv6 [unicast]",
        "Enter Address Family command mode\n"
@@ -5737,7 +5737,7 @@ DEFUN (address_family_vpnv6,
 }
 #endif
 
-DEFUN (address_family_encap,
+DEFUN_NOSH (address_family_encap,
        address_family_encap_cmd,
        "address-family <encap|encapv4>",
        "Enter Address Family command mode\n"
@@ -5749,7 +5749,7 @@ DEFUN (address_family_encap,
 }
 
 
-DEFUN (address_family_encapv6,
+DEFUN_NOSH (address_family_encapv6,
        address_family_encapv6_cmd,
        "address-family encapv6",
        "Enter Address Family command mode\n"
@@ -5759,7 +5759,7 @@ DEFUN (address_family_encapv6,
   return CMD_SUCCESS;
 }
 
-DEFUN (address_family_evpn,
+DEFUN_NOSH (address_family_evpn,
        address_family_evpn_cmd,
        "address-family <l2vpn evpn>",
        "Enter Address Family command mode\n"
@@ -5771,7 +5771,7 @@ DEFUN (address_family_evpn,
   return CMD_SUCCESS;
 }
 
-DEFUN (exit_address_family,
+DEFUN_NOSH (exit_address_family,
        exit_address_family_cmd,
        "exit-address-family",
        "Exit from Address Family configuration mode\n")
index 71086c875871882468e162e88dd2dba88fdb4ee5..aa48b4924afed9927fa40dfba5c4d73c3bf30a54 100644 (file)
@@ -323,7 +323,7 @@ DEFUN (vnc_advertise_un_method,
  *-----------------------------------------------------------------------*/
 
 
-DEFUN (vnc_defaults,
+DEFUN_NOSH (vnc_defaults,
        vnc_defaults_cmd,
        "vnc defaults", VNC_CONFIG_STR "Configure default NVE group\n")
 {
@@ -2419,7 +2419,7 @@ vnc_routemap_event (route_map_event_t type,     /* ignored */
  *-----------------------------------------------------------------------*/
 
 
-DEFUN (vnc_nve_group,
+DEFUN_NOSH (vnc_nve_group,
        vnc_nve_group_cmd,
        "vnc nve-group NAME",
        VNC_CONFIG_STR "Configure a NVE group\n" "Group name\n")
@@ -3223,7 +3223,7 @@ DEFUN (vnc_nve_group_responselifetime,
  * with the lack of rigorous level control in the command handler. 
  * TBD fix command handler.
  */
-DEFUN (exit_vnc,
+DEFUN_NOSH (exit_vnc,
        exit_vnc_cmd,
        "exit-vnc",
        "Exit VNC configuration mode\n")
@@ -3255,7 +3255,7 @@ static struct cmd_node bgp_vnc_nve_group_node = {
  * Note there are two types of NVEs, one for VPNs one for RFP NVEs
  *-----------------------------------------------------------------------*/
 
-DEFUN (vnc_vrf_policy,
+DEFUN_NOSH (vnc_vrf_policy,
        vnc_vrf_policy_cmd,
        "vrf-policy NAME",
        "Configure a VRF policy group\n"
@@ -3720,7 +3720,7 @@ DEFUN (vnc_vrf_policy_rd,
   return CMD_SUCCESS;
 }
 
-DEFUN (exit_vrf_policy,
+DEFUN_NOSH (exit_vrf_policy,
        exit_vrf_policy_cmd,
        "exit-vrf-policy",
        "Exit VRF policy configuration mode\n")
@@ -3743,7 +3743,7 @@ static struct cmd_node bgp_vrf_policy_node = {
  *-----------------------------------------------------------------------*/
 
 
-DEFUN (vnc_l2_group,
+DEFUN_NOSH (vnc_l2_group,
        vnc_l2_group_cmd,
        "vnc l2-group NAME",
        VNC_CONFIG_STR "Configure a L2 group\n" "Group name\n")
index 2863d2f67885cbd0c7bd81a3289292d834204bad..f226c4a1f3cdea0679c3235c24dae8f7fc7583f6 100644 (file)
@@ -1576,7 +1576,7 @@ DEFUN (show_database,
 /* 
  * 'router isis' command 
  */
-DEFUN (router_isis,
+DEFUN_NOSH (router_isis,
        router_isis_cmd,
        "router isis WORD",
        ROUTER_STR
index 42e54138aaa453a3dac83f0faa886a9f80790ebe..19f819ae365d00fc3559a7d6d192cfca91da2afe 100644 (file)
@@ -24,7 +24,9 @@ noinst_HEADERS = \
        control.h lde.h ldpd.h ldpe.h ldp.h log.h ldp_debug.h ldp_vty.h
 
 ldp_vty_cmds.c: $(srcdir)/ldp_vty.xml $(srcdir)/../tools/xml2cli.pl
-       @PERL@ $(srcdir)/../tools/xml2cli.pl $(srcdir)/ldp_vty.xml > $@
+       @PERL@ $(srcdir)/../tools/xml2cli.pl $(srcdir)/ldp_vty.xml | \
+               sed -e 's%DEFUN \((ldp_\(interface_\|mpls_ldp\|address_family\|l2vpn_word\|member_pseudo\)\)%DEFUN_NOSH \1%' \
+               > $@
 
 ldpd_SOURCES = ldpd.c
 ldpd_LDADD = libldp.a ../lib/libfrr.la @LIBCAP@
index cd8039b95bd95219afd263ac6c03e7408ff9e272..95a2c8e599a1f7d56df8f27fd4d7731adc4c8444 100644 (file)
@@ -240,7 +240,7 @@ key_delete (struct keychain *keychain, struct key *key)
   key_free (key);
 }
 
-DEFUN (key_chain,
+DEFUN_NOSH (key_chain,
        key_chain_cmd,
        "key chain WORD",
        "Authentication key management\n"
@@ -280,7 +280,7 @@ DEFUN (no_key_chain,
   return CMD_SUCCESS;
 }
 
-DEFUN (key,
+DEFUN_NOSH (key,
        key_cmd,
        "key (0-2147483647)",
        "Configure a key\n"
index 1673ac0a66c5482dbbc30c554c16181b45fe85a5..ae0a24668eef566dbcf920581dca01486c186358 100644 (file)
--- a/lib/ns.c
+++ b/lib/ns.c
@@ -304,7 +304,7 @@ ns_netns_pathname (struct vty *vty, const char *name)
   return pathname;
 }
 
-DEFUN (ns_netns,
+DEFUN_NOSH (ns_netns,
        ns_netns_cmd,
        "logical-router (1-65535) ns NAME",
        "Enable a logical-router\n"
index 1647ac36683c7102275b5311ddc8642dc5df5e10..cd34ffaae5349567bc277c7b1537eafb99dc4f43 100644 (file)
@@ -2538,7 +2538,7 @@ DEFUN (no_set_tag,
 
 
 
-DEFUN (route_map,
+DEFUN_NOSH (route_map,
        route_map_cmd,
        "route-map WORD <deny|permit> (1-65535)",
        "Create route-map or enter route-map command mode\n"
@@ -2754,7 +2754,7 @@ DEFUN (no_rmap_continue,
 }
 
 
-DEFUN (rmap_show_name,
+DEFUN_NOSH (rmap_show_name,
        rmap_show_name_cmd,
        "show route-map [WORD]",
        SHOW_STR
index ab7b43b078231145853e21c61df3b69f917f8255..ce57bb6e7a1c3d84da250526fdfb1a77c7f97691 100644 (file)
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -474,7 +474,7 @@ vrf_socket (int domain, int type, int protocol, vrf_id_t vrf_id)
 }
 
 /* vrf CLI commands */
-DEFUN (vrf,
+DEFUN_NOSH (vrf,
        vrf_cmd,
        "vrf NAME",
        "Select a VRF to configure\n"
index c6fc1e1b14d7f0c94f87874c9a3cc5ed495db0ab..36755b1d9526cf9f8f356858c66cf5b805edb17c 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2660,7 +2660,7 @@ vty_event (enum event event, int sock, struct vty *vty)
     }
 }
 
-DEFUN (config_who,
+DEFUN_NOSH (config_who,
        config_who_cmd,
        "who",
        "Display who is on vty\n")
@@ -2677,7 +2677,7 @@ DEFUN (config_who,
 }
 
 /* Move to vty configuration mode. */
-DEFUN (line_vty,
+DEFUN_NOSH (line_vty,
        line_vty_cmd,
        "line vty",
        "Configure a terminal line\n"
@@ -2867,7 +2867,7 @@ DEFUN (no_service_advanced_vty,
   return CMD_SUCCESS;
 }
 
-DEFUN (terminal_monitor,
+DEFUN_NOSH (terminal_monitor,
        terminal_monitor_cmd,
        "terminal monitor",
        "Set terminal line parameters\n"
@@ -2877,7 +2877,7 @@ DEFUN (terminal_monitor,
   return CMD_SUCCESS;
 }
 
-DEFUN (terminal_no_monitor,
+DEFUN_NOSH (terminal_no_monitor,
        terminal_no_monitor_cmd,
        "terminal no monitor",
        "Set terminal line parameters\n"
@@ -2888,7 +2888,7 @@ DEFUN (terminal_no_monitor,
   return CMD_SUCCESS;
 }
 
-DEFUN (no_terminal_monitor,
+DEFUN_NOSH (no_terminal_monitor,
        no_terminal_monitor_cmd,
        "no terminal monitor",
        NO_STR
@@ -2899,7 +2899,7 @@ DEFUN (no_terminal_monitor,
 }
 
 
-DEFUN (show_history,
+DEFUN_NOSH (show_history,
        show_history_cmd,
        "show history",
        SHOW_STR
index a367d1e141639d8857cdee7fe83dd318fb0d9d57..74e49a21bb1c7ee7d6ad79669c14f06d2e9b10e8 100644 (file)
@@ -288,7 +288,7 @@ ospf6_maxage_remove (struct ospf6 *o)
 }
 
 /* start ospf6 */
-DEFUN (router_ospf6,
+DEFUN_NOSH (router_ospf6,
        router_ospf6_cmd,
        "router ospf6",
        ROUTER_STR
index 71befc84b55d59a94fb04a200131be328a110d03..c51e176c7434280fafc3a866c6875f0fb61f0095 100644 (file)
@@ -144,7 +144,7 @@ ospf_oi_count (struct interface *ifp)
   return i;
 }
 
-DEFUN (router_ospf,
+DEFUN_NOSH (router_ospf,
        router_ospf_cmd,
        "router ospf [(1-65535)]",
        "Enable a routing process\n"
index 82e460ced8fc857326f90064eb9497c0eb91a79d..45d5bf1ead9b48d52e2c017d3347f63e6e1ffda5 100644 (file)
@@ -2802,7 +2802,7 @@ rip_event (enum rip_event event, int sock)
     }
 }
 
-DEFUN (router_rip,
+DEFUN_NOSH (router_rip,
        router_rip_cmd,
        "router rip",
        "Enable a routing process\n"
index caad85457a1b9c75323c34fb5b284adea2608cba..a883bec3c43f491f9fa468b87c7e8e1405678e31 100644 (file)
@@ -2215,7 +2215,7 @@ DEFUN (clear_ipv6_rip,
   return CMD_SUCCESS;
 }
 
-DEFUN (router_ripng,
+DEFUN_NOSH (router_ripng,
        router_ripng_cmd,
        "router ripng",
        "Enable a routing process\n"
index 9abb54cec8bd6580665a087887760a7ba51c68f8..e9c54a629bed7d97c37664909ef5e8c8bf5e96c1 100644 (file)
@@ -1697,7 +1697,7 @@ link_param_cmd_unset (struct interface *ifp, uint32_t type)
     zebra_interface_parameters_update (ifp);
 }
 
-DEFUN (link_params,
+DEFUN_NOSH (link_params,
        link_params_cmd,
        "link-params",
        LINK_PARAMS_STR)
@@ -1708,7 +1708,7 @@ DEFUN (link_params,
   return CMD_SUCCESS;
 }
 
-DEFUN (exit_link_params,
+DEFUN_NOSH (exit_link_params,
        exit_link_params_cmd,
        "exit-link-params",
        "Exit from Link Params configuration mode\n")