Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Typos. A bunch of typos I've been collecting.
[vpp.git]
/
test
/
vpp_ipsec.py
diff --git
a/test/vpp_ipsec.py
b/test/vpp_ipsec.py
index
69aebc5
..
5866a0b
100644
(file)
--- a/
test/vpp_ipsec.py
+++ b/
test/vpp_ipsec.py
@@
-1,4
+1,4
@@
-from vpp_object import
*
+from vpp_object import
VppObject
from ipaddress import ip_address
from vpp_papi import VppEnum
from ipaddress import ip_address
from vpp_papi import VppEnum
@@
-41,7
+41,7
@@
class VppIpsecSpd(VppObject):
class VppIpsecSpdItfBinding(VppObject):
"""
VPP SPD DB to interface binding
class VppIpsecSpdItfBinding(VppObject):
"""
VPP SPD DB to interface binding
- (i.e. this SPD is used on this interfce)
+ (i.e. this SPD is used on this interf
a
ce)
"""
def __init__(self, test, spd, itf):
"""
def __init__(self, test, spd, itf):
@@
-213,7
+213,7
@@
class VppIpsecSA(VppObject):
self.tun_dst = ip_address(text_type(tun_dst))
def add_vpp_config(self):
self.tun_dst = ip_address(text_type(tun_dst))
def add_vpp_config(self):
- self.test.vapi.ipsec_sad_entry_add_del(
+
r =
self.test.vapi.ipsec_sad_entry_add_del(
self.id,
self.spi,
self.integ_alg,
self.id,
self.spi,
self.integ_alg,
@@
-224,6
+224,7
@@
class VppIpsecSA(VppObject):
(self.tun_src if self.tun_src else []),
(self.tun_dst if self.tun_dst else []),
flags=self.flags)
(self.tun_src if self.tun_src else []),
(self.tun_dst if self.tun_dst else []),
flags=self.flags)
+ self.stat_index = r.stat_index
self.test.registry.register(self, self.test.logger)
def remove_vpp_config(self):
self.test.registry.register(self, self.test.logger)
def remove_vpp_config(self):
@@
-249,6
+250,10
@@
class VppIpsecSA(VppObject):
def query_vpp_config(self):
bs = self.test.vapi.ipsec_sa_dump()
for b in bs:
def query_vpp_config(self):
bs = self.test.vapi.ipsec_sa_dump()
for b in bs:
- if b.
sa
_id == self.id:
+ if b.
entry.sad
_id == self.id:
return True
return False
return True
return False
+
+ def get_stats(self):
+ c = self.test.statistics.get_counter("/net/ipsec/sa")
+ return c[0][self.stat_index]