aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/trunk/trunk.py
blob: 8d177675b081c424342cf575aca4afa5d8308f24 (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
#!/usr/bin/env python

# Copyright (c) 2018 Orange and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0

# pylint: disable=missing-docstring

from six.moves import configparser

from functest.opnfv_tests.openstack.tempest import tempest


class TempestNeutronTrunk(tempest.TempestCommon):
    """Tempest neutron trunk testcase implementation."""

    def configure(self, **kwargs):
        super(TempestNeutronTrunk, self).configure(**kwargs)
        rconfig = configparser.RawConfigParser()
        rconfig.read(self.conf_file)
        rconfig.set('network-feature-enabled', 'api_extensions', 'all')
        with open(self.conf_file, 'wb') as config_file:
            rconfig.write(config_file)
        self.backup_tempest_config(self.conf_file, self.res_dir)