removed broker from session, updated most places using broker to use alternative logic to compensate where needed
This commit is contained in:
parent
6570f22ccf
commit
b2d2705849
19 changed files with 151 additions and 471 deletions
|
@ -8,18 +8,19 @@ from core.emulator.enumerations import EventTypes
|
|||
|
||||
|
||||
def main():
|
||||
address = sys.argv[1]
|
||||
remote = sys.argv[2]
|
||||
|
||||
# ip generator for example
|
||||
prefixes = IpPrefixes(ip4_prefix="10.83.0.0/16")
|
||||
|
||||
# create emulator instance for creating sessions and utility methods
|
||||
coreemu = CoreEmu()
|
||||
coreemu = CoreEmu({"distributed_address": address})
|
||||
session = coreemu.create_session()
|
||||
|
||||
# initialize distributed
|
||||
address = sys.argv[1]
|
||||
remote = sys.argv[2]
|
||||
session.address = address
|
||||
session.add_distributed(remote)
|
||||
server_name = "core2"
|
||||
session.add_distributed(server_name, remote)
|
||||
|
||||
# must be in configuration state for nodes to start, when using "node_add" below
|
||||
session.set_state(EventTypes.CONFIGURATION_STATE)
|
||||
|
@ -27,7 +28,7 @@ def main():
|
|||
# create local node, switch, and remote nodes
|
||||
options = NodeOptions()
|
||||
node_one = session.add_node(node_options=options)
|
||||
options.emulation_server = remote
|
||||
options.emulation_server = server_name
|
||||
node_two = session.add_node(node_options=options)
|
||||
|
||||
# create node interfaces and link
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue