Python engine.Engine() Examples
The following are 4
code examples of engine.Engine().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
engine
, or try the search function
.
Example #1
Source File: test_node_flood_repeater_election.py From rift-python with Apache License 2.0 | 5 votes |
def make_test_node(parents, additional_node_config=None): test_engine = engine.Engine( passive_nodes=[], run_which_nodes=[], interactive=False, telnet_port_file=None, ipv4_multicast_loopback=False, ipv6_multicast_loopback=False, log_level=logging.CRITICAL, config={} ) test_engine.floodred_system_random = 11111111111111111111 # Make unit test deterministic node_config = { "name": "node" + str(NODE_SYSID), "systemid": NODE_SYSID, "level": NODE_LEVEL, "skip-self-orginated-ties": True # The test is in control of what TIEs are in the DB } if additional_node_config: node_config.update(additional_node_config) test_node = node.Node(node_config, test_engine) # Create fake interfaces for parents (in state 3-way) for parent_sysid in parents.keys(): make_parent_interface(test_node, parent_sysid) # Fill TIE-DB for the first time update_test_node(test_node, parents) return test_node
Example #2
Source File: __main__.py From rift-python with Apache License 2.0 | 5 votes |
def main(): args = parse_command_line_arguments() parse_environment_variables(args) parsed_config = config.parse_configuration(args.configfile) packet_common.add_missing_methods_to_thrift() eng = engine.Engine(run_which_nodes=run_which_nodes(args), passive_nodes=args.passive_nodes, interactive=args.interactive, telnet_port_file=args.telnet_port_file, ipv4_multicast_loopback=ipv4_multicast_loopback(args), ipv6_multicast_loopback=ipv6_multicast_loopback(args), log_level=args.log_level, config=parsed_config) eng.run()
Example #3
Source File: simulator.py From Multi-Commander with Apache License 2.0 | 5 votes |
def __init__(self, path_to_log, path_to_work_directory, dic_traffic_env_conf): self.path_to_log = path_to_log self.path_to_work_directory = path_to_work_directory self.dic_traffic_env_conf = dic_traffic_env_conf self.eng = engine.Engine(self.dic_traffic_env_conf["INTERVAL"], self.dic_traffic_env_conf["THREADNUM"], self.dic_traffic_env_conf["SAVEREPLAY"], self.dic_traffic_env_conf["RLTRAFFICLIGHT"]) self.load_roadnet() self.load_flow()
Example #4
Source File: key.py From strictyaml with MIT License | 5 votes |
def _storybook(**settings): return StoryCollection( pathquery(DIR.key / "story").ext("story"), Engine(DIR, **settings) )