From 008c961ecd943739c5db63fcd931904804a45aa5 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sat, 18 Aug 2018 22:02:06 +0900 Subject: 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 --- test/scenario_test/global_policy_test.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test') 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') -- cgit v1.2.3