diff options
author | Naoto Hanaue <hanaue.naoto@po.ntts.co.jp> | 2015-08-05 17:21:51 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-05 22:12:24 +0900 |
commit | ad4bfac371e545e2713e9157cc6e5f6af5278635 (patch) | |
tree | 46e44865c4b74af43c262f366c5fa3d0cb870b11 /test/scenario_test/policy/policy_generator.go | |
parent | 0b5bb073128b3000f383927a997d4a40d274f569 (diff) |
config: change type of Prefix in the PrefixSet
Diffstat (limited to 'test/scenario_test/policy/policy_generator.go')
-rw-r--r-- | test/scenario_test/policy/policy_generator.go | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/test/scenario_test/policy/policy_generator.go b/test/scenario_test/policy/policy_generator.go index 6576c76c..af252031 100644 --- a/test/scenario_test/policy/policy_generator.go +++ b/test/scenario_test/policy/policy_generator.go @@ -73,16 +73,11 @@ func bindPolicy(outputDir, peer, target, policyName string, isReplace bool, defa func createPolicyConfig() *config.RoutingPolicy { - cidr := func(pref string) net.IPNet { - _, n, _ := net.ParseCIDR(pref) - return *n - } - ps0 := config.PrefixSet{ PrefixSetName: "ps0", PrefixList: []config.Prefix{ config.Prefix{ - IpPrefix: cidr("192.168.0.0/16"), + IpPrefix: "192.168.0.0/16", MasklengthRange: "16..24", }}, } @@ -91,9 +86,9 @@ func createPolicyConfig() *config.RoutingPolicy { PrefixSetName: "ps1", PrefixList: []config.Prefix{ config.Prefix{ - IpPrefix: cidr("192.168.20.0/24"), + IpPrefix: "192.168.20.0/24", }, config.Prefix{ - IpPrefix: cidr("192.168.200.0/24"), + IpPrefix: "192.168.200.0/24", }}, } @@ -101,7 +96,7 @@ func createPolicyConfig() *config.RoutingPolicy { PrefixSetName: "ps2", PrefixList: []config.Prefix{ config.Prefix{ - IpPrefix: cidr("192.168.20.0/24"), + IpPrefix: "192.168.20.0/24", }}, } @@ -109,7 +104,7 @@ func createPolicyConfig() *config.RoutingPolicy { PrefixSetName: "ps3", PrefixList: []config.Prefix{ config.Prefix{ - IpPrefix: cidr("2001:0:10:2::/64"), + IpPrefix: "2001:0:10:2::/64", MasklengthRange: "64..128", }}, } @@ -118,9 +113,9 @@ func createPolicyConfig() *config.RoutingPolicy { PrefixSetName: "ps4", PrefixList: []config.Prefix{ config.Prefix{ - IpPrefix: cidr("2001:0:10:20::/64"), + IpPrefix: "2001:0:10:20::/64", }, config.Prefix{ - IpPrefix: cidr("2001:0:10:200::/64"), + IpPrefix: "2001:0:10:200::/64", }}, } @@ -128,7 +123,7 @@ func createPolicyConfig() *config.RoutingPolicy { PrefixSetName: "ps5", PrefixList: []config.Prefix{ config.Prefix{ - IpPrefix: cidr("2001:0:10:20::/64"), + IpPrefix: "2001:0:10:20::/64", }}, } @@ -136,7 +131,7 @@ func createPolicyConfig() *config.RoutingPolicy { PrefixSetName: "ps6", PrefixList: []config.Prefix{ config.Prefix{ - IpPrefix: cidr("192.168.10.0/24"), + IpPrefix: "192.168.10.0/24", }}, } @@ -168,7 +163,7 @@ func createPolicyConfig() *config.RoutingPolicy { PrefixSetName: "psExabgp", PrefixList: []config.Prefix{ config.Prefix{ - IpPrefix: cidr("192.168.100.0/24"), + IpPrefix: "192.168.100.0/24", MasklengthRange: "16..24", }}, } |