tests: Rework vpp config generation. 19/16519/3
authorPaul Vinciguerra <pvinci@vinciconsulting.com>
Tue, 18 Dec 2018 05:43:43 +0000 (21:43 -0800)
committerOle Trøan <otroan@employees.org>
Fri, 21 Dec 2018 07:49:37 +0000 (07:49 +0000)
commit919efad2671993d4c6d5a0dba8eeb99d5c60edf1
tree7798b4deaa7057817194a59e1b7d94a99f3e460d
parente21463d87979a49720bf1eb1744f01261ffea620
tests: Rework vpp config generation.

* Allows test cases to configure the VPP runtime config
  during fixture setup.

* Sample use in a TestCase:
    @classmethod
    def setUpConstants(cls):
        tempdir = cls.tempdir
        cls.config.add('punt', 'socket', '%s/socket_punt' % cls.tempdir)
        super(TestPuntSocket, cls).setUpConstants()
        # enable/disabe a plugin via:
        #cls.config.add_plugin('dpdk_plugin.so', 'disable')

* Supports the following config stanzas:
'unix',
        'acl-plugin'
        'api-queue'
        'api-trace'
        'api-segment'
        'cj'
        'cpu'
        'dns'
        'dpdk
        # currently don't support dynamic keys
        # 'heapsize'
        'l2learn'
        'l2tp'
        'mactime'
        'mc'
        'nat'
        'oam'
        'plugins'
        'punt'
        'session'
        'socksvr'
        'statseg'
        'tapcli'
        'tcp'
        'tuntap'
        'vhost-user'

Change-Id: I44f276487267d26eaa46f87e730bdd861003b234
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
test/framework.py
test/test_punt.py
test/vpp_config.py [new file with mode: 0644]