summaryrefslogtreecommitdiffstats
path: root/vpp-api/python/tests/test_version.py
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2016-09-12 22:00:32 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2016-09-23 13:18:46 +0000
commit57c3d66c55580f2ced6993ada22274941237fcd5 (patch)
tree55a856b3ddcc4f9e5284c7bc42b0126616825366 /vpp-api/python/tests/test_version.py
parent5fef9e523df67a96f3b9aedcec373e65f590b001 (diff)
Python API: Preparation for RPM/DEB packaging.
Recheck. Repackage the Python API binding to include all necessary modules in a single Python package. Change-Id: I5e35141d413bfb1aad650217e1ca07d85646c349 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'vpp-api/python/tests/test_version.py')
-rwxr-xr-xvpp-api/python/tests/test_version.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/vpp-api/python/tests/test_version.py b/vpp-api/python/tests/test_version.py
new file mode 100755
index 00000000000..de39cc24ebd
--- /dev/null
+++ b/vpp-api/python/tests/test_version.py
@@ -0,0 +1,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()