summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSatoshi Fujimoto <satoshi.fujimoto7@gmail.com>2018-03-09 14:22:59 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-03-20 23:11:00 +0900
commit4c40c302dbcb0677fd932f4fdcaa6d19cc76a03b (patch)
treecd65bc1857187ebc668392741f5ab4a7e585a73d
parentcda7c44afe723be74e39266823b54ba28d0ec019 (diff)
cmd/global: Add help messages for L3VPN and MPLS
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
-rw-r--r--gobgp/cmd/global.go14
1 files 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, "<DEC_NUM>")
etherTypes := strings.Join(ss, ", ")
helpErrMap := map[bgp.RouteFamily]error{}
- ucHelpMsgFmt := fmt.Sprintf(`error: %s
-usage: %s rib -a %%s %s <PREFIX> [identifier <VALUE>] [origin { igp | egp | incomplete }] [aspath <VALUE>] [nexthop <ADDRESS>] [med <VALUE>] [local-pref <VALUE>] [community <VALUE>] [aigp metric <METRIC>] [large-community <VALUE>]`,
+ baseHelpMsgFmt := fmt.Sprintf(`error: %s
+usage: %s rib -a %%s %s <PREFIX> %%s [origin { igp | egp | incomplete }] [aspath <VALUE>] [nexthop <ADDRESS>] [med <VALUE>] [local-pref <VALUE>] [community <VALUE>] [aigp metric <METRIC>] [large-community <VALUE>] [aggregator <AS:ADDRESS>]`,
err,
cmdstr,
// <address family>
modtype,
+ // <label, rd>
)
- 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 <VALUE>]")
+ helpErrMap[bgp.RF_IPv6_UC] = fmt.Errorf(baseHelpMsgFmt, "ipv6", "[identifier <VALUE>]")
+ helpErrMap[bgp.RF_IPv4_VPN] = fmt.Errorf(baseHelpMsgFmt, "vpnv4", "label <LABEL> rd <RD> [rt <RT>]")
+ helpErrMap[bgp.RF_IPv6_VPN] = fmt.Errorf(baseHelpMsgFmt, "vpnv6", "label <LABEL> rd <RD> [rt <RT>]")
+ helpErrMap[bgp.RF_IPv4_MPLS] = fmt.Errorf(baseHelpMsgFmt, "ipv4-mpls", "<LABEL>")
+ helpErrMap[bgp.RF_IPv6_MPLS] = fmt.Errorf(baseHelpMsgFmt, "ipv6-mpls", "<LABEL>")
+
fsHelpMsgFmt := fmt.Sprintf(`error: %s
usage: %s rib -a %%s %s%%s match <MATCH> then <THEN>%%s%%s%%s
<THEN> : { %s |