FWtester classes
Submodules
classes.AccessControlRule module
classes.Container module
- class classes.Container.Container(container_name, logger)
Bases:
object
Class used for lxc containers management
- add_interface(ip, mask, vlan, bridge_physical_nic='eth0')
- add_policy_rule(address, vlan, table)
- add_route(ip, mask, gw, table=None, dst_is_ip=None)
- check_command(command)
- delete_file(file_path)
- flush_network()
- get_file(srcpath, dstpath)
- is_running()
- push_file(srcpath, dstpath)
- run_command(command)
- run_interactive_command(command, params)
- set_gateway(gateway, table=None)
- start()
- stop()
classes.FwTester module
- class classes.FwTester.FwTester(config_file)
Bases:
object
Main class of the program, it’s the brain of the code, its main purpose is to build and control the flow of the rest of classes and libraries.
- add_nic_to_fw(side, mask)
- add_nic_to_router(side)
- add_nics()
- configure_containers()
- containers_start()
- containers_stop()
- generate_report()
- run()
- run_tests()
- show_usage()
classes.Network module
- class classes.Network.Network(logger)
Bases:
object
classes.Test module
- class classes.Test.Test(action, source, source_port, destination, destination_port, application, protocol, rule_number, run_only_client_container, logger)
Bases:
object
Class to process each test line
- get_connections_to_fw(fw_nics)
Gets topology for devices which connects directly to FW
- get_intermediate_routers(fw_nics, fw_routes)
Gets topology for devices which connects through an intermediate router
- get_topology(fw_nics, fw_routes)
- run(client_container, server_container, max_retries=3)
Run the test