From 4c40c302dbcb0677fd932f4fdcaa6d19cc76a03b Mon Sep 17 00:00:00 2001 From: Satoshi Fujimoto Date: Fri, 9 Mar 2018 14:22:59 +0900 Subject: cmd/global: Add help messages for L3VPN and MPLS Signed-off-by: Satoshi Fujimoto --- gobgp/cmd/global.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gobgp/cmd/global.go b/gobgp/cmd/global.go index 63e790f6..98fa5146 100644 --- a/gobgp/cmd/global.go +++ b/gobgp/cmd/global.go @@ -1246,15 +1246,21 @@ func modPath(resource string, name, modtype string, args []string) error { ss = append(ss, "") etherTypes := strings.Join(ss, ", ") helpErrMap := map[bgp.RouteFamily]error{} - ucHelpMsgFmt := fmt.Sprintf(`error: %s -usage: %s rib -a %%s %s [identifier ] [origin { igp | egp | incomplete }] [aspath ] [nexthop
] [med ] [local-pref ] [community ] [aigp metric ] [large-community ]`, + baseHelpMsgFmt := fmt.Sprintf(`error: %s +usage: %s rib -a %%s %s %%s [origin { igp | egp | incomplete }] [aspath ] [nexthop
] [med ] [local-pref ] [community ] [aigp metric ] [large-community ] [aggregator ]`, err, cmdstr, //
modtype, + // ) - helpErrMap[bgp.RF_IPv4_UC] = fmt.Errorf(ucHelpMsgFmt, "ipv4") - helpErrMap[bgp.RF_IPv6_UC] = fmt.Errorf(ucHelpMsgFmt, "ipv6") + helpErrMap[bgp.RF_IPv4_UC] = fmt.Errorf(baseHelpMsgFmt, "ipv4", "[identifier ]") + helpErrMap[bgp.RF_IPv6_UC] = fmt.Errorf(baseHelpMsgFmt, "ipv6", "[identifier ]") + helpErrMap[bgp.RF_IPv4_VPN] = fmt.Errorf(baseHelpMsgFmt, "vpnv4", "label