Fwtester libraries
Submodules
lib.argument module
- class lib.argument.argument(name, default_value, help_string, logger, required=False)
Bases:
object
lib.argumentparser module
lib.config module
lib.datastorage module
lib.datastoragecsv module
- class lib.datastoragecsv.datastoragecsv(logger)
Bases:
lib.datastorageinterface.datastorageinterface
Class to manage data storage of type csv
- add_row(row, table)
Adds a row of data to the data storage
- add_rows(rows, table, truncate=False)
Adds some rows of data to the data storage
- get_rows(table, num_of_rows=None, offset=0, headers_in_file=True)
@get_rows: read csv lines from a file and retun them as a tupple
lib.datastorageinterface module
- class lib.datastorageinterface.datastorageinterface
Bases:
object
Interface class for subclasses which manage storage of data
- abstract add_row(data=[])
Adds a row of data to the data storage
- add_rows(data=[])
Adds some rows of data to the data storage
- abstract get_row(number=0)
Gets a row of data from the data storage
- abstract get_rows(num_of_rows=None, offset=0)
Gets some rows of data from the data storage
lib.datastoragemongodb module
- class lib.datastoragemongodb.datastoragemongodb(database, logger)
Bases:
lib.datastorageinterface.datastorageinterface
Class to manage data storage of type MongoDB
- add_row(row, table)
Adds a row of data to the data storage
- add_rows(rows, table)
Adds some rows of data to the data storage
- get_rows(table, num_of_rows=None, offset=0)
@get_rows: read documents from a collection in MongoDB database
lib.datastoragesqlite module
- class lib.datastoragesqlite.datastoragesqlite
Bases:
lib.datastorageinterface.datastorageinterface
Class to manage data storage of type database
lib.logger module
lib.network module
- class lib.network.network(logger)
Bases:
object
Class used to manage TCP/IP operations: -IP network and address -TCP/UPD Ports
- get_address(address, fw_nics, fw_routes, nic='')
- get_default_route(routes)
- get_mask(network)
- get_mask_cidr(network)
- get_network_address(network)
- get_port(port, protocol='tcp')
- is_host(address)
- is_in_network(ip, network)
- is_network(address)
- is_subnet(network1, network2)
lib.report module
lib.reportcsv module
- class lib.reportcsv.reportcsv(logger)
Bases:
lib.reportinterface.reportinterface
- add_section(section_name, section_headers, section_data)
- del_section()
- generate(report_name)
lib.reporthtml module
- class lib.reporthtml.reporthtml