diff options
author | Neale Ranns <neale@graphiant.com> | 2021-06-24 14:57:56 +0000 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2021-06-28 21:26:30 +0000 |
commit | ff2e4138cc020dea4ab0f21f1b172b28f5ed3565 (patch) | |
tree | 9ba66a5ef80aff8d8d8fb56c6f7d1cd873d70380 /test/vpp_ipsec.py | |
parent | 9c23ff8c8ab2ba881540a1c9c6d331d2ed6c8c6a (diff) |
ipsec: Split the SA add_del API into an separate add and del
Type: improvement
the rationale being that the del only requires the SA's ID, so it's a
bit mean to require the client to fill out all the other information as
well.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ibbc20405e74d6a0e1a3797465ead5271f15888e4
Diffstat (limited to 'test/vpp_ipsec.py')
-rw-r--r-- | test/vpp_ipsec.py | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/test/vpp_ipsec.py b/test/vpp_ipsec.py index 2bf7eda4c23..57e5f02696c 100644 --- a/test/vpp_ipsec.py +++ b/test/vpp_ipsec.py @@ -267,31 +267,13 @@ class VppIpsecSA(VppObject): entry['udp_src_port'] = self.udp_src if self.udp_dst: entry['udp_dst_port'] = self.udp_dst - r = self.test.vapi.ipsec_sad_entry_add_del_v3(is_add=1, entry=entry) + r = self.test.vapi.ipsec_sad_entry_add(entry=entry) self.stat_index = r.stat_index self.test.registry.register(self, self.test.logger) return self def remove_vpp_config(self): - r = self.test.vapi.ipsec_sad_entry_add_del_v3( - is_add=0, - entry={ - 'sad_id': self.id, - 'spi': self.spi, - 'integrity_algorithm': self.integ_alg, - 'integrity_key': { - 'length': len(self.integ_key), - 'data': self.integ_key, - }, - 'crypto_algorithm': self.crypto_alg, - 'crypto_key': { - 'data': self.crypto_key, - 'length': len(self.crypto_key), - }, - 'protocol': self.proto, - 'tunnel': self.tunnel_encode(), - 'salt': self.salt - }) + self.test.vapi.ipsec_sad_entry_del(id=self.id) def object_id(self): return "ipsec-sa-%d" % self.id |