示例#1
0
    def test_get_existing_traffic_profile(self):
        traffic_profile_list = [
            'RFC2544Profile', 'FixedProfile', 'TrafficProfileGenericHTTP',
            'IXIARFC2544Profile', 'ProxACLProfile', 'ProxBinSearchProfile',
            'ProxProfile', 'ProxRampProfile'
        ]
        with mock.patch.dict(sys.modules, y_tests.STL_MOCKS):
            tprofile_package.register_modules()

            for tp in traffic_profile_list:
                traffic_profile = base.TrafficProfile.get(
                    {'traffic_profile': {
                        'traffic_type': tp
                    }})
                self.assertEqual(tp, traffic_profile.__class__.__name__)
示例#2
0
from yardstick.benchmark.contexts import base as context_base
from yardstick.benchmark.scenarios import base as scenario_base
from yardstick.common.constants import LOG_DIR
from yardstick.common import exceptions
from yardstick.common.process import terminate_children
from yardstick.common import utils
from yardstick.network_services.collector.subscriber import Collector
from yardstick.network_services.vnf_generic import vnfdgen
from yardstick.network_services.vnf_generic.vnf.base import GenericVNF
from yardstick.network_services import traffic_profile
from yardstick.network_services.traffic_profile import base as tprofile_base
from yardstick.network_services.utils import get_nsb_option
from yardstick import ssh

traffic_profile.register_modules()

LOG = logging.getLogger(__name__)


class NetworkServiceTestCase(scenario_base.Scenario):
    """Class handles Generic framework to do pre-deployment VNF &
       Network service testing  """

    __scenario_type__ = "NSPerf"

    def __init__(self, scenario_cfg, context_cfg):  # pragma: no cover
        super(NetworkServiceTestCase, self).__init__()
        self.scenario_cfg = scenario_cfg
        self.context_cfg = context_cfg