#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
be expected that the user have access to the IxNetwork machine should
this trafficgen need to be debugged.
"""
be expected that the user have access to the IxNetwork machine should
this trafficgen need to be debugged.
"""
from collections import OrderedDict
from tools.pkt_gen import trafficgen
from conf import settings
from collections import OrderedDict
from tools.pkt_gen import trafficgen
from conf import settings
from core.results.results_constants import ResultsConstants
_ROOT_DIR = os.path.dirname(os.path.realpath(__file__))
from core.results.results_constants import ResultsConstants
_ROOT_DIR = os.path.dirname(os.path.realpath(__file__))
- # Not allowing derived dictionary types for now
- # pylint: disable=unidiomatic-typecheck
- if type(value) == dict:
+ if isinstance(value, dict):
_prefix = ' '.join([prefix, key]).strip()
for subkey in _build_set_cmds(value, _prefix):
yield subkey
continue
_prefix = ' '.join([prefix, key]).strip()
for subkey in _build_set_cmds(value, _prefix):
yield subkey
continue
# tcl doesn't recognise the strings "True" or "False", only "1"
# or "0". Special case to convert them
# tcl doesn't recognise the strings "True" or "False", only "1"
# or "0". Special case to convert them
self._cfg = {
'lib_path': settings.getValue('TRAFFICGEN_IXNET_LIB_PATH'),
# IxNetwork machine configuration
self._cfg = {
'lib_path': settings.getValue('TRAFFICGEN_IXNET_LIB_PATH'),
# IxNetwork machine configuration
'multipleStreams': traffic['multistream'],
'streamType': traffic['stream_type'],
'rfc2544TestType': 'throughput',
'multipleStreams': traffic['multistream'],
'streamType': traffic['stream_type'],
'rfc2544TestType': 'throughput',
self._params['traffic'], traffic)
self._cfg['bidir'] = self._bidir
self._params['traffic'], traffic)
self._cfg['bidir'] = self._bidir
'multipleStreams': traffic['multistream'],
'streamType': traffic['stream_type'],
'rfc2544TestType': 'throughput',
'multipleStreams': traffic['multistream'],
'streamType': traffic['stream_type'],
'rfc2544TestType': 'throughput',
self._params['traffic'], traffic)
self._cfg['bidir'] = self._bidir
self._params['traffic'], traffic)
self._cfg['bidir'] = self._bidir
'multipleStreams': traffic['multistream'],
'streamType': traffic['stream_type'],
'rfc2544TestType': 'back2back',
'multipleStreams': traffic['multistream'],
'streamType': traffic['stream_type'],
'rfc2544TestType': 'back2back',
self._params['traffic'], traffic)
self._cfg['bidir'] = self._bidir
self._params['traffic'], traffic)
self._cfg['bidir'] = self._bidir