summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorNaoto Hanaue <hanaue.naoto@po.ntts.co.jp>2015-08-05 13:23:12 +0900
committerNaoto Hanaue <hanaue.naoto@po.ntts.co.jp>2015-08-05 15:04:03 +0900
commitb7d8d53c486eff0370e9908e75a97b7d8816725c (patch)
treec47a6749af89f6116ea2a6675727237002e152f1 /test
parent064c8834e94349f611be6e9555ec355bd1aef351 (diff)
config: change the structure of AsPathSet, CommunitySet and ExtCommunitySet as the PrefixSet
Diffstat (limited to 'test')
-rw-r--r--test/scenario_test/policy/policy_generator.go42
1 files changed, 29 insertions, 13 deletions
diff --git a/test/scenario_test/policy/policy_generator.go b/test/scenario_test/policy/policy_generator.go
index d1a32299..6576c76c 100644
--- a/test/scenario_test/policy/policy_generator.go
+++ b/test/scenario_test/policy/policy_generator.go
@@ -174,41 +174,57 @@ func createPolicyConfig() *config.RoutingPolicy {
}
aspathFrom := config.AsPathSet{
- AsPathSetName: "aspathFrom",
- AsPathSetMember: []string{"^65100"},
+ AsPathSetName: "aspathFrom",
+ AsPathList: []config.AsPath{
+ config.AsPath{"^65100"},
+ },
}
aspathAny := config.AsPathSet{
- AsPathSetName: "aspAny",
- AsPathSetMember: []string{"65098"},
+ AsPathSetName: "aspAny",
+ AsPathList: []config.AsPath{
+ config.AsPath{"65098"},
+ },
}
aspathOrigin := config.AsPathSet{
- AsPathSetName: "aspOrigin",
- AsPathSetMember: []string{"65091$"},
+ AsPathSetName: "aspOrigin",
+ AsPathList: []config.AsPath{
+ config.AsPath{"65091$"},
+ },
}
aspathOnly := config.AsPathSet{
- AsPathSetName: "aspOnly",
- AsPathSetMember: []string{"^65100$"},
+ AsPathSetName: "aspOnly",
+ AsPathList: []config.AsPath{
+ config.AsPath{"^65100$"},
+ },
}
comStr := config.CommunitySet{
CommunitySetName: "comStr",
- CommunityMember: []string{"65100:10"},
+ CommunityList: []config.Community{
+ config.Community{"65100:10"},
+ },
}
comRegExp := config.CommunitySet{
CommunitySetName: "comRegExp",
- CommunityMember: []string{"6[0-9]+:[0-9]+"},
+ CommunityList: []config.Community{
+ config.Community{"6[0-9]+:[0-9]+"},
+ },
}
eComOrigin := config.ExtCommunitySet{
ExtCommunitySetName: "eComOrigin",
- ExtCommunityMember: []string{"SoO:65001.65100:200"},
+ ExtCommunityList: []config.ExtCommunity{
+ config.ExtCommunity{"SoO:65001.65100:200"},
+ },
}
eComTarget := config.ExtCommunitySet{
ExtCommunitySetName: "eComTarget",
- ExtCommunityMember: []string{"RT:6[0-9]+:3[0-9]+"},
+ ExtCommunityList: []config.ExtCommunity{
+ config.ExtCommunity{"RT:6[0-9]+:3[0-9]+"},
+ },
}
createStatement := func(name string, ps, ns string, accept bool) config.Statement {
@@ -639,7 +655,7 @@ func createPolicyConfig() *config.RoutingPolicy {
test_42_only_prefix_condition_accept := config.PolicyDefinition{
Name: "test_42_only_prefix_condition_accept",
- Statements : config.Statements{
+ Statements: config.Statements{
StatementList: []config.Statement{st_only_prefix_condition_accept},
},
}