unittests.common¶
common.py
Unittests common functionality
unittests.test_ab_parser¶
test_ab_parser.py
unittests.test_clicmd¶
test_clicmd.py
Unittests for CLI functions
unittests.test_clissh¶
test_clissh.py
Unittests for cli<X>.py modules
-
class
unittests.test_clissh.TestCLISSH[source]¶ Bases:
object-
EMPTY_PASSWORD_KEY= '-----BEGIN RSA PRIVATE KEY-----\nMIIEpgIBAAKCAQEAybpzWXae7rYCORumvBc6f+J77fhZ/WU2fiqLgv62DojfWFqY\n92U0Bo8NtynU4NcVwQBrNCCpinMD3JdDcLSXsN70ON5z5FLm1Ms4gvpICei7TegC\nFVTEMsa9gfiMygDAOAapLlsZP6v1F/r/zQtsV9Nqm5pTlZ5gF6e/FmlQbg/sF52K\nA3sB762eBKfwq9p5/l2XfAELY4ypvGaAS+alVStuop3hhax5D6RUy1hG7IsMfT1x\ntFfwqgKqbO0AahjojakTlKZ+VBrGQYb9SUWSEOTN/EdU2wYDK9u08ilSCYW1HbN7\nrV4yX4ZZXZBuddll8DRVQIs5fZP1xKQBKfiSZQIDAQABAoIBAQCaIPwrGafbKXNP\nYOInCfRna4tWyg8vvVpCUY1gm+5L8qX7ItWHCGsUq85F6Q8+bvevC/vcyyvenXwQ\n2f3sKf9QYzjkDosro2+8nDzkTggmkgwyPRcCZ060oQaAPICNgr9azzQKOA51iJPu\nK5eweY7hF6Z3lxVP1r8Cs+cbX4HVZLbmva+98476zw9MD+XEd2qkjgldLAmVCsiR\nE3H862GU0yk+mReSs0Qz8OYjyWAGXPN9SmMPIv4qZg4qVLw6y17pN+A4aMmL1ThK\nh9jPoAsXL+5lpi3T1rHUes1ene9hQLyv46B6TKTiTRPnP2aUeJF7xXS4aZSEVy23\n0zTphoatAoGBAPMosVDw+iT8bMzmG5cFHEA2CAd/EdXKkPEvWUCf4uFcqzslImUW\nVq0asuFyOHBCHsVxsA5BmYRsCcQdn8jUuTHM3GAUwf29rmhW584W5Jznv1bByNMQ\nOg35zXNYm+CgxWOaD8ayXtAZ+3GgjKA+JbpsIh1wqwrv/q4atiha1CTvAoGBANRh\npnCBFgLt6l5TsnmqB4yUiSC+SIluuz5csoQnCSgb4DBKe6yjDzqXTStHQOBv5l7o\nwcuXzziX3rXZ5ym14aU20Dix7H+fjjTDCOT/A4r44PhZBKcC53RnndJ3a283BrAK\ns2p4gn0iGPtG24UG9UokDD56vDChED3Bc8a3ngXrAoGBAOJXIpbBeVcsUOp513zA\nGQf8Q4UW1zc2k6yt8lqhecNlS06GxnlqTcxcad5JQBfetF398W+TyJ7nIkAXg0Ci\nIrEkjI4zRFA5XDtrieLglHUpk4XiZFlzZVbVDFUuSgrSHGsWYVEHgBId3VxrofsX\nXm8lcKwO0Ggh9eOCocT2pzqpAoGBAJFfIekiQqnQpjrYuXKT0sUEKvTRqp7/v4UJ\nOFxCx/6/Te5gHVVm65akV/sGs76seZh/Y59zEzFeqt/4/kTLrV9ELLSR/RrCYTl2\nQpFUiN1IS91SOWAEGd/QyPN2MICYvqgjOvnm8RKsE0N0FfBxeda84/CkXEpBBPfw\ngcoEh1LvAoGBAN0Tv5gSXLkEaUfL6BTeOKr+PxKrdmUfLHSKTTT0MlA/oAig9FmZ\ndVcroxqKsqWhQmY4EgXH20IOyNdRX4d8oMyTEA1Xyorq78DVfPQAhE2y6wO0Z8K/\nmAvF7/+hRzNa4l25lailJFHR7VgwLPo24xNlWgyjn9T5JNnor8TIimoy\n-----END RSA PRIVATE KEY-----\n'¶
-
pytestmark= [<MarkDecorator 'unittests' {'args': (), 'kwargs': {}}>]¶
-
-
class
unittests.test_clissh.TestSSH[source]¶ Bases:
objectCLISSH unittests.
-
pytestmark= [<MarkDecorator 'unittests' {'args': (), 'kwargs': {}}>]¶
-
test_alter_in_command(cli_obj)[source]¶ Verify if prompt present in command it doesn’t influence on finding prompt in output data.
-
test_login_false_username_ssh(credentials)[source]¶ Verify AuthenticationException in case Incorrect username for ssh object.
-
test_login_false_username_telnet(credentials)[source]¶ Verify AuthenticationException in case Incorrect username for telnet object.
-
test_login_false_userpass_ssh(credentials)[source]¶ Verify AuthenticationException in case Incorrect password for ssh object.
-
test_login_false_userpass_telnet(credentials)[source]¶ Verify AuthenticationException in case Incorrect password for telnet object.
-
test_multiple_login_logout(credentials, request_object)[source]¶ Verify login after logout multiple times.
-
test_quiet_3(cli_obj, monkeypatch)[source]¶ Verify an exception isn’t raised on return code != 0 and default quiet option.
-
unittests.test_common3¶
test_common3.py
Unittests for common3 functions
Notes
- get_ports()
- get_port_speed()
- get_device_id
-
class
unittests.test_common3.FakeOpts[source]¶ Bases:
object-
build_path= ''¶
-
env= ''¶
-
get_only= False¶
-
setup= 'setup.json'¶
-
ui= 'ons_xmlrpc'¶
-
-
unittests.test_common3.test(request, monkeypatch)[source]¶ Fixture of environment with LXC for unittests of methods get_ports and get_speed.
-
unittests.test_common3.test_cross(request, monkeypatch)[source]¶ Fixture of environment with LXC for unittests of cross.
-
unittests.test_common3.test_get_device_id_1(test)[source]¶ Verify that method get_device_id returns the correct value if input data of acronym.
-
unittests.test_common3.test_get_device_id_2(test)[source]¶ Verify that method get_device_id returns the correct value if input data of autoname.
-
unittests.test_common3.test_get_device_id_3(test)[source]¶ Verify that method get_device_id returns Error message if input data incorrect.
-
unittests.test_common3.test_get_device_id_4(test)[source]¶ Verify that method get_device_id returns the correct value if input data of device’s ID.
-
unittests.test_common3.test_get_port_speed_1(test)[source]¶ Verify that method get_port_speed returns the correct value.
-
unittests.test_common3.test_get_port_speed_2(test)[source]¶ Verify that method get_port_speed returns the correct value.
-
unittests.test_common3.test_get_port_speed_3(test)[source]¶ Verify that method get_port_speed returns Error message if input data incorrect.
-
unittests.test_common3.test_get_port_speed_4(test)[source]¶ Verify that method get_port_speed returns Error message if input data incorrect.
-
unittests.test_common3.test_get_ports_1(test)[source]¶ Verify that method get_ports returns the correct value if input data of three links between devices.
-
unittests.test_common3.test_get_ports_12(test_tg)[source]¶ Verify that method get_ports returns the correct values for setup with TG.
-
unittests.test_common3.test_get_ports_13(test)[source]¶ Verify that method get_ports returns the correct value if input data without optional parameter ‘number_of_links’.
-
unittests.test_common3.test_get_ports_14(test)[source]¶ Verify that method get_ports returns the correct value if input data with two optional parameters.
-
unittests.test_common3.test_get_ports_15(test)[source]¶ Verify that method get_ports returns the correct value if input data with optional parameter ‘number_of_links’ - enum ‘ALL’.
-
unittests.test_common3.test_get_ports_2(test)[source]¶ Verify that method get_ports returns the correct value if input data of two links between devices.
-
unittests.test_common3.test_get_ports_3(test)[source]¶ Verify that method get_ports returns the correct value if input data of one links between devices.
-
unittests.test_common3.test_get_ports_4(test)[source]¶ Verify that method get_ports returns all links if no input data.
-
unittests.test_common3.test_get_ports_5(test)[source]¶ Verify that method get_ports returns all links if number of links are not defined.
-
unittests.test_common3.test_get_ports_6(test)[source]¶ Verify that method get_ports returns the correct value if input data of two links between devices and optional parameter port_speed.
-
unittests.test_common3.test_get_ports_7(test)[source]¶ Verify that method get_ports returns the correct value if input data of one links between devices and optional parameter port_speed.
-
unittests.test_common3.test_get_ports_8(test)[source]¶ Verify that that method get_ports returns the correct value if input data of one links between devices , autoname and optional parameter port_speed.
-
unittests.test_common3.test_get_ports_error_1(test)[source]¶ Verify that method get_ports returns Error message if input data of zero links between devices.
-
unittests.test_common3.test_get_ports_error_2(test)[source]¶ Verify that method get_ports returns Error message if input data are incorrect.
-
unittests.test_common3.test_get_ports_skip_1(test, monkeypatch)[source]¶ Verify that behavior of method get_ports is correct if device name or type is incorrect.
-
unittests.test_common3.test_get_ports_skip_2(test, monkeypatch)[source]¶ Verify that behavior of method get_ports is correct if input data of links are incorrect between devices.
-
unittests.test_common3.test_get_ports_skip_3(test, monkeypatch)[source]¶ Verify that behavior of method get_ports is correct if there is no connection between devices.
-
unittests.test_common3.test_get_ports_skip_4(test, monkeypatch)[source]¶ Verify that behavior of method get_ports is correct if there is no connection between devices and links are not defined
-
unittests.test_common3.test_get_ports_skip_5(test, monkeypatch)[source]¶ Verify that behavior of method get_ports is correct if port speed is incorrect
-
unittests.test_common3.test_get_real_port_name_1(test)[source]¶ Verify that method get_real_port_name returns Error message if input data incorrect.
-
unittests.test_common3.test_get_real_port_name_2(test)[source]¶ Verify that method get_real_port_name returns Error message if input data incorrect.
-
unittests.test_common3.test_get_real_port_name_3(test)[source]¶ Verify that method get_real_port_name returns Error message if input data incorrect.
-
unittests.test_common3.test_id2instance_1(test)[source]¶ Verify that method id2instance returns the correct object if input data id device as str.
-
unittests.test_common3.test_id2instance_2(test_tg)[source]¶ Verify that method id2instance returns the correct object if input data id device as int.
unittests.test_dependencies_core¶
test_dependencies_core.py
Unittests for dependencies core functions
-
unittests.test_dependencies_core.test_import_afs_module()[source]¶ Verify that all modules can be imported within ‘afs’ module and ‘AFS’ object can be created.
-
unittests.test_dependencies_core.test_import_afscross_module()[source]¶ Verify that all modules can be imported within ‘afs’ module and ‘AFS’ object can be created.
-
unittests.test_dependencies_core.test_import_clicmd_module()[source]¶ Verify that all modules can be imported within ‘clicmd’ module and ‘CLICmd’ object can be created.
-
unittests.test_dependencies_core.test_import_clissh_module()[source]¶ Verify that all modules can be imported within ‘clissh’ module and ‘CLISSH’ object can be created.
-
unittests.test_dependencies_core.test_import_common3_module(monkeypatch)[source]¶ Verify that all modules can be imported within ‘common3’ module and ‘Cross’/’Environment’ objects can be created.
-
unittests.test_dependencies_core.test_import_connpool_module()[source]¶ Verify that all modules can be imported within ‘connpool’ module and ‘ConnectionPool’ object can be created.
-
unittests.test_dependencies_core.test_import_custom_exception_module()[source]¶ Verify that all modules can be imported within ‘custom_exception’ module and object of classes can be created.
unittests.test_dependencies_ons¶
test_dependencies_ons.py
Unittests for dependencies functions
-
unittests.test_dependencies_ons.check_module_name_error_status(module_name)[source]¶ The function return True if name error is present in module during importing.
-
unittests.test_dependencies_ons.test_import_dev_staticcross_ons_module()[source]¶ Verify that all modules can be imported within ‘dev_staticcross_ons’ module and classes objects can be created.
unittests.test_dev_linux_host¶
test_dev_linux_host.py
Unittests for dev_linux_host.py
-
class
unittests.test_dev_linux_host.FakeCLISSH(*args, **kwargs)[source]¶ Bases:
object-
cmd_list= []¶
-
login_status= True¶
-
shell_read= None¶
-
-
class
unittests.test_dev_linux_host.FakeOpts[source]¶ Bases:
object-
env= 'setup.json'¶
-
get_only= False¶
-
lhost_ui= 'linux_bash'¶
-
setup= 'setup.json'¶
-
-
unittests.test_dev_linux_host.test_add_mgmt_bridge_1(monkeypatch)[source]¶ Verify that add_mgmt_bridge function generate correct set of commands to add mgmt bridge.
-
unittests.test_dev_linux_host.test_add_mgmt_bridge_2(monkeypatch)[source]¶ Verify that add_mgmt_bridge function return exception when managment bridge can not be created.
-
unittests.test_dev_linux_host.test_add_mgmt_iface_1(monkeypatch)[source]¶ Verify that mgmt interface return correct set of commands for adding mgmt interface.
-
unittests.test_dev_linux_host.test_add_mgmt_iface_2(monkeypatch)[source]¶ Verify that add_mgmt_iface function return exception when mgmt iface can’t be deleted.
-
unittests.test_dev_linux_host.test_brctl_1(monkeypatch)[source]¶ Verify that brctl command return correct set of commands when add parameter with stp_cfg is defined.
-
unittests.test_dev_linux_host.test_brctl_10()[source]¶ Verify brctl command return exception when incorrect mode is set.
-
unittests.test_dev_linux_host.test_brctl_11(monkeypatch)[source]¶ Verify that brctl function return proper dictionary when ‘stpstat’ parameter is set.
-
unittests.test_dev_linux_host.test_brctl_12(monkeypatch)[source]¶ Verify that brctl function return dictionary when “macs” parameter is set.
-
unittests.test_dev_linux_host.test_brctl_13()[source]¶ Verify that brctl function with stpstat parameter return exception when bridge name is not set.
-
unittests.test_dev_linux_host.test_brctl_14()[source]¶ Verify that brctl function with mac parameter return exception when bridge name is not set.
-
unittests.test_dev_linux_host.test_brctl_2(monkeypatch)[source]¶ Verify that brctl command return correct set of commands when add command is used.
-
unittests.test_dev_linux_host.test_brctl_3(monkeypatch, lh)[source]¶ Verify that brctl command return correct set of commands when cfg parameter is used.
-
unittests.test_dev_linux_host.test_brctl_4(monkeypatch)[source]¶ Verify cfg parameter in brctl return exception when bridge name is not given.
-
unittests.test_dev_linux_host.test_brctl_5()[source]¶ Verify brctl command return exception when bridge name is not given as parameter.
-
unittests.test_dev_linux_host.test_brctl_6()[source]¶ Verify brctl command with delif parameter return exception when ports are not given.
-
unittests.test_dev_linux_host.test_brctl_7(monkeypatch, lh)[source]¶ Verify that brctl command with delif parameter return correct set of commands when all needed parameters are given.
-
unittests.test_dev_linux_host.test_brctl_8(monkeypatch, lh)[source]¶ Verify that brctl command with del parameter return correct set of commands when all needed parameters are given.
-
unittests.test_dev_linux_host.test_brctl_9()[source]¶ Verify that brctl command return exception when br name is not set.
-
unittests.test_dev_linux_host.test_check_mgmt_bridge_1(monkeypatch)[source]¶ Verify that check_mgmt_bridge check that mgmt bridge is already created.
-
unittests.test_dev_linux_host.test_check_mgmt_bridge_2(monkeypatch)[source]¶ Verify that check_mgmt_bridge check that mgmt bridge is already created.
-
unittests.test_dev_linux_host.test_cleanup_1(monkeypatch, lh)[source]¶ Verify that cleanup function clear route configurations.
-
unittests.test_dev_linux_host.test_cleanup_2(monkeypatch, lh)[source]¶ Verify that cleanup function clear ifconfig configurations.
-
unittests.test_dev_linux_host.test_cleanup_3(monkeypatch, lh)[source]¶ Verify that cleanup function clear vconfig configurations.
-
unittests.test_dev_linux_host.test_cleanup_4(monkeypatch, lh)[source]¶ Verify that cleanup function form correct set of commands to delete brctl bridges.
-
unittests.test_dev_linux_host.test_del_mgmt_bridge_1(monkeypatch)[source]¶ Verify that del_mgmt_bridge function return correct set of commands to delete mgmt bridge.
-
unittests.test_dev_linux_host.test_del_mgmt_bridge_2(monkeypatch)[source]¶ Verify that del_mgmt_bridge function return exception when management bridge can not be deleted.
-
unittests.test_dev_linux_host.test_del_mgmt_iface_1(monkeypatch)[source]¶ Verify that del_mgmt_iface function return correct set of commands and exceptions when mgmt interface can not be deleted.
-
unittests.test_dev_linux_host.test_del_mgmt_iface_2(monkeypatch)[source]¶ Verify that del_mgmt_iface function return correct set of commands and exceptions when mgmt interface can not be deleted.
-
unittests.test_dev_linux_host.test_enable_8021q_1(monkeypatch)[source]¶ Verify that enable_802q_1 function return exception when 802.1q is not supported by current os.
-
unittests.test_dev_linux_host.test_enable_8021q_2(monkeypatch)[source]¶ Verify that enable_802q_1 function return correct set of commands when 8021q is already loaded.
-
unittests.test_dev_linux_host.test_enable_8021q_3(monkeypatch)[source]¶ Verify that enable_802q_1 function return exception if 8021q can not be loaded.
-
unittests.test_dev_linux_host.test_ethtool_1()[source]¶ Verify ethtool function return exception when improper mode is set.
-
unittests.test_dev_linux_host.test_ethtool_2(monkeypatch, lh)[source]¶ Verify ethtool function return correct set of commands when correct parameters are set.
-
unittests.test_dev_linux_host.test_getmac_1(monkeypatch)[source]¶ Verify that getmac function return interface mac address.
-
unittests.test_dev_linux_host.test_ifconfig_1(monkeypatch, lh)[source]¶ Verify that ifconfig command form correct set of commands when all parameters are used.
-
unittests.test_dev_linux_host.test_ifconfig_2()[source]¶ Verify that ifconfig command return exception when lengths of ipaddr, ip6addr, mac parameters is not correct.
-
unittests.test_dev_linux_host.test_ifconfig_4()[source]¶ Verify that ifconfig command return exception when stats parameter without ports is given.
-
unittests.test_dev_linux_host.test_ifconfig_5()[source]¶ Verify that ifconfig command return exception when improper mode is set.
-
unittests.test_dev_linux_host.test_ifconfig_6(monkeypatch, lh)[source]¶ Verify that ifconfig function return proper dictionary when ‘stat’ parameter is used.
-
unittests.test_dev_linux_host.test_ifconfig_7(monkeypatch, lh)[source]¶ Verify that exec command works with root privileges.
-
unittests.test_dev_linux_host.test_ipforward_2()[source]¶ Verify that ipforward command return exception when incorrect version value is set.
-
unittests.test_dev_linux_host.test_ipforward_3(monkeypatch, lh)[source]¶ Verify that ipforward command return correct set of commands when version is None.
-
unittests.test_dev_linux_host.test_ipforwrd_1(monkeypatch, lh)[source]¶ Verify that ip_forward function return correct set of commands when correct parameters are used.
-
unittests.test_dev_linux_host.test_routes_1(monkeypatch, lh)[source]¶ Verify that routes forms correct set of commands when all parameters are used.
-
unittests.test_dev_linux_host.test_routes_2()[source]¶ Verify that routes command return exception when incorrect mode value is set.
-
unittests.test_dev_linux_host.test_routes_3()[source]¶ Verify that routes function return exception when length of nexthop and netwrk lists is not equal.
-
unittests.test_dev_linux_host.test_routes_4()[source]¶ Verify that routes function return exception when length of nexthop and ports lists is not equal.
-
unittests.test_dev_linux_host.test_routes_5(monkeypatch, lh)[source]¶ Verify that route function return correct set of commands when ports parameter is None.
-
unittests.test_dev_linux_host.test_routes_6(monkeypatch, lh)[source]¶ Verify that route function return correct set of commands.
-
unittests.test_dev_linux_host.test_routes_7(monkeypatch, lh)[source]¶ Verify that route function return correct set of commands.
-
unittests.test_dev_linux_host.test_routes_8(monkeypatch, lh)[source]¶ Verify that route function return correct set of commands.
-
unittests.test_dev_linux_host.test_start_1(monkeypatch)[source]¶ Verify that start function return exception when namespace is already created.
-
unittests.test_dev_linux_host.test_start_2(monkeypatch)[source]¶ Verify that start function exception when network namespace was not created.
-
unittests.test_dev_linux_host.test_vconf_1(monkeypatch)[source]¶ Verify vconf function return correct command when rem parameter is set.
-
unittests.test_dev_linux_host.test_vconf_2(monkeypatch)[source]¶ Verify vconf function return correct command when add parameter is set.
unittests.test_fixtures¶
test_fixtures.py
Unittests for TAF fixtures`
-
class
unittests.test_fixtures.FakeOpts[source]¶ Bases:
object-
build_path= ''¶
-
env= ''¶
-
get_only= True¶
-
setup= 'setup.json'¶
-
ui= 'ons_xmlrpc'¶
-
-
unittests.test_fixtures.env(request, monkeypatch, fake_xmlrpc)[source]¶ Fixture of environment with LXC for unittests of methods get_ports and get_speed.
-
unittests.test_fixtures.env_complex(request, monkeypatch, fake_xmlrpc)[source]¶ Fixture of environment with LXC for unittests of methods get_ports and get_speed.
-
unittests.test_fixtures.env_list(request, monkeypatch, fake_xmlrpc)[source]¶ Fixture of environment with LXC for unittests of methods get_ports and get_speed.
-
unittests.test_fixtures.test_env_lag_1(request, env)[source]¶ Verify env_lag fixture adds LAGs into ports list.
-
unittests.test_fixtures.test_env_lag_10(request, env_list)[source]¶ Verify env_lag fixture doesn’t add LAGs into ports list in case max_lags is less than links count.
-
unittests.test_fixtures.test_env_lag_11(request, env)[source]¶ Verify env_lag fixture doesn’t add LAGs into ports list in case port is already in LAG.
-
unittests.test_fixtures.test_env_lag_12(request, env_list)[source]¶ Verify env_lag fixture doesn’t add LAGs into ports list in case port is already in LAG.
-
unittests.test_fixtures.test_env_lag_13(request, env_complex)[source]¶ Verify env_lag fixture adds LAGs into ports list in complex setup.
-
unittests.test_fixtures.test_env_lag_14(request, env_complex)[source]¶ Verify env_lag fixture adds LAGs into LagsAdmin table in complex setup.
-
unittests.test_fixtures.test_env_lag_15(request, env_complex)[source]¶ Verify env_lag fixture adds ports to LAGs in complex setup.
-
unittests.test_fixtures.test_env_lag_2(request, env)[source]¶ Verify env_lag fixture adds LAGs into LagsAdmin table.
-
unittests.test_fixtures.test_env_lag_3(request, env)[source]¶ Verify env_lag fixture adds ports to LAGs.
-
unittests.test_fixtures.test_env_lag_4(request, env_list)[source]¶ Verify env_lag fixture adds LAGs into port_list.
-
unittests.test_fixtures.test_env_lag_5(request, env_list)[source]¶ Verify env_lag fixture adds LAGs into LagsAdmin table.
-
unittests.test_fixtures.test_env_lag_6(request, env_list)[source]¶ Verify env_lag fixture adds ports to LAGs.
-
unittests.test_fixtures.test_env_lag_7(request, env)[source]¶ Verify env_lag fixture changes links in setup file.
unittests.test_getports¶
test_getports.py
Unittests for getting ports functions
-
class
unittests.test_getports.FakeOpts[source]¶ Bases:
objectFakeOpts class.
-
build_path= ''¶
-
env= 'setup.json'¶
-
get_only= False¶
-
setup= 'setup.json'¶
-
ui= 'ons_xmlrpc'¶
-
-
unittests.test_getports.env_golden(request, monkeypatch)[source]¶ Fixture of environment for unittests of methods get_ports and get_speed.
unittests.test_helpers¶
test_helpers.py
Unittests for helpers functions
unittests.test_linux_host_bash¶
test_ui_onpss_shell.py
Unittests for UI ONPSS Shell
-
class
unittests.test_linux_host_bash.OnpssRawOutput[source]¶ Bases:
object-
RAW_ETHTHOOL_NO_LINK_OUTPUT= 'Settings for sw0p5:\n\tSupported ports: [ FIBRE ]\n\tSupported link modes: Not reported\n\tSupported pause frame use: No\n\tSupports auto-negotiation: No\n\tAdvertised link modes: Not reported\n\tAdvertised pause frame use: No\n\tAdvertised auto-negotiation: No\n\tSpeed: 40000Mb/s\n\tDuplex: Full\n\tPort: FIBRE\n\tPHYAD: 0\n\tTransceiver: internal\n\tAuto-negotiation: off\n\tLink detected: no\n'¶
-
RAW_IPLINK_DETAIL_OUTPUT= '1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default \\ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0\n2: virtual: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000\\ link/ether 52:54:00:e6:fa:6f brd ff:ff:ff:ff:ff:ff promiscuity 0\n3: public: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master ovs-system state UP mode DEFAULT group default qlen 1000\\ link/ether 52:54:00:42:60:3b brd ff:ff:ff:ff:ff:ff promiscuity 1 \\ openvswitch_slave\n4: mgmt: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000\\ link/ether 52:54:00:12:56:6a brd ff:ff:ff:ff:ff:ff promiscuity 0\n5: inter: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000\\ link/ether 52:54:00:cb:52:a3 brd ff:ff:ff:ff:ff:ff promiscuity 0\n6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default \\ link/ether 52:54:00:7a:59:81 brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ bridge\n7: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN mode DEFAULT group default qlen 500\\ link/ether 52:54:00:7a:59:81 brd ff:ff:ff:ff:ff:ff promiscuity 1 \\ tun \\ bridge_slave\n8: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether a2:d0:01:41:43:7e brd ff:ff:ff:ff:ff:ff promiscuity 1 \\ openvswitch\n9: br-ex: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether e2:c9:ec:dc:97:46 brd ff:ff:ff:ff:ff:ff promiscuity 1 \\ openvswitch\n10: qg-37eee8e0-67: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether 9a:c3:8b:48:da:ca brd ff:ff:ff:ff:ff:ff promiscuity 1 \\ openvswitch\n11: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether ba:78:34:19:4a:47 brd ff:ff:ff:ff:ff:ff promiscuity 1 \\ openvswitch\n12: qr-96ef1966-8d: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether 1a:ed:21:17:bf:a1 brd ff:ff:ff:ff:ff:ff promiscuity 1 \\ openvswitch\n13: qr-35aafe49-25: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether 52:cc:5c:d4:4f:29 brd ff:ff:ff:ff:ff:ff promiscuity 1 \\ openvswitch\n15: br-virtual: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether 66:5c:b0:16:63:46 brd ff:ff:ff:ff:ff:ff promiscuity 1 \\ openvswitch\n'¶
-
RAW_IPLINK_DETAIL_OUTPUT_OLD= '1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default \\ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 \n2: pep8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 15346 qdisc mq state UP mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:b4:14 brd ff:ff:ff:ff:ff:ff promiscuity 1 \n3: pep4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:b4:10 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n4: enp0s20f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:bd:d0 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n5: enp0s20f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:bd:d1 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n6: enp0s20f2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:bd:d2 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n7: enp0s20f3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:bd:d3 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n8: p1p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:5c:ff:fe brd ff:ff:ff:ff:ff:ff promiscuity 0 \n9: sw0p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast portid 00000001 state UP mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n10: sw0p2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000002 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n11: sw0p3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000003 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n12: sw0p4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000004 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n13: sw0p5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team1 portid 00000005 state UP mode DEFAULT group default qlen 1000\\ link/ether b2:7c:46:41:6e:3c brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team_slave \n14: sw0p6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team1 portid 00000006 state UP mode DEFAULT group default qlen 1000\\ link/ether b2:7c:46:41:6e:3c brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team_slave \n15: sw0p7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team2 portid 00000007 state UP mode DEFAULT group default qlen 1000\\ link/ether 9a:3d:f6:a2:ef:f6 brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team_slave \n16: sw0p8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master 1234 portid 00000008 state UP mode DEFAULT group default qlen 1000\\ link/ether a2:76:22:ff:47:5d brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team_slave \n17: sw0p9: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000009 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n18: sw0p10: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000a state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n19: sw0p11: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000b state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n20: sw0p12: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000c state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n21: sw0p13: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000d state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n22: sw0p14: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000e state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n23: sw0p15: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000f state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n24: sw0p16: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000010 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n25: sw0p19: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000013 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n26: sw0p20: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000014 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n27: sw0p21: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000015 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n28: sw0p22: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000016 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n29: sw0p23: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000017 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n30: sw0p24: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000018 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n31: sw0p25: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000019 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n32: sw0p0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000000 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n33: team1@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether b2:7c:46:41:6e:3c brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team addrgenmode eui64 \n34: team2@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether 9a:3d:f6:a2:ef:f6 brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team addrgenmode eui64 \n35: 1234: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether a2:76:22:ff:47:5d brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team addrgenmode eui64 \n'¶
-
RAW_READLINK_OUTPUT= '../../devices/pci0000:00/0000:00:15.0/0000:03:00.0/net/eth0\n'¶
-
unittests.test_loggers¶
test_loggers.py
Unittests for logging functionality in TAF
-
class
unittests.test_loggers.TestLogger[source]¶ Bases:
object-
test_debug_log_message(skip_if_no_fixture, caplog, simple_log, request)[source]¶ Verify that log message for level DEBUG contains correct values.
-
test_error_log_message(skip_if_no_fixture, caplog, simple_log, request)[source]¶ Verify that log message for level ERROR contains correct values.
-
test_info_log_message(skip_if_no_fixture, caplog, simple_log, request)[source]¶ Verify that log message for level INFO contains correct values.
-
test_log_message_for_exception(skip_if_no_fixture, caplog, exception_log, request, log_file)[source]¶ Verify that log message for exception from log files contains correct values.
-
test_log_message_for_exception_with_trace(skip_if_no_fixture, caplog, request)[source]¶ Verify that log messages for exception with trace contains correct values.
-
test_log_message_for_introspection(skip_if_no_fixture, caplog, introspection_log, request, log_file)[source]¶ Verify that log message for introspection from log files contains correct values.
-
test_log_message_from_log_file_for_exception_with_trace(skip_if_no_fixture, caplog, request, log_file, exception_log, monkeypatch)[source]¶ Verify that log messages for exception with trace from log files contains correct values.
-
test_log_message_from_log_files(skip_if_no_fixture, caplog, file_log, request, log_file)[source]¶ Verify that log message from log files contains correct values.
-
test_loggers_options_and_mkdir(request)[source]¶ Verify that dictionary of logging options contains correct values and method mkdir_p is not creates directory if it exists.
-
unittests.test_pytest_helpers¶
test_pytest_helpers.py
Unittests for helpers functions
-
unittests.test_pytest_helpers.test_get_failure_reason()[source]¶ Check if get_failure_reason(data) is work correct.
-
unittests.test_pytest_helpers.test_get_suite_name()[source]¶ Test of pytest_helpers.get_tcname() function.
unittests.test_pytest_loganalyzer¶
test_pytest_loganalyzer.py
Unittests for loganalyzer
-
class
unittests.test_pytest_loganalyzer.TestLogAnalyzer[source]¶ Bases:
object-
LOG_NO_DUPS= '{ "MESSAGE" : "Removed session 50.", "__REALTIME_TIMESTAMP" : "1432210094242414", "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10b9;b=4931b09af53f45f1b83fe32300ab7609;m=1639692e56;t=5169665e93a6e;x=ed01d0faf5cc1d2c", "__MONOTONIC_TIMESTAMP" : "95452474966", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_CAP_EFFECTIVE" : "3fffffffff", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "_TRANSPORT" : "syslog", "SYSLOG_FACILITY" : "10", "SYSLOG_IDENTIFIER" : "sshd", "_COMM" : "sshd", "_EXE" : "/usr/sbin/sshd", "_SELINUX_CONTEXT" : "system_u:system_r:sshd_t:s0-s0:c0.c1023", "_SYSTEMD_OWNER_UID" : "0", "_SYSTEMD_SLICE" : "user-0.slice", "_AUDIT_LOGINUID" : "0", "_HOSTNAME" : "rr24or", "_CMDLINE" : "sshd: root [priv] ", "SYSLOG_PID" : "15433", "_PID" : "15433", "_AUDIT_SESSION" : "50", "_SYSTEMD_CGROUP" : "/user.slice/user-0.slice/session-50.scope", "_SYSTEMD_SESSION" : "50", "_SYSTEMD_UNIT" : "session-50.scope", "_SOURCE_REALTIME_TIMESTAMP" : "1432210094240765" }\n{ "MESSAGE" : "Removed session 51.", "__REALTIME_TIMESTAMP" : "1432210094242414", "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10b9;b=4931b09af53f45f1b83fe32300ab7609;m=1639692e56;t=5169665e93a6e;x=ed01d0faf5cc1d2c", "__MONOTONIC_TIMESTAMP" : "95452474966", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_CAP_EFFECTIVE" : "3fffffffff", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "_TRANSPORT" : "syslog", "SYSLOG_FACILITY" : "10", "SYSLOG_IDENTIFIER" : "sshd", "_COMM" : "sshd", "_EXE" : "/usr/sbin/sshd", "_SELINUX_CONTEXT" : "system_u:system_r:sshd_t:s0-s0:c0.c1023", "_SYSTEMD_OWNER_UID" : "0", "_SYSTEMD_SLICE" : "user-0.slice", "_AUDIT_LOGINUID" : "0", "_HOSTNAME" : "rr24or", "_CMDLINE" : "sshd: root [priv] ", "SYSLOG_PID" : "15433", "_PID" : "15433", "_AUDIT_SESSION" : "50", "_SYSTEMD_CGROUP" : "/user.slice/user-0.slice/session-50.scope", "_SYSTEMD_SESSION" : "50", "_SYSTEMD_UNIT" : "session-50.scope", "_SOURCE_REALTIME_TIMESTAMP" : "1432210094240765" }\n{ "MESSAGE" : "Removed session 52.", "__REALTIME_TIMESTAMP" : "1432210094242414", "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10b9;b=4931b09af53f45f1b83fe32300ab7609;m=1639692e56;t=5169665e93a6e;x=ed01d0faf5cc1d2c", "__MONOTONIC_TIMESTAMP" : "95452474966", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_CAP_EFFECTIVE" : "3fffffffff", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "_TRANSPORT" : "syslog", "SYSLOG_FACILITY" : "10", "SYSLOG_IDENTIFIER" : "sshd", "_COMM" : "sshd", "_EXE" : "/usr/sbin/sshd", "_SELINUX_CONTEXT" : "system_u:system_r:sshd_t:s0-s0:c0.c1023", "_SYSTEMD_OWNER_UID" : "0", "_SYSTEMD_SLICE" : "user-0.slice", "_AUDIT_LOGINUID" : "0", "_HOSTNAME" : "rr24or", "_CMDLINE" : "sshd: root [priv] ", "SYSLOG_PID" : "15433", "_PID" : "15433", "_AUDIT_SESSION" : "50", "_SYSTEMD_CGROUP" : "/user.slice/user-0.slice/session-50.scope", "_SYSTEMD_SESSION" : "50", "_SYSTEMD_UNIT" : "session-50.scope", "_SOURCE_REALTIME_TIMESTAMP" : "1432210094240765" }\n{ "MESSAGE" : "Removed session 53.", "__REALTIME_TIMESTAMP" : "1432210094242414", "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10b9;b=4931b09af53f45f1b83fe32300ab7609;m=1639692e56;t=5169665e93a6e;x=ed01d0faf5cc1d2c", "__MONOTONIC_TIMESTAMP" : "95452474966", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_CAP_EFFECTIVE" : "3fffffffff", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "_TRANSPORT" : "syslog", "SYSLOG_FACILITY" : "10", "SYSLOG_IDENTIFIER" : "sshd", "_COMM" : "sshd", "_EXE" : "/usr/sbin/sshd", "_SELINUX_CONTEXT" : "system_u:system_r:sshd_t:s0-s0:c0.c1023", "_SYSTEMD_OWNER_UID" : "0", "_SYSTEMD_SLICE" : "user-0.slice", "_AUDIT_LOGINUID" : "0", "_HOSTNAME" : "rr24or", "_CMDLINE" : "sshd: root [priv] ", "SYSLOG_PID" : "15433", "_PID" : "15433", "_AUDIT_SESSION" : "50", "_SYSTEMD_CGROUP" : "/user.slice/user-0.slice/session-50.scope", "_SYSTEMD_SESSION" : "50", "_SYSTEMD_UNIT" : "session-50.scope", "_SOURCE_REALTIME_TIMESTAMP" : "1432210094240765" }'¶
-
LOG_UNICODE_WITH_DUP= '{ "__CURSOR" : "s=da7709dd847c44dfab1720741ac0cb4d;i=987;b=614a99edf174450881448555522144d8;m=831cd2;t=5179273d9ed40;x=e2f17e57f07304e2", "__REALTIME_TIMESTAMP" : "1433292659879232", "__MONOTONIC_TIMESTAMP" : "8592594", "_BOOT_ID" : "614a99edf174450881448555522144d8", "PRIORITY" : "6", "_TRANSPORT" : "driver", "MESSAGE" : "Runtime journal is using 8.0M (max allowed 399.0M, trying to leave 598.5M free of 3.8G available \uffffffe2\uffffff86\uffffff92 current limit 399.0M).", "MESSAGE_ID" : "ec387f577b844b8fa948f33cad9a75e6", "_PID" : "338", "_UID" : "0", "_GID" : "0", "_COMM" : "systemd-journal", "_EXE" : "/usr/lib/systemd/systemd-journald", "_CMDLINE" : "/usr/lib/systemd/systemd-journald", "_CAP_EFFECTIVE" : "4402800cf", "_SYSTEMD_CGROUP" : "/system.slice/systemd-journald.service", "_SYSTEMD_UNIT" : "systemd-journald.service", "_SYSTEMD_SLICE" : "system.slice", "_SELINUX_CONTEXT" : "system_u:system_r:syslogd_t:s0", "_MACHINE_ID" : "da7c5b98bff3487ab53fcda4b679bc88", "_HOSTNAME" : "rr12or" }\n{ "__CURSOR" : "s=da7709dd847c44dfab1720741ac0cb4d;i=988;b=614a99edf174450881448555522144d8;m=831fee;t=5179273d9f05c;x=e2f17e57f07304e2", "__REALTIME_TIMESTAMP" : "1433292659880028", "__MONOTONIC_TIMESTAMP" : "8593390", "_BOOT_ID" : "614a99edf174450881448555522144d8", "PRIORITY" : "6", "_TRANSPORT" : "driver", "MESSAGE" : "Runtime journal is using 8.0M (max allowed 399.0M, trying to leave 598.5M free of 3.8G available \uffffffe2\uffffff86\uffffff92 current limit 399.0M).", "MESSAGE_ID" : "ec387f577b844b8fa948f33cad9a75e6", "_PID" : "338", "_UID" : "0", "_GID" : "0", "_COMM" : "systemd-journal", "_EXE" : "/usr/lib/systemd/systemd-journald", "_CMDLINE" : "/usr/lib/systemd/systemd-journald", "_CAP_EFFECTIVE" : "4402800cf", "_SYSTEMD_CGROUP" : "/system.slice/systemd-journald.service", "_SYSTEMD_UNIT" : "systemd-journald.service", "_SYSTEMD_SLICE" : "system.slice", "_SELINUX_CONTEXT" : "system_u:system_r:syslogd_t:s0", "_MACHINE_ID" : "da7c5b98bff3487ab53fcda4b679bc88", "_HOSTNAME" : "rr12or" }\n'¶
-
LOG_WITH_DIFF_CASES= '{ "MESSAGE" : "Removed session 50.", "__REALTIME_TIMESTAMP" : "1432210094242414", "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10b9;b=4931b09af53f45f1b83fe32300ab7609;m=1639692e56;t=5169665e93a6e;x=ed01d0faf5cc1d2c", "__MONOTONIC_TIMESTAMP" : "95452474966", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_CAP_EFFECTIVE" : "3fffffffff", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "_TRANSPORT" : "syslog", "SYSLOG_FACILITY" : "10", "SYSLOG_IDENTIFIER" : "sshd", "_COMM" : "sshd", "_EXE" : "/usr/sbin/sshd", "_SELINUX_CONTEXT" : "system_u:system_r:sshd_t:s0-s0:c0.c1023", "_SYSTEMD_OWNER_UID" : "0", "_SYSTEMD_SLICE" : "user-0.slice", "_AUDIT_LOGINUID" : "0", "_HOSTNAME" : "rr24or", "_CMDLINE" : "sshd: root [priv] ", "SYSLOG_PID" : "15433", "_PID" : "15433", "_AUDIT_SESSION" : "50", "_SYSTEMD_CGROUP" : "/user.slice/user-0.slice/session-50.scope", "_SYSTEMD_SESSION" : "50", "_SYSTEMD_UNIT" : "session-50.scope", "_SOURCE_REALTIME_TIMESTAMP" : "1432210094240765" }\n{ "MESSAGE" : "Removed session 51.", "__REALTIME_TIMESTAMP" : "1432210094242414", "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10b9;b=4931b09af53f45f1b83fe32300ab7609;m=1639692e56;t=5169665e93a6e;x=ed01d0faf5cc1d2c", "__MONOTONIC_TIMESTAMP" : "95452474966", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_CAP_EFFECTIVE" : "3fffffffff", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "_TRANSPORT" : "syslog", "SYSLOG_FACILITY" : "10", "SYSLOG_IDENTIFIER" : "sshd", "_COMM" : "sshd", "_EXE" : "/usr/sbin/sshd", "_SELINUX_CONTEXT" : "system_u:system_r:sshd_t:s0-s0:c0.c1023", "_SYSTEMD_OWNER_UID" : "0", "_SYSTEMD_SLICE" : "user-0.slice", "_AUDIT_LOGINUID" : "0", "_HOSTNAME" : "rr24or", "_CMDLINE" : "sshd: root [priv] ", "SYSLOG_PID" : "15433", "_PID" : "15433", "_AUDIT_SESSION" : "50", "_SYSTEMD_CGROUP" : "/user.slice/user-0.slice/session-50.scope", "_SYSTEMD_SESSION" : "50", "_SYSTEMD_UNIT" : "session-50.scope", "_SOURCE_REALTIME_TIMESTAMP" : "1432210094240765" }\n{ "MESSAGE" : " Removed session 52. ", "__REALTIME_TIMESTAMP" : "1432210094242414", "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10b9;b=4931b09af53f45f1b83fe32300ab7609;m=1639692e56;t=5169665e93a6e;x=ed01d0faf5cc1d2c", "__MONOTONIC_TIMESTAMP" : "95452474966", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_CAP_EFFECTIVE" : "3fffffffff", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "_TRANSPORT" : "syslog", "SYSLOG_FACILITY" : "10", "SYSLOG_IDENTIFIER" : "sshd", "_COMM" : "sshd", "_EXE" : "/usr/sbin/sshd", "_SELINUX_CONTEXT" : "system_u:system_r:sshd_t:s0-s0:c0.c1023", "_SYSTEMD_OWNER_UID" : "0", "_SYSTEMD_SLICE" : "user-0.slice", "_AUDIT_LOGINUID" : "0", "_HOSTNAME" : "rr24or", "_CMDLINE" : "sshd: root [priv] ", "SYSLOG_PID" : "15433", "_PID" : "15433", "_AUDIT_SESSION" : "50", "_SYSTEMD_CGROUP" : "/user.slice/user-0.slice/session-50.scope", "_SYSTEMD_SESSION" : "50", "_SYSTEMD_UNIT" : "session-50.scope", "_SOURCE_REALTIME_TIMESTAMP" : "1432210094240765" }\n{ "MESSAGE" : "removed session 52.", "__REALTIME_TIMESTAMP" : "1432210094242414", "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10b9;b=4931b09af53f45f1b83fe32300ab7609;m=1639692e56;t=5169665e93a6e;x=ed01d0faf5cc1d2c", "__MONOTONIC_TIMESTAMP" : "95452474966", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_CAP_EFFECTIVE" : "3fffffffff", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "_TRANSPORT" : "syslog", "SYSLOG_FACILITY" : "10", "SYSLOG_IDENTIFIER" : "sshd", "_COMM" : "sshd", "_EXE" : "/usr/sbin/sshd", "_SELINUX_CONTEXT" : "system_u:system_r:sshd_t:s0-s0:c0.c1023", "_SYSTEMD_OWNER_UID" : "0", "_SYSTEMD_SLICE" : "user-0.slice", "_AUDIT_LOGINUID" : "0", "_HOSTNAME" : "rr24or", "_CMDLINE" : "sshd: root [priv] ", "SYSLOG_PID" : "15433", "_PID" : "15433", "_AUDIT_SESSION" : "50", "_SYSTEMD_CGROUP" : "/user.slice/user-0.slice/session-50.scope", "_SYSTEMD_SESSION" : "50", "_SYSTEMD_UNIT" : "session-50.scope", "_SOURCE_REALTIME_TIMESTAMP" : "1432210094240765" }'¶
-
LOG_WITH_DUPS= '{ "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10b9;b=4931b09af53f45f1b83fe32300ab7609;m=1639692e56;t=5169665e93a6e;x=ed01d0faf5cc1d2c", "__REALTIME_TIMESTAMP" : "1432210094242414", "__MONOTONIC_TIMESTAMP" : "95452474966", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_CAP_EFFECTIVE" : "3fffffffff", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "_TRANSPORT" : "syslog", "SYSLOG_FACILITY" : "10", "SYSLOG_IDENTIFIER" : "sshd", "_COMM" : "sshd", "_EXE" : "/usr/sbin/sshd", "_SELINUX_CONTEXT" : "system_u:system_r:sshd_t:s0-s0:c0.c1023", "_SYSTEMD_OWNER_UID" : "0", "_SYSTEMD_SLICE" : "user-0.slice", "_AUDIT_LOGINUID" : "0", "_HOSTNAME" : "rr24or", "_CMDLINE" : "sshd: root [priv] ", "MESSAGE" : "Removed session 50.", "SYSLOG_PID" : "15433", "_PID" : "15433", "_AUDIT_SESSION" : "50", "_SYSTEMD_CGROUP" : "/user.slice/user-0.slice/session-50.scope", "_SYSTEMD_SESSION" : "50", "_SYSTEMD_UNIT" : "session-50.scope", "_SOURCE_REALTIME_TIMESTAMP" : "1432210094240765" }\n{ "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10ba;b=4931b09af53f45f1b83fe32300ab7609;m=1648a3182f;t=5169675232447;x=b51015aee07e27a2", "__REALTIME_TIMESTAMP" : "1432210349696071", "__MONOTONIC_TIMESTAMP" : "95707928623", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_CAP_EFFECTIVE" : "3fffffffff", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "_TRANSPORT" : "syslog", "SYSLOG_FACILITY" : "10", "SYSLOG_IDENTIFIER" : "sshd", "_COMM" : "sshd", "_EXE" : "/usr/sbin/sshd", "_SELINUX_CONTEXT" : "system_u:system_r:sshd_t:s0-s0:c0.c1023", "_SYSTEMD_OWNER_UID" : "0", "_SYSTEMD_SLICE" : "user-0.slice", "_AUDIT_LOGINUID" : "0", "_HOSTNAME" : "rr24or", "MESSAGE" : "Removed session 50.", "_CMDLINE" : "sshd: root@notty ", "SYSLOG_PID" : "15433", "_PID" : "15433", "_AUDIT_SESSION" : "50", "_SYSTEMD_CGROUP" : "/user.slice/user-0.slice/session-50.scope", "_SYSTEMD_SESSION" : "50", "_SYSTEMD_UNIT" : "session-50.scope", "_SOURCE_REALTIME_TIMESTAMP" : "1432210349692776" }\n{ "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10bb;b=4931b09af53f45f1b83fe32300ab7609;m=1648a3459e;t=51696752351b6;x=8bbc2fb7e2219d64", "__REALTIME_TIMESTAMP" : "1432210349707702", "__MONOTONIC_TIMESTAMP" : "95707940254", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_SYSTEMD_SLICE" : "system.slice", "_TRANSPORT" : "journal", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "SYSLOG_FACILITY" : "4", "SYSLOG_IDENTIFIER" : "systemd-logind", "_COMM" : "systemd-logind", "_EXE" : "/usr/lib/systemd/systemd-logind", "_CMDLINE" : "/usr/lib/systemd/systemd-logind", "_CAP_EFFECTIVE" : "4420002f", "_SYSTEMD_CGROUP" : "/system.slice/systemd-logind.service", "_SYSTEMD_UNIT" : "systemd-logind.service", "_SELINUX_CONTEXT" : "system_u:system_r:systemd_logind_t:s0", "CODE_FILE" : "../src/login/logind-session.c", "USER_ID" : "root", "CODE_LINE" : "660", "CODE_FUNCTION" : "session_finalize", "MESSAGE_ID" : "3354939424b4456d9802ca8333ed424a", "_HOSTNAME" : "rr24or", "_PID" : "429", "SESSION_ID" : "50", "LEADER" : "15433", "MESSAGE" : "Removed session 50.", "_SOURCE_REALTIME_TIMESTAMP" : "1432210349706418" }'¶
-
LOG_WITH_ONE_LINE= '{ "MESSAGE" : "Removed session 50.", "__CURSOR" : "s=a16de58e54a64618a703efd350407e90;i=10b9;b=4931b09af53f45f1b83fe32300ab7609;m=1639692e56;t=5169665e93a6e;x=ed01d0faf5cc1d2c", "__REALTIME_TIMESTAMP" : "1432210094242414", "__MONOTONIC_TIMESTAMP" : "95452474966", "_BOOT_ID" : "4931b09af53f45f1b83fe32300ab7609", "PRIORITY" : "6", "_UID" : "0", "_GID" : "0", "_CAP_EFFECTIVE" : "3fffffffff", "_MACHINE_ID" : "e784f69e5d1747ebb7f6e829df0b0a0b", "_TRANSPORT" : "syslog", "SYSLOG_FACILITY" : "10", "SYSLOG_IDENTIFIER" : "sshd", "_COMM" : "sshd", "_EXE" : "/usr/sbin/sshd", "_SELINUX_CONTEXT" : "system_u:system_r:sshd_t:s0-s0:c0.c1023", "_SYSTEMD_OWNER_UID" : "0", "_SYSTEMD_SLICE" : "user-0.slice", "_AUDIT_LOGINUID" : "0", "_HOSTNAME" : "rr24or", "_CMDLINE" : "sshd: root [priv] ", "SYSLOG_PID" : "15433", "_PID" : "15433", "_AUDIT_SESSION" : "50", "_SYSTEMD_CGROUP" : "/user.slice/user-0.slice/session-50.scope", "_SYSTEMD_SESSION" : "50", "_SYSTEMD_UNIT" : "session-50.scope", "_SOURCE_REALTIME_TIMESTAMP" : "1432210094240765" }'¶
-
log_analyzer= <plugins.pytest_loganalyzer.LogAnalyzer object>¶
-
unittests.test_reporting_server¶
test_reporting_server.py
Unittests for reporting server functions
-
unittests.test_reporting_server.test_client_config(reporting_server)[source]¶ Verify that client config can be created and reports can be removed.
-
unittests.test_reporting_server.test_cmdproc(reporting_server_with_config)[source]¶ Verify that operation with cmdproc is work.
unittests.test_service_lib¶
test_service_lib.py
SystemD service library unittests
-
class
unittests.test_service_lib.TestSpecificServiceManager(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
unittests.test_staticcross¶
test_staticcross.py
Unittests for static cross functions
unittests.test_synapsert¶
test_synapsert.py
Unittests for synapsert functions
-
unittests.test_synapsert.synapsert(request)[source]¶ Return synapsert instant.
“–synapsert_config” option set path to synapsert config file, if not defined, current synapsert config will be use
unittests.test_ui_helpers¶
test_ui_helpers.py
Unittests for ui_helpers.py
unittests.test_ui_onpss_jsonrpc¶
test_ui_onp_jsonrpc.py
Unittests for JSONRPC UI wrappers
-
class
unittests.test_ui_onpss_jsonrpc.TestClientRequest[source]¶ Bases:
object-
test_multicall(ui, server)[source]¶ Verify that request() method sends and receives the JSON-RPC strings.
-
test_multicall_reply_with_error(ui, server)[source]¶ Verify UIException in case server is responding with error for multicall.
-
unittests.test_ui_onpss_shell¶
test_ui_onpss_shell.py
Unittests for UI ONPSS Shell
-
class
unittests.test_ui_onpss_shell.OnpssRawOutput[source]¶ Bases:
object-
IP_SHOW_STATS_OUTPUT= ' 2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000\n link/ether d4:c9:ef:52:7c:4d brd ff:ff:ff:ff:ff:ff\n RX: bytes packets errors dropped overrun mcast\n 2781945429 3202213 0 0 0 30131\n RX errors: length crc frame fifo missed\n 0 0 0 0 0\n TX: bytes packets errors dropped carrier collsns\n 646221183 2145799 0 0 0 0\n TX errors: aborted fifo window heartbeat\n 0 0 0 0\n '¶
-
NETWORKCTL_SAMPLE_1= ' ● 6: enp0s29u1u7u1\n Type: ether\n State: degraded (configured)\n Path: pci-0000:00:1d.0-usb-0:1.7.1:1.0\n Driver: asix\n Vendor: ASIX Electronics Corp.\n HW Address: 0:60:63:43:78:95\n MTU: 1500\n Address: fe80::260:63ff:fe43:7895\n '¶
-
NETWORKCTL_SAMPLE_2= ' ● 8: p1p1\n Link File: /usr/lib/systemd/network/99-default.link\n Network File: n/a\n Type: ether\n State: n/a (n/a)\n Path: pci-0000:02:00.0\n Driver: igb\n Vendor: Intel Corporation\n Model: I210 Gigabit Network Connection (Ethernet Server Adapter I210-T1)\n HW Address: a0:36:9f:5c:ff:8e\n MTU: 1500\n Address: 192.168.1.1\n fe80::a236:9fff:fe5c:ff8e\n '¶
-
RAW_ARP_OUTPUT= '10.20.30.40 dev sw0p5 lladdr 00:AA:AA:AA:AA:12 STALE\n192.168.10.60 dev sw0p6 lladdr 00:BB:BB:BB:BB:13 STALE\n192.168.10.65 dev sw0p5 lladdr 00:BB:BB:BB:BB:AA PERMANENT\n2001::2000 dev sw0p6 lladdr 00:12:12:12:12:12 STALE\n'¶
-
RAW_ETHTHOOL_NO_LINK_OUTPUT= 'Settings for sw0p5:\n\tSupported ports: [ FIBRE ]\n\tSupported link modes: Not reported\n\tSupported pause frame use: No\n\tSupports auto-negotiation: No\n\tAdvertised link modes: Not reported\n\tAdvertised pause frame use: No\n\tAdvertised auto-negotiation: No\n\tSpeed: 40000Mb/s\n\tDuplex: Full\n\tPort: FIBRE\n\tPHYAD: 0\n\tTransceiver: internal\n\tAuto-negotiation: off\n\tLink detected: no\n'¶
-
RAW_FDB_OUTPUT= '33:33:00:00:00:01 dev pep8 self permanent\n01:00:5e:00:00:01 dev pep8 self permanent\n33:33:ff:60:b4:14 dev pep8 self permanent\n33:33:00:00:00:01 dev pep4 self permanent\n33:33:00:00:00:01 dev enp0s20f0 self permanent\n33:33:00:00:00:01 dev enp0s20f1 self permanent\n33:33:00:00:00:01 dev enp0s20f2 self permanent\n33:33:00:00:00:01 dev enp0s20f3 self permanent\n33:33:00:00:00:01 dev p1p1 self permanent\n01:00:5e:00:00:01 dev p1p1 self permanent\n33:33:ff:5c:ff:fe dev p1p1 self permanent\n00:11:22:33:44:55 dev sw0p5 vlan 2 self permanent\n00:11:22:33:44:55 dev sw0p5 vlan 22 self permanent\n00:11:22:33:44:55 dev sw0p5 vlan 222 self \n00:11:22:33:44:55 dev sw0p5 vlan 2222 self permanent\n55:44:33:22:11:00 dev sw0p6 vlan 3 self permanent\n55:44:33:22:11:00 dev sw0p6 vlan 33 self permanent\n55:44:33:22:11:00 dev sw0p6 vlan 333 self \n55:44:33:22:11:00 dev sw0p6 vlan 3333 self permanent\n'¶
-
RAW_IPLINK_DETAIL_OUTPUT= '1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default \\ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 \n2: pep8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 15346 qdisc mq state UP mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:b4:14 brd ff:ff:ff:ff:ff:ff promiscuity 1 \n3: pep4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:b4:10 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n4: enp0s20f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:bd:d0 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n5: enp0s20f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:bd:d1 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n6: enp0s20f2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:bd:d2 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n7: enp0s20f3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:60:bd:d3 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n8: p1p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000\\ link/ether a0:36:9f:5c:ff:fe brd ff:ff:ff:ff:ff:ff promiscuity 0 \n9: sw0p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast portid 00000001 state UP mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n10: sw0p2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000002 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n11: sw0p3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000003 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n12: sw0p4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000004 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n13: sw0p5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team1 portid 00000005 state UP mode DEFAULT group default qlen 1000\\ link/ether b2:7c:46:41:6e:3c brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team_slave \n14: sw0p6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team1 portid 00000006 state UP mode DEFAULT group default qlen 1000\\ link/ether b2:7c:46:41:6e:3c brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team_slave \n15: sw0p7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team2 portid 00000007 state UP mode DEFAULT group default qlen 1000\\ link/ether 9a:3d:f6:a2:ef:f6 brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team_slave \n16: sw0p8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master 1234 portid 00000008 state UP mode DEFAULT group default qlen 1000\\ link/ether a2:76:22:ff:47:5d brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team_slave \n17: sw0p9: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000009 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n18: sw0p10: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000a state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n19: sw0p11: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000b state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n20: sw0p12: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000c state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n21: sw0p13: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000d state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n22: sw0p14: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000e state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n23: sw0p15: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 0000000f state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n24: sw0p16: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000010 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n25: sw0p19: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000013 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n26: sw0p20: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000014 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n27: sw0p21: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000015 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n28: sw0p22: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000016 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n29: sw0p23: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000017 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n30: sw0p24: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000018 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n31: sw0p25: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000019 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n32: sw0p0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000000 state DOWN mode DEFAULT group default qlen 1000\\ link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 \n33: team1@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether b2:7c:46:41:6e:3c brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team addrgenmode eui64 \n34: team2@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether 9a:3d:f6:a2:ef:f6 brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team addrgenmode eui64 \n35: 1234: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \\ link/ether a2:76:22:ff:47:5d brd ff:ff:ff:ff:ff:ff promiscuity 0 \\ team addrgenmode eui64 \n'¶
-
RAW_IPLINK_OUTPUT= ['1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default \n', ' link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 \n', '2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000\n', ' link/ether 08:9e:01:72:d4:d0 brd ff:ff:ff:ff:ff:ff \n', '3: sw0p1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000001 state DOWN mode DEFAULT group default qlen 1000\n', ' link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff \n', '4: sw0p2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000002 state DOWN mode DEFAULT group default qlen 1000\n', ' link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff \n', '11: sw0p9: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast portid 00000009 state DOWN mode DEFAULT group default qlen 1000\n', ' link/ether 56:8b:3e:5f:cb:99 brd ff:ff:ff:ff:ff:ff \n', '12: sw0p10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team1 portid 0000000a state UP mode DEFAULT group default qlen 1000\n', ' link/ether 56:8b:3e:5f:cb:99 brd ff:ff:ff:ff:ff:ff \n', '13: sw0p11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team1 portid 0000000b state UP mode DEFAULT group default qlen 1000\n', ' link/ether 56:8b:3e:5f:cb:99 brd ff:ff:ff:ff:ff:ff \n', '14: sw0p12: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team2 portid 0000000c state UP mode DEFAULT group default qlen 1000\n', ' link/ether 0a:e1:f0:b5:56:0a brd ff:ff:ff:ff:ff:ff \n', '15: sw0p13: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast master team2 portid 0000000d state DOWN mode DEFAULT group default qlen 1000\n', ' link/ether 0a:e1:f0:b5:56:0a brd ff:ff:ff:ff:ff:ff \n', '66: sw0p64: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000040 state DOWN mode DEFAULT group default qlen 1000\n', ' link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff \n', '67: sw0p0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop portid 00000000 state DOWN mode DEFAULT group default qlen 1000\n', ' link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff \n', '69: team1@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \n', ' link/ether 56:8b:3e:5f:cb:99 brd ff:ff:ff:ff:ff:ff \n', '70: teamempty@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \n', ' link/ether 1e:2f:f0:ed:f1:a1 brd ff:ff:ff:ff:ff:ff \n', '71: team2@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default \n', ' link/ether 0a:e1:f0:b5:56:0a brd ff:ff:ff:ff:ff:ff \n']¶
-
RAW_PING_OUTPUT= 'PATTERN: 0xff\nPING 192.168.10.2 (192.168.10.2) from 192.168.10.1 sw0p0: 56(84) bytes of data.\n64 bytes from 192.168.10.2: icmp_seq=1 ttl=64 time=0.647 ms\nTS: 3812901 absolute\n 64484186\n 0\n -64484185\n\n64 bytes from 192.168.10.2: icmp_seq=1 ttl=64 time=0.542 ms\nTS: 3813902 absolute\n 64484185\n 0\n -64484184\n\n64 bytes from 192.168.10.2: icmp_seq=1 ttl=64 time=0.544 ms\nTS: 3814902 absolute\n 64484185\n 0\n -64484184\n\n--- 192.168.10.2 ping statistics ---\n3 packets transmitted, 3 received, 0% packet loss, time 4000ms\nrtt min/avg/max/mdev = 0.525/0.562/0.647/0.048 ms'¶
-
RAW_VLAN_OUTPUT= 'port\tvlan ids\nsw0p1\tNone\nsw0p2\tNone\nsw0p3\tNone\nsw0p4\tNone\nsw0p5\t 2\n\t 3 Egress Untagged\n\t 33\n\t 222 PVID\n\t 2222\n\t 3333\n\nsw0p6\t 3\n\t 33\n\t 333 Egress Untagged\n\t 3333 PVID\n\nsw0p7\tNone\nsw0p8\tNone\nsw0p9\tNone\nsw0p10\tNone\nsw0p11\tNone\nsw0p12\t44 PVID Egress Untagged\nsw0p13\tNone\nsw0p14\tNone\nsw0p15\tNone\nsw0p16\tNone\nsw0p19\tNone\nsw0p20\tNone\nsw0p21\tNone\nsw0p22\tNone\nsw0p23\tNone\nsw0p24\tNone\nsw0p25\tNone\nsw0p0\tNone\nteam25\t 4\n\t 44\n\t 444 Egress Untagged\n\t 4444 PVID\n\n'¶
-
SWITCH_ATTRIBUTES= 'autoneg\x00bcast_capacity\x00bcast_flooding\x00bcast_pruning\x00bcast_rate\x00def_cfi\x00'¶
-
unittests.test_ui_xmlrpc¶
test_ui_xmlrpc.py
XMLRPC UI wrappers.unittests
unittests.test_ui_xmlrpc¶
test_ui_xmlrpc.py
XMLRPC UI wrappers.unittests
-
class
unittests.test_ui_xmlrpc.TestInvalidPorts[source] Bases:
object-
create_ui(ui)[source]
-
test_create_invalid_ports_multiple_port()[source]
-
test_create_invalid_ports_port_ids()[source]
-
-
unittests.test_ui_xmlrpc.ui()[source]
unittests.linux.test_commands¶
test_commands.py
Command helpers Unittests
unittests.linux.test_iperf¶
test_iperf.py
IPerfRunner Unittests
unittests.linux.test_parser¶
test_parser.py
Parse tools Unittests
unittests.linux.test_tool_general¶
test_tool_generate.py
ToolGeneral Unittests
-
class
unittests.linux.test_tool_general.CmdExecSimul(cmd_exec_sim, cycle=False)[source]¶ Bases:
objectSimulate clissh (blackbox).
Specify commands behavior - an (sequence of) input command(s) to output(s) including side effect(s).
-
CmdExecSimul.MAKE_ITER_MAP= [<built-in function iter>, <class 'itertools.cycle'>]¶
-
-
class
unittests.linux.test_tool_general.FakeLinuxHost(config=None, opts=None)[source]¶ Bases:
testlib.dev_linux_host.GenericLinuxHost-
FAKE_CFG= {'id': 'FakeID', 'instance_type': 'generic_linux_host', 'ipaddr': 'localhost', 'ssh_user': 'fake_user', 'name': 'FakeHost', 'ssh_pass': 'fake_pass'}¶
-
-
class
unittests.linux.test_tool_general.FakeSSH(*args, **kwargs)[source]¶ Bases:
testlib.clissh.CLISSH-
login_status= True¶
-
-
class
unittests.linux.test_tool_general.SimulatedSSH(*args, **kwargs)[source]¶ Bases:
unittests.linux.test_tool_general.MockSSH,unittests.linux.test_tool_general.CmdExecSimul
unittests.switches.test_switches¶
test_switches.py
Switch’s unittests
-
unittests.switches.test_switches.test_check_app_table_1(switch)[source]¶ Test check_app_table function.
-
unittests.switches.test_switches.test_check_app_table_2(switch)[source]¶ Test check_app_table function negative.
-
unittests.switches.test_switches.test_check_app_table_3(switch)[source]¶ Test check_app_table function negative.
-
unittests.switches.test_switches.test_clearconfig_1(switch)[source]¶ Test clearconfig function negative.
-
unittests.switches.test_switches.test_get_port_for_probe(switch)[source]¶ Test _get_port_for_probe function.
-
unittests.switches.test_switches.test_get_speed_ports_1(switch)[source]¶ Test _get_speed_ports function if ‘ports’ in config.
-
unittests.switches.test_switches.test_get_speed_ports_2(switch)[source]¶ Test _get_speed_ports function if ‘port_list’ in config.
-
unittests.switches.test_switches.test_get_speed_ports_3(switch)[source]¶ Test _get_speed_ports function if ‘ports’ and ‘port_list’ in config.
-
unittests.switches.test_switches.test_get_speed_ports_4(switch)[source]¶ Test _get_speed_ports function if ‘ports_map’ in config.
-
unittests.switches.test_switches.test_getprop_field_info(switch)[source]¶ Test getprop_field_info function.
-
unittests.switches.test_switches.test_getprop_method_help_1(switch)[source]¶ Test getprop_method_help function.
-
unittests.switches.test_switches.test_getprop_method_help_2(switch)[source]¶ Test getprop_method_help function negative.
-
unittests.switches.test_switches.test_getprop_table_info(switch)[source]¶ Test getprop_table_info function.
-
unittests.switches.test_switches.test_multicall_2(switch)[source]¶ Test multicall function negative.
-
unittests.switches.test_switches.test_multicall_3(switch)[source]¶ Test multicall function negative.
-
unittests.switches.test_switches.test_set_app_log_level_1(switch)[source]¶ Test set_app_log_level function.
unittests.test_plugins.test_multiple_run¶
test_multiple_run.py
Unittests for pytest_multiple_run plugin
-
class
unittests.test_plugins.test_multiple_run.TestPluginMultipleRun[source]¶ Bases:
object-
test_rerun_extra_keyword_1(testdir)[source]¶ Verify that can rerun 3 times only matched extra keywords(option “-k”).
-
test_rerun_extra_keyword_2(testdir)[source]¶ Verify that can rerun 3 times only matched extra keywords(option “-k”).
-
test_rerun_test_with_collectonly_option(testdir)[source]¶ Verify that only collects tests, don’t executes them.
-
test_rerun_test_with_exitfirst_option(testdir)[source]¶ Verify that exits instantly on first error or failed test.
-
test_rerun_test_with_runxfail_option(testdir)[source]¶ Verify that can rerun test 5 times with mark xfail and option runxfail.
-
unittests.test_plugins.test_multipletg¶
test_multipletg.py
Unittests for pytest_multipletg plugin
-
class
unittests.test_plugins.test_multipletg.FakeOpts[source]¶ Bases:
object-
build_path= ''¶
-
env= ''¶
-
get_only= True¶
-
setup= 'setup.json'¶
-
ui= 'ons_xmlrpc'¶
-
-
unittests.test_plugins.test_multipletg.env(request, monkeypatch)[source]¶ Fixture of environment with LXC for unittests of methods get_ports and get_speed.
-
unittests.test_plugins.test_multipletg.env_complex(request, monkeypatch)[source]¶ Fixture of environment with LXC for unittests of methods get_ports and get_speed.
-
unittests.test_plugins.test_multipletg.env_list(request, monkeypatch)[source]¶ Fixture of environment with LXC for unittests of methods get_ports and get_speed.
-
unittests.test_plugins.test_multipletg.test_multipletg_1(request, env)[source]¶ Verify pytest_multipletg plugin creates MultipleTG instance and modifies env.tg dict.
-
unittests.test_plugins.test_multipletg.test_multipletg_2(request, env)[source]¶ Verify pytest_multipletg plugin modifies cross section.
-
unittests.test_plugins.test_multipletg.test_multipletg_3(request, env)[source]¶ Verify pytest_multipletg plugin restores env.tg dict on teardown.
-
unittests.test_plugins.test_multipletg.test_multipletg_4(request, env)[source]¶ Verify pytest_multipletg plugin restores cross section on teardown.
unittests.test_plugins.test_pidchecker¶
test_pidchecker.py
Unittests for pytest_pidchecker.py
-
class
unittests.test_plugins.test_pidchecker.FakeItem(monkeypatch, pidchecker)[source]¶ Bases:
object
unittests.test_plugins.test_pytest_skip_filter¶
test_skip_filter.py
Unittests for pytest_skip_filter plugin
-
class
unittests.test_plugins.test_pytest_skip_filter.TestPluginSkipFilter[source]¶ Bases:
object-
class
Param(name, file_text, counts)¶ Bases:
tuple-
__getnewargs__()¶ Return self as a plain tuple. Used by copy and pickle.
-
static
__new__(_cls, name, file_text, counts)¶ Create new instance of Param(name, file_text, counts)
-
__repr__()¶ Return a nicely formatted representation string
-
_asdict()¶ Return a new OrderedDict which maps field names to their values.
-
classmethod
_make(iterable, new=<built-in method __new__ of type object at 0xa395c0>, len=<built-in function len>)¶ Make a new Param object from a sequence or iterable
-
_replace(_self, **kwds)¶ Return a new Param object replacing specified fields with new values
-
counts¶ Alias for field number 2
-
file_text¶ Alias for field number 1
-
name¶ Alias for field number 0
-
-
TestPluginSkipFilter.argnames= ('name', 'file_text', 'counts')¶
-
TestPluginSkipFilter.argvalues= [Param(name='test_skip_test', file_text='\n import pytest\n\n def test_fail():\n assert 0\n\n def test_pass():\n assert 1\n\n @pytest.mark.skipif("True", reason="Skip")\n def test_skip():\n assert 1\n ', counts=[1, 0, 1]), Param(name='test_skip_in_class', file_text='\n import pytest\n\n class TestClass(object):\n def test_fail(self):\n assert 0\n\n def test_pass(self):\n assert 1\n\n @pytest.mark.skipif("True", reason="Skip")\n def test_skip(self):\n assert 1\n ', counts=[1, 0, 1]), Param(name='test_double_skip_in_class', file_text='\n import pytest\n\n class TestClass(object):\n def test_fail(self):\n assert 0\n\n def test_pass(self):\n assert 1\n\n @pytest.mark.skipif("True", reason="Skip")\n @pytest.mark.skipif("False", reason="Skip")\n def test_skip(self):\n assert 1\n ', counts=[1, 0, 1]), Param(name='test_double_skip_class_level_1', file_text='\n import pytest\n\n @pytest.mark.skipif("True", reason="Skip")\n class TestClass(object):\n def test_fail(self):\n assert 0\n\n def test_pass(self):\n assert 1\n\n @pytest.mark.skipif("False", reason="Skip")\n def test_skip(self):\n assert 1\n ', counts=[0, 0, 0]), Param(name='test_double_skip_class_level_2', file_text='\n import pytest\n\n @pytest.mark.skipif("True", reason="Skip")\n @pytest.mark.skipif("False", reason="Skip")\n class TestClass(object):\n def test_fail(self):\n assert 0\n\n def test_pass(self):\n assert 1\n\n def test_skip(self):\n assert 1\n ', counts=[0, 0, 0]), Param(name='test_parametrize_skip_1', file_text='\n import pytest\n\n class TestClass(object):\n def test_fail(self):\n assert 0\n\n def test_pass(self):\n assert 1\n\n @pytest.mark.skipif("True", reason="Skip")\n @pytest.mark.parametrize("a", [1,2])\n def test_skip(self, a):\n assert a == 2\n ', counts=[1, 0, 1]), Param(name='test_parametrize_skip_2', file_text='\n import pytest\n\n class TestClass(object):\n def test_fail(self):\n assert 0\n\n def test_pass(self):\n assert 1\n\n @pytest.mark.parametrize("a", [1,pytest.mark.skipif("True", reason="Skip")(2)])\n def test_skip(self, a):\n assert a == 2\n ', counts=[1, 0, 2]), Param(name='test_parametrize_skip_3', file_text='\n import pytest\n\n class TestClass(object):\n def test_fail(self):\n assert 0\n\n def test_pass(self):\n assert 1\n\n @pytest.mark.skipif("True", reason="Skip")\n @pytest.mark.parametrize("a", [1,pytest.mark.skipif("False", reason="Skip")(2)])\n def test_skip(self, a):\n assert a == 2\n ', counts=[1, 0, 1]), Param(name='test_parametrize_skip_4', file_text='\n import pytest\n\n @pytest.mark.skipif("True", reason="Skip")\n class TestClass(object):\n def test_fail(self):\n assert 0\n\n def test_pass(self):\n assert 1\n\n @pytest.mark.parametrize("a", [1,pytest.mark.skipif("False", reason="Skip")(2)])\n def test_skip(self, a):\n assert a == 2\n ', counts=[0, 0, 0])]¶
-
TestPluginSkipFilter.ids= ['test_skip_test', 'test_skip_in_class', 'test_double_skip_in_class', 'test_double_skip_class_level_1', 'test_double_skip_class_level_2', 'test_parametrize_skip_1', 'test_parametrize_skip_2', 'test_parametrize_skip_3', 'test_parametrize_skip_4']¶
-
TestPluginSkipFilter.test_boolean_condition(testdir, name, file_text, counts)[source]¶ Test if we can use boolean conditions instead of string conditions.
-
class
unittests.test_plugins.test_tc_duration¶
test_tc_duration.py
Unittests for pytest_test_duration plugin
-
class
unittests.test_plugins.test_tc_duration.TestCountTiming[source]¶ Bases:
objectClass verifies count and timing parameters of test duration.
-
test_count_float()[source]¶ Verify that test ends after integer value of count when float value of count is passed.
-
test_count_less_than_timing()[source]¶ Verify that test ends after value of count when time of count less than timing is passed.
-
test_count_negative()[source]¶ Verify that test ends after 1 count when negative value of count is passed.
-
test_count_when_timing_zero()[source]¶ Verify that test ends after value of count when zero value of timing is passed.
-
test_nonexistent_time()[source]¶ Verify that test ends after 1 count when timing by nonexistent time is passed.
-
test_timing_float()[source]¶ Verify that test ends after value of timing when float value of timing is passed.
-
test_timing_less_than_count()[source]¶ Verify that test ends after value of timing when timing less than time of count is passed.
-
test_timing_negative()[source]¶ Verify that test ends after 1 count when negative value of timing is passed.
-
-
class
unittests.test_plugins.test_tc_duration.TestOptionCountTiming[source]¶ Bases:
objectClass verifies count, timing and option parameters of test duration.
-
test_count_less_than_option()[source]¶ Verify that test ends after value of count when time of count less than option is passed.
-
test_count_less_than_option_and_timing()[source]¶ Verify that test ends after value of count when count less than option and timing is passed.
-
test_count_when_option_zero()[source]¶ Verify that test ends after value of count when zero value of option is passed.
-
test_count_when_timing_and_option_zero()[source]¶ Verify that test ends after value of count when zero value of option and timing is passed.
-
test_option_float()[source]¶ Verify that test ends after value of option when float value of option is passed.
-
test_option_less_than_count()[source]¶ Verify that test ends after value of option when option less than time of count is passed.
-
test_option_less_than_timing()[source]¶ Verify that test ends after value of option when option less than timing is passed.
-
test_option_less_timing_and_count()[source]¶ Verify that test ends after value of option when option less than timing and count is passed.
-
test_option_negative()[source]¶ Verify that test ends after 1 count when negative value of option is passed.
-
test_option_when_count_zero()[source]¶ Verify that test ends after value of option when zero value of count is passed.
-
test_option_when_timing_and_count_zero()[source]¶ Verify that test ends after value of option when zero value of timing and count is passed.
-
test_option_when_timing_zero()[source]¶ Verify that test ends after value of option when zero value of timing is passed.
-
test_option_zero()[source]¶ Verify that test ends after 1 count when zero value of option is passed.
-
test_timing_less_than_option()[source]¶ Verify that test ends after value of timing when timing less than option is passed.
-
test_timing_less_than_option_and_count()[source]¶ Verify that test ends after value of timing when timing less than option and count is passed.
-
unittests.traffic_generator.test_ixnet¶
test_ixnet.py
Unittests for IxNetwork
-
class
unittests.traffic_generator.test_ixnet.Tg(*args, **kwargs)[source]¶ Bases:
testlib.Ixia.IxiaHLT.IxiaHLTMixin,testlib.packet_processor.PacketProcessor-
DEFAULT_MAX_SNIFF_TIME= 3600¶
-
static
_get_port_to_string(iface)[source]¶ Simple helper which allows to get string representation for interface
Parameters: iface (list) – Which IXIA interface to use for packet sending (list in format [chassis_id, card_id, port_id]) Returns: string in format “chassis_id/card_id/port_id” Return type: str
-
_get_speed_ports(args)[source]¶ Get ports with speed from config.
Notes
This function check if port has speed in config file.
Returns: List of ports used in real config
-
_set_filter_params(layer)[source]¶ Configures filter parameters for specified layer.
Parameters: Layer (str) – compatible with pypacker “layers” Returns: None
-
class_logger= <logging.LoggerAdapter object>¶
-
start_sniff(ifaces, sniffing_time=None, packets_count=0, filter_layer=None, src_filter=None, dst_filter=None)[source]¶ Starts sniffing on specified interfaces.
Parameters: - ifaces (list) – List of TG interfaces for capturing.
- sniffing_time (int) – Time in seconds for sniffing.
- packets_count (int) – Count of packets to sniff (no count limitation in case 0).
- filter_layer (str) – Name of predefined sniffing filter criteria.
- src_filter (str) – Sniff only packet with defined source MAC.
- dst_filter (str) – Sniff only packet with defined destination MAC.
Returns: None
Notes
This method introduces additional 1.5 seconds timeout after capture enabling. It’s required by Ixia sniffer to wait until capturing is started.
Examples:
env.tg[1].start_sniff(['eth0', ], filter_layer='IP', src_filter='00:00:00:01:01:01', dst_filter='00:00:00:22:22:22')
-
stop_sniff(ifaces, force=False, drop_packets=False, sniff_packet_count=1000)[source]¶ Stops sniffing on specified interfaces and returns captured data.
Parameters: - ifaces (list) – List of interfaces where capturing has to be stopped.
- force (bool) – Stop capturing even if time or packet count criteria isn’t achieved.
- drop_packets (bool) – Don’t return sniffed data (used in case you need just read statistics).
- sniff_packet_count (int) – Default number of packets to return (used to avoid test hanging in case storm).
Returns: Dictionary where key = interface name, value = list of sniffed packets.
Return type:
-
-
unittests.traffic_generator.test_ixnet._get_port_to_string(iface)[source]¶ Simple helper which allows to get string representation for interface.
Parameters: iface (list) – Which IXIA interface to use for packet sending (list in format [chassis_id, card_id, port_id]) Returns: string in format “chassis_id/card_id/port_id” Return type: str
unittests.traffic_generator.test_pp¶
test_pp.py
Packet Processor’s unittests
-
class
unittests.traffic_generator.test_pp.TestPacketProcessor[source]¶ Bases:
object-
test_assembling_dot1q_icmp_packet_10(tg)[source]¶ Check assembling of Dot1Q.ICMP fragmented packet. Duplicate fragment 2.
-
test_assembling_dot1q_icmp_packet_11(tg)[source]¶ Check assembling of Dot1Q.ICMP fragmented packet. Two packets.
-
test_assembling_dot1q_icmp_packet_12(tg)[source]¶ Check assembling of Dot1Q.ICMP fragmented packet. Four packets (fragmented and not).
-
test_assembling_dot1q_icmp_packet_2(tg)[source]¶ Check assembling of Dot1Q.ICMP fragmented packet. Overlapped fragments.
-
test_assembling_dot1q_icmp_packet_3(tg)[source]¶ Check assembling of Dot1Q.ICMP fragmented packet. Missed fragment 1.
-
test_assembling_dot1q_icmp_packet_4(tg)[source]¶ Check assembling of Dot1Q.ICMP fragmented packet. Wrong frag in Fragment 1.
-
test_assembling_dot1q_icmp_packet_5(tg)[source]¶ Check assembling of Dot1Q.ICMP fragmented packet. Wrong flags in Fragment 1.
-
test_assembling_dot1q_icmp_packet_6(tg)[source]¶ Check assembling of Dot1Q.ICMP fragmented packet. Missed last fragment.
-
test_assembling_dot1q_icmp_packet_7(tg)[source]¶ Check assembling of Dot1Q.ICMP fragmented packet. Wrong frag in last fragment.
-
test_assembling_dot1q_icmp_packet_8(tg)[source]¶ Check assembling of Dot1Q.ICMP fragmented packet. Wrong flags in last fragment.
-
test_assembling_dot1q_icmp_packet_9(tg)[source]¶ Check assembling of Dot1Q.ICMP fragmented packet. Missed fragment after 2.
-
test_get_packet_field_negative_1(tg)[source]¶ Verify that method get_packet_field returns Error message when layer is not defined in packet(1).
-
test_get_packet_field_negative_2(tg)[source]¶ Verify that method get_packet_field returns Error message when layer is not defined in packet(2).
-
unittests.traffic_generator.test_tg¶
test_tg.py
Traffic generator’s unittests
-
class
unittests.traffic_generator.test_tg.TestTGs[source]¶ Bases:
object-
pytestmark= [<MarkDecorator 'unittests' {'args': (), 'kwargs': {}}>]¶
-
test_arp_incrementation_dot1q_disabled_1(tg)[source]¶ Check arp incrementation. Count == Increment count. Dot1Q disabled.
-
test_arp_incrementation_dot1q_disabled_2(tg)[source]¶ Check arp incrementation. Count == 2*Increment count. Dot1Q disabled.
-
test_arp_incrementation_dot1q_enabled(tg)[source]¶ Check arp incrementation. Count == Increment count. Dot1Q enabled.
-
test_check_increment_arp_hwsrc(tg)[source]¶ Check all fields in incremented packet. APR.hwsrc increment.
-
test_check_increment_arp_psrc(tg)[source]¶ Check all fields in incremented packet. APR.psrc increment.
-
test_check_increment_dot1q_vlan_double(tg)[source]¶ Check all fields in incremented packet. Dot1Q.vlan increment.
-
test_check_increment_dot1q_vlan_single(tg)[source]¶ Check all fields in incremented packet. Dot1Q.vlan increment.
-
test_check_increment_igmp_ip(tg)[source]¶ Check all fields in incremented packet. IGMP.ip increment.
-
test_check_increment_ip_proto(tg)[source]¶ Check all fields in incremented packet. IP.proto increment.
-
test_check_increment_udp_dport(tg)[source]¶ Check all fields in incremented packet. UDP.dport increment.
-
test_check_increment_udp_sport(tg)[source]¶ Check all fields in incremented packet. UDP.sport increment.
-
test_default_ether_type(tg)[source]¶ Verify that default Ether type for tagged packets is equal to 0x8100.
-
test_double_tagged_packet_1(tg)[source]¶ Verify that pypacker can recognize QinQ packets type 0x9100.
-
test_double_tagged_packet_2(tg)[source]¶ Verify that pypacker can recognize QinQ packets type 0x88A8.
-
test_dscp_incrementation_dot1q_disabled_1(tg)[source]¶ Check dscp incrementation. Count == Increment count. Dot1Q disabled.
-
test_dscp_incrementation_dot1q_disabled_2(tg)[source]¶ Check dscp incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_dst_ip_incrementation_dot1q_disabled_1(tg)[source]¶ Check destination_ip incrementation. Count == Increment count. Dot1Q disabled.
-
test_dst_ip_incrementation_dot1q_disabled_2(tg)[source]¶ Check destination_ip incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_dst_ip_incrementation_dot1q_enabled_1(tg)[source]¶ Check destination_ip incrementation. Count == Increment count. Dot1Q enabled.
-
test_dst_ip_incrementation_dot1q_enabled_2(tg)[source]¶ Check destination_ip incrementation. Count = 2*Increment count. Dot1Q enabled.
-
test_dst_ipv6_incrementation_dot1q_disabled_1(tg)[source]¶ Check DST IPv6 incrementation. Count == Increment count. Dot1Q disabled.
-
test_dst_ipv6_incrementation_dot1q_disabled_2(tg)[source]¶ Check DST IPv6 incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_dst_ipv6_incrementation_dot1q_enabled_1(tg)[source]¶ Check DST IPv6 incrementation. Count == Increment count. Dot1Q enabled.
-
test_dst_ipv6_incrementation_dot1q_enabled_2(tg)[source]¶ Check DST IPv6 incrementation. Count == Increment count. Dot1Q enabled.
-
test_dst_udp_incrementation_dot1q_disabled_1(tg)[source]¶ Check destination_udp incrementation. Count == Increment count. Dot1Q disabled.
-
test_dst_udp_incrementation_dot1q_disabled_2(tg)[source]¶ Check destination_udp incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_dst_udp_incrementation_dot1q_enabled(tg)[source]¶ Check destination_udp incrementation. Count == Increment count. Dot1Q enabled.
-
test_ether_incrementation_dot1q_disabled_1(tg)[source]¶ Check ether type incrementation. Count == Increment count. Dot1Q disabled.
-
test_ether_incrementation_dot1q_disabled_2(tg)[source]¶ Check ip protocol incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_flow_label_dst_ipv6_incrementation(tg)[source]¶ Check Flow Label and DST IPv6 incrementation. Count == Increment count. Dot1Q enabled.
-
test_flow_label_ipv6_incrementation_dot1q_disabled_1(tg)[source]¶ Check Flow Label IPv6 incrementation. Count == Increment count. Dot1Q disabled.
-
test_flow_label_ipv6_incrementation_dot1q_disabled_2(tg)[source]¶ Check Flow Label incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_flow_label_ipv6_incrementation_dot1q_enabled(tg)[source]¶ Check Flow Label IPv6 incrementation. Count == Increment count. Dot1Q enabled.
-
test_flow_label_src_ipv6_incrementation(tg)[source]¶ Check Flow Label with SRC IPv6 incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_incrementation_negative_1(tg)[source]¶ Verify that method set_stream returns Error message when layer is not defined in packet(1).
-
test_incrementation_negative_2(tg)[source]¶ Verify that method set_stream returns Error message when when layer is not defined in packet(2).
-
test_ip_dip_and_sip_increment_udf_dependant(tg)[source]¶ Check ip dip and sip_increment incrementation. Dip increment dependant from sip increment.
-
test_ip_dscp_and_sip_increment_dot1q_disabled_1(tg)[source]¶ Check ip dscp and sip_increment incrementation. Count == Increment count. Dot1Q disabled.
-
test_ip_dscp_and_sip_increment_dot1q_disabled_2(tg)[source]¶ Check ip dscp and sip_increment incrementation. Count == Increment count. Dot1Q disabled.
-
test_ip_dscp_dip_sip_increment_udf_dependant(tg)[source]¶ Check ip dscp, dip and sip_increment incrementation. Dependant increments.
-
test_ip_dscp_dip_sip_increment_udf_one_dependant(tg)[source]¶ Check ip dscp, dip and sip_increment incrementation. Dependant increments form sip.
-
test_ip_dscp_incrementation_dot1q_enabled(tg)[source]¶ Check ip dscp incrementation. Count == Increment count. Dot1Q enabled.
-
test_ip_protocol_and_sip_increment_dot1q_disabled(tg)[source]¶ Check ip protocol and sip_increment incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_ip_protocol_and_sip_increment_dot1q_enabled(tg)[source]¶ Check ip protocol and sip_increment incrementation. Count == Increment count. Dot1Q enabled.
-
test_ip_protocol_incrementation_dot1q_disabled(tg)[source]¶ Check ip protocol incrementation. Count == Increment count. Dot1Q disabled.
-
test_ip_protocol_incrementation_dot1q_disabled_2(tg)[source]¶ Check ip protocol incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_ip_protocol_incrementation_dot1q_enabled(tg)[source]¶ Check destination_udp incrementation. Count == Increment count. Dot1Q enabled.
-
test_lldp_dcbx_app_prio_table(tg)[source]¶ Verify that DCBX packets with Application Priority Tables are built and captured correctly.
-
test_lldp_incrementation_continuous_traffic_1(tg)[source]¶ Check lldp incrementation. Continuous traffic.
-
test_lldp_incrementation_continuous_traffic_2(tg)[source]¶ Check lldp incrementation. Continuous traffic.
-
test_lldp_incrementation_increment_count_1(tg)[source]¶ Check lldp incrementation. Count == Increment count.
-
test_lldp_incrementation_increment_count_2(tg)[source]¶ Check lldp incrementation. Count == 2*Increment count.
-
test_lldp_sys_capabilities(tg)[source]¶ Verify that LLDP packets with full System capabilities list are built and captured correctly.
-
test_lldp_with_padding(tg)[source]¶ Verify that LLDP packets with with padding are built and captured correctly.
-
test_next_header_ipv6_incrementation_dot1q_disabled(tg)[source]¶ Check next header incrementation. Count == Increment count. Dot1Q disabled.
-
test_next_header_ipv6_incrementation_dot1q_disabled_2(tg)[source]¶ Check next header incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_next_header_ipv6_incrementation_dot1q_enabled(tg)[source]¶ Check next header IPv6 incrementation. Count == Increment count. Dot1Q enabled.
-
test_packet_size_decrementing(tg)[source]¶ Check packet size decrementing. Count=9, decrement count=9.
-
test_packet_size_incrementing_1(tg)[source]¶ Check packet size incrementing. Count=1, increment count=5.
-
test_packet_size_incrementing_2(tg)[source]¶ Check packet size incrementing. Count=5, increment count=5.
-
test_pause_frames_0001(tg)[source]¶ Verify that MAC Control Pause frames with opcode 0x0001 are builded and sniffed correctly.
-
test_pause_frames_0101(tg)[source]¶ Verify that MAC Control Pause frames with opcode 0x0101 are builded and sniffed correctly.
-
test_pause_frames_ffff(tg)[source]¶ Verify that MAC Control Pause frames with unknown are builded and sniffed correctly.
-
test_sa_incrementation_and_packet_fragmentation(tg)[source]¶ Check SA incrementation + packet fragmentation. Count == Increment count.
-
test_send_sniff_max_min_packets(tg, padding_size)[source]¶ Verify sending and sniffing of packets with minimal and maximal size.
-
test_src_and_dst_ipv6_incrementation_dot1q_disabled(tg)[source]¶ Check SRC and DST IPv6 incrementation. Count == Increment count. Dot1Q disabled.
-
test_src_and_dst_ipv6_incrementation_dot1q_enabled(tg)[source]¶ Check SRC and DST IPv6 incrementation. Count == Increment count. Dot1Q enabled.
-
test_src_ip_incrementation_dot1q_disabled_1(tg)[source]¶ Check source_ip incrementation. Count == Increment count. Dot1Q disabled.
-
test_src_ip_incrementation_dot1q_disabled_2(tg)[source]¶ Check source_ip incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_src_ip_incrementation_dot1q_enabled_1(tg)[source]¶ Check source_ip incrementation. Count == Increment count. Dot1Q enabled.
-
test_src_ip_incrementation_dot1q_enabled_2(tg)[source]¶ Check source_ip incrementation. Count = 2*Increment count. Dot1Q enabled.
-
test_src_ipv6_incrementation_dot1q_disabled_1(tg)[source]¶ Check SRC IPv6 incrementation. Count == Increment count. Dot1Q disabled.
-
test_src_ipv6_incrementation_dot1q_disabled_2(tg)[source]¶ Check SRC IPv6 incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_src_ipv6_incrementation_dot1q_enabled_1(tg)[source]¶ Check SRC IPv6 incrementation. Count == Increment count. Dot1Q enabled.
-
test_src_ipv6_incrementation_dot1q_enabled_2(tg)[source]¶ Check SRC IPv6 incrementation. Count > Increment count. Dot1Q enabled.
-
test_src_tcp_and_dst_tcp_incrementation_dot1q_disabled_1(tg)[source]¶ Check source_tcp and destination_tcp incrementation. Count == Increment count. Dot1Q disabled.
-
test_src_tcp_and_dst_tcp_incrementation_dot1q_disabled_2(tg)[source]¶ Check source_tcp and destination_tcp incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_src_tcp_and_dst_tcp_incrementation_dot1q_enabled(tg)[source]¶ Check source_tcp and destination_tcp incrementation. Count == Increment count. Dot1Q enabled.
-
test_src_tcp_incrementation_dot1q_disabled_1(tg)[source]¶ Check source_tcp incrementation. Count == Increment count. Dot1Q disabled.
-
test_src_tcp_incrementation_dot1q_disabled_2(tg)[source]¶ Check source_tcp incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_src_tcp_incrementation_dot1q_enabled(tg)[source]¶ Check source_tcp incrementation. Count == Increment count. Dot1Q enabled.
-
test_src_udp_and_dst_udp_incrementation_dot1q_disabled_1(tg)[source]¶ Check source_udp and destination_udp incrementation. Count == Increment count. Dot1Q disabled.
-
test_src_udp_and_dst_udp_incrementation_dot1q_disabled_2(tg)[source]¶ Check source_udp and destination_udp incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_src_udp_and_dst_udp_incrementation_dot1q_enabled(tg)[source]¶ Check source_udp and destination_udp incrementation. Count == Increment count. Dot1Q enabled.
-
test_src_udp_incrementation_dot1q_disabled_1(tg)[source]¶ Check source_udp incrementation. Count == Increment count. Dot1Q disabled.
-
test_src_udp_incrementation_dot1q_disabled_2(tg)[source]¶ Check source_udp incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_src_udp_incrementation_dot1q_enabled(tg)[source]¶ Check source_udp incrementation. Count == Increment count. Dot1Q enabled.
-
test_srcmac_and_dstmac_wrong_layer_filter(tg)[source]¶ Check srcMac and dstMac filter with wrong filter_layer.
-
test_start_stop_parallel_and_independent_continuous_streams(tg)[source]¶ Verify parallel and independent streams starts and stops.
-
test_start_stop_parallel_and_independent_set_quantity_streams(tg)[source]¶ Verify parallel and independent set quantity of streams.
-
test_streams_corruption_1(tg)[source]¶ Verify that set_stream does not corrupt already started streams.
-
test_streams_corruption_2(tg)[source]¶ Verify that set_stream does not corrupt already started streams.
-
test_traffic_class_ipv6_incrementation_dot1q_disabled(tg)[source]¶ Check traffic class incrementation. Count == Increment count. Dot1Q disabled.
-
test_traffic_class_ipv6_incrementation_dot1q_disabled_2(tg)[source]¶ Check traffic class incrementation. Count = 2*Increment count. Dot1Q disabled.
-
test_traffic_class_ipv6_incrementation_dot1q_enabled(tg)[source]¶ Check traffic class IPv6 incrementation. Count == Increment count. Dot1Q enabled.
-
test_vlan_incrementation_increment_count_1(tg)[source]¶ Check vlan incrementation. Count == Increment count.
-
unittests.traffic_generator.test_trextg¶
test_trextg.py
TRex traffic generator’s unittests
Notes
- To run TRex unittests:
- Install TRex client package
- Configure and start TRex server
- Specify IP address and ports in the following variables: TREX_HLT_CONFIG, TREX_CONFIG
-
class
unittests.traffic_generator.test_trextg.TestTrexHLTTg[source]¶ Bases:
object-
pytestmark= [<MarkDecorator 'skipif' {'args': (False,), 'kwargs': {'reason': 'Need to install TRex client package'}}>]¶
-
-
class
unittests.traffic_generator.test_trextg.TestTrexTg[source]¶ Bases:
object-
packet_definition= ({'Ether': {'dst': 'ff:ff:ff:ff:ff:ff', 'src': '00:00:00:00:00:02'}}, {'IP': {'dst': '20.1.1.1', 'src': '10.1.1.1'}}, {'UDP': {'dport': 50, 'sport': 10}})¶
-
packet_definition_tcp= ({'Ether': {'dst': 'ff:ff:ff:ff:ff:ff', 'src': '00:00:00:00:00:02'}}, {'IP': {'dst': '20.1.1.1', 'src': '10.1.1.1'}}, {'TCP': {'dport': 50, 'sport': 10}})¶
-
pytestmark= [<MarkDecorator 'skipif' {'args': (False,), 'kwargs': {'reason': 'Need to install TRex client package'}}>]¶
-
test_all_supported_increments_simultaneously(trex)[source]¶ Set stream with all supported increments simultaneously and send it
Notes
Two TRex interfaces should be connected to each other
-
test_increment_dst_ip(trex)[source]¶ Set stream with destination ip increment and send it.
Notes
Two TRex interfaces should be connected to each other
-
test_increment_required_size_1(trex)[source]¶ Set stream with ‘required_size’ increment and send it.
Notes
Two TRex interfaces should be connected to each other
-
test_increment_required_size_in_loop(trex)[source]¶ Set stream with increment ‘required_size’ and verify that size is wrapped back to min value.
Notes
Two TRex interfaces should be connected to each other
-
test_increment_src_ip(trex)[source]¶ Set stream with source ip increment and send it.
Notes
Two TRex interfaces should be connected to each other
-
test_increment_tcp_dst_port(trex)[source]¶ Set stream with TCP destination port increment and send it.
Notes
Two TRex interfaces should be connected to each other
-
test_increment_tcp_src_port(trex)[source]¶ Set stream with TCP source port increment and send it.
Notes
Two TRex interfaces should be connected to each other
-
test_increment_udp_dst_port(trex)[source]¶ Set stream with UDP destination port increment and send it.
Notes
Two TRex interfaces should be connected to each other
-
test_increment_udp_src_port(trex)[source]¶ Set stream with UDP source port increment and send it.
Notes
Two TRex interfaces should be connected to each other
-
test_random_required_size(trex)[source]¶ Set stream with random ‘required_size’ and send it.
Notes
Two TRex interfaces should be connected to each other
-
test_send_2_streams_on_same_interface_trex(trex)[source]¶ Send 2 streams using send_stream method on same interface.
-
test_send_2_streams_trex(trex)[source]¶ Send 2 streams using send_stream method on different interfaces.
-
test_single_stream_with_packet_interval_trex(trex)[source]¶ Send single stream with packets interval.
-
test_start_2_continuous_on_same_interface_streams_trex(trex)[source]¶ Send 2 continuous streams using start_streams method on same interface.
-
test_start_2_continuous_streams_trex(trex)[source]¶ Send 2 continuous streams using start_streams method on different interfaces.
-