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