diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-08-18 22:02:06 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-08-23 10:05:19 +0900 |
commit | 008c961ecd943739c5db63fcd931904804a45aa5 (patch) | |
tree | a56ebdc908ce1b387c030cf6223e7f5f5d76d5c8 /test/scenario_test/global_policy_test.py | |
parent | 7e07240b292946c5fdd281fcc06d0cb8438c349a (diff) |
policy cleanup
- remove ReplaceDefinedSet and ReplaceStatement APIs; not intutive and
should create a new one instead of modifying the existing.
- Rename ReplacePolicyAssignment to SetPolicyAssignment API; we use
internally SetPolicy() name from the beginning.
- Rename UpdatePolicy() to SetPolicies() API; It doesn't update
anything so the name is confusing. It discards the all policies and
create policies from the argument.
- Changes some member names in structures for policy.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/global_policy_test.py')
-rw-r--r-- | test/scenario_test/global_policy_test.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/scenario_test/global_policy_test.py b/test/scenario_test/global_policy_test.py index ff534d8f..34a96d48 100644 --- a/test/scenario_test/global_policy_test.py +++ b/test/scenario_test/global_policy_test.py @@ -215,7 +215,10 @@ class GoBGPTestBase(unittest.TestCase): self.assertTrue(self.gobgp.get_adj_rib_out(q1)[0]['nlri']['prefix'] == u'10.20.0.0/24') def test_15_route_type_condition_internal(self): - self.gobgp.local('gobgp policy statement st2 set condition route-type internal') + self.gobgp.local('gobgp policy statement st22 add action accept') + self.gobgp.local('gobgp policy statement st22 add condition route-type internal') + self.gobgp.local('gobgp policy add p2 st22') + self.gobgp.local('gobgp policy del p2 st2') for q in self.quaggas.itervalues(): self.gobgp.softreset(q, type='out') @@ -231,7 +234,10 @@ class GoBGPTestBase(unittest.TestCase): self.assertTrue(self.gobgp.get_adj_rib_out(q1)[0]['nlri']['prefix'] == u'10.30.0.0/24') def test_16_route_type_condition_external(self): - self.gobgp.local('gobgp policy statement st2 set condition route-type external') + self.gobgp.local('gobgp policy statement st222 add action accept') + self.gobgp.local('gobgp policy statement st222 add condition route-type external') + self.gobgp.local('gobgp policy add p2 st222') + self.gobgp.local('gobgp policy del p2 st22') for q in self.quaggas.itervalues(): self.gobgp.softreset(q, type='out') |