aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/python/tests/test_cli.py
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2018-06-12 21:06:44 +0200
committerFlorin Coras <florin.coras@gmail.com>2018-06-22 03:00:45 +0000
commita7564e8004fd6d9a63eb0605f752f27a71403645 (patch)
tree15a97b1b7852dfbdee28c56e0d58218689126c1b /src/vpp-api/python/tests/test_cli.py
parentd600ffe13a0f8f5d11fdea6ab7b24a364c968347 (diff)
Python API: Add enum and union support.
As well as a rewrite of the encoders/decoders to make it more readable and extensible. (Re-commit after fix to verify build.) Change-Id: Ic244d3cebe070bb2570491f8a24f4a1e203f889a Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp-api/python/tests/test_cli.py')
-rwxr-xr-xsrc/vpp-api/python/tests/test_cli.py52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/vpp-api/python/tests/test_cli.py b/src/vpp-api/python/tests/test_cli.py
deleted file mode 100755
index 66fb6943e70..00000000000
--- a/src/vpp-api/python/tests/test_cli.py
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env python
-
-from __future__ import print_function
-import unittest, sys, time, threading, struct
-import test_base
-import vpp_papi
-from ipaddress import *
-
-import glob, subprocess
-class TestPAPI(unittest.TestCase):
- @classmethod
- def setUpClass(cls):
- #
- # Start main VPP process
- cls.vpp_bin = glob.glob(test_base.scriptdir+'/../../../build-root/install-vpp*-native/vpp/bin/vpp')[0]
- print("VPP BIN:", cls.vpp_bin)
- cls.vpp = subprocess.Popen([cls.vpp_bin, "unix", "nodaemon"], stderr=subprocess.PIPE)
- print('Started VPP')
- # For some reason unless we let VPP start up the API cannot connect.
- time.sleep(0.3)
- @classmethod
- def tearDownClass(cls):
- cls.vpp.terminate()
-
- 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_cli_request(self):
- print(vpp_papi.cli_exec('show version verbose'))
- #t = vpp_papi.cli_inband_request(len(cmd), cmd)
- #print('T:',t)
- #reply = t.reply[0].decode().rstrip('\x00')
- #print(reply)
- #program = t.program.decode().rstrip('\x00')
- #self.assertEqual('vpe', program)
-
-
-if __name__ == '__main__':
- unittest.main()