diff options
author | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-06-29 11:42:59 +0900 |
---|---|---|
committer | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-06-29 12:30:09 +0900 |
commit | 420d403e483178abd16d61ae249247e29978769c (patch) | |
tree | 38716aa698cbf647957d1f4d3592bd53cc36323c /tools | |
parent | 16f582dfd2b9ddc9d9434a7831f7392df13707cb (diff) |
tool: update example_toml.go
Diffstat (limited to 'tools')
-rw-r--r-- | tools/config/example_toml.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/config/example_toml.go b/tools/config/example_toml.go index 607e6a63..a6afe9d3 100644 --- a/tools/config/example_toml.go +++ b/tools/config/example_toml.go @@ -72,9 +72,30 @@ func policy() config.RoutingPolicy { }}, } + cs := config.CommunitySet{ + CommunitySetName: "community1", + CommunityMembers: []string{"65100:10"}, + } + + as := config.AsPathSet{ + AsPathSetName: "aspath1", + AsPathSetMembers: []string{"^65100"}, + } + + bds := config.BgpDefinedSets{ + CommunitySetList: []config.CommunitySet{cs}, + AsPathSetList: []config.AsPathSet{as}, + } + ds := config.DefinedSets{ PrefixSetList: []config.PrefixSet{ps}, NeighborSetList: []config.NeighborSet{ns}, + BgpDefinedSets: bds, + } + + al := config.AsPathLength{ + Operator: "eq", + Value: 2, } s := config.Statement{ @@ -83,10 +104,22 @@ func policy() config.RoutingPolicy { MatchPrefixSet: "ps1", MatchNeighborSet: "ns1", MatchSetOptions: config.MATCH_SET_OPTIONS_TYPE_ALL, + BgpConditions: config.BgpConditions{ + MatchCommunitySet: "community1", + MatchAsPathSet: "aspath1", + AsPathLength: al, + }, }, Actions: config.Actions{ AcceptRoute: false, RejectRoute: true, + BgpActions: config.BgpActions{ + SetCommunity: config.SetCommunity{ + Communities: []string{"65100:20"}, + Options: "ADD", + }, + SetMed: "-200", + }, }, } |