blob: de39cc24ebdea3a789dd81b5affb2cea78340c1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
from __future__ import print_function
import unittest, sys, time, threading, struct
import vpp_papi
from ipaddress import *
import glob, subprocess
class TestPAPI(unittest.TestCase):
def setUp(self):
print("Connecting API")
r = vpp_papi.connect("test_papi")
self.assertEqual(r, 0)
def tearDown(self):
r = vpp_papi.disconnect()
self.assertEqual(r, 0)
#
# The tests themselves
#
#
# Basic request / reply
#
def test_show_version(self):
print(vpp_papi.show_version())
#
# Details / Dump
#
def test_details_dump(self):
t = vpp_papi.sw_interface_dump(0, b'')
print('Dump/details T', t)
if __name__ == '__main__':
unittest.main()
|