UDP-Encap: name counters for the stats segment

change the ADD api so that is returns the 'ID' that can be used
by the client to read the stats from the stats segment and to
delete the object. Previously a similar value used required
to be chosen by the client, now VPP allocates one (like it
does e.g. for interfaces)

Change-Id: I563cf6092276eb990c52d5457c86e72546bcf69e
Signed-off-by: Neale Ranns <nranns@cisco.com>
This commit is contained in:
Neale Ranns
2018-09-07 08:57:41 -07:00
committed by Damjan Marion
parent da8e180262
commit 9c0a3c423e
13 changed files with 168 additions and 235 deletions

View File

@ -666,7 +666,7 @@ class TestBier(VppTestCase):
labels=[VppMplsLabel(2001)])])
ip_route.add_vpp_config()
udp_encap = VppUdpEncap(self, 4,
udp_encap = VppUdpEncap(self,
self.pg0.local_ip4,
nh1,
330, 8138)
@ -677,7 +677,7 @@ class TestBier(VppTestCase):
[VppRoutePath("0.0.0.0",
0xFFFFFFFF,
is_udp_encap=1,
next_hop_id=4)])
next_hop_id=udp_encap.id)])
bier_route.add_vpp_config()
#
@ -727,7 +727,7 @@ class TestBier(VppTestCase):
self.assertEqual(rx[0][IP].dst, nh1)
self.assertEqual(rx[0][UDP].sport, 330)
self.assertEqual(rx[0][UDP].dport, 8138)
self.assertEqual(rx[0][BIFT].bsl, 2)
self.assertEqual(rx[0][BIFT].bsl, BIERLength.BIER_LEN_256)
self.assertEqual(rx[0][BIFT].sd, 1)
self.assertEqual(rx[0][BIFT].set, 0)
self.assertEqual(rx[0][BIFT].ttl, 64)