File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1083,7 +1083,7 @@ func (c LegacyClient) GetStaticRouteList(router string) (routeList []*StaticRout
1083
1083
return parseLrRouteListOutput (output )
1084
1084
}
1085
1085
1086
- var routeRegexp = regexp .MustCompile (`^\s*((\d+(\.\d+){3})|(([a-f0-9:]*:+)+[a-f0-9]?))(/\d+)?\s+((\d+(\.\d+){3})|(([a-f0-9:]*:+)+[a-f0-9]?))\s+(dst-ip|src-ip)(\s+.+)?$` )
1086
+ var routeRegexp = regexp .MustCompile (`^\s*((\d+(\.\d+){3})|(([a-f0-9:]*:+)+[a-f0-9]* ?))(/\d+)?\s+((\d+(\.\d+){3})|(([a-f0-9:]*:+)+[a-f0-9]* ?))\s+(dst-ip|src-ip)(\s+.+)?$` )
1087
1087
1088
1088
func parseLrRouteListOutput (output string ) (routeList []* StaticRoute , err error ) {
1089
1089
lines := strings .Split (output , "\n " )
Original file line number Diff line number Diff line change @@ -21,13 +21,14 @@ func Test_parseLrRouteListOutput(t *testing.T) {
21
21
output = `IPv6 Routes
22
22
fc00:f853:ccd:e793::2 fd00:100:64::2 dst-ip
23
23
fc00:f853:ccd:e793::3 fd00:100:64::3 dst-ip
24
+ fc00:f853:ccd:e793::4 fd00:100:64::4444 dst-ip
24
25
fd00:10:16::2 fd00:100:64::3 src-ip
25
26
fd00:10:16::d fd00:100:64::2 src-ip
26
27
fd00:11:15::/112 fd00:100:64::2 src-ip ecmp
27
28
fd00:11:15::/112 fd00:100:64::3 src-ip ecmp`
28
29
routeList , err = parseLrRouteListOutput (output )
29
30
ast .Nil (err )
30
- ast .Equal (6 , len (routeList ))
31
+ ast .Equal (7 , len (routeList ))
31
32
}
32
33
33
34
func Test_parseLrPolicyRouteListOutput (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments