From 0b1a44e9b2c5173f2893ebc84bd8036dfbc0a0ba Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Mon, 5 Jun 2023 14:22:08 -0700 Subject: [PATCH] docs: cleanup tutorial scripts --- package/examples/tutorials/tutorial1/scenario.py | 5 ++++- package/examples/tutorials/tutorial1/scenario_service.py | 5 ++++- package/examples/tutorials/tutorial7/scenario.py | 9 +++++---- package/examples/tutorials/tutorial7/scenario_service.py | 9 +++++---- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/package/examples/tutorials/tutorial1/scenario.py b/package/examples/tutorials/tutorial1/scenario.py index 1f5a45e6..0c7d33ac 100644 --- a/package/examples/tutorials/tutorial1/scenario.py +++ b/package/examples/tutorials/tutorial1/scenario.py @@ -4,7 +4,10 @@ from core.api.grpc.wrappers import Position def main(): # interface helper - iface_helper = client.InterfaceHelper(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64") + iface_helper = client.InterfaceHelper( + ip4_prefix="10.0.0.0/24", + ip6_prefix="2001::/64", + ) # create grpc client and connect core = client.CoreGrpcClient() diff --git a/package/examples/tutorials/tutorial1/scenario_service.py b/package/examples/tutorials/tutorial1/scenario_service.py index bc2c6cc8..5a3c5508 100644 --- a/package/examples/tutorials/tutorial1/scenario_service.py +++ b/package/examples/tutorials/tutorial1/scenario_service.py @@ -4,7 +4,10 @@ from core.api.grpc.wrappers import Position def main(): # interface helper - iface_helper = client.InterfaceHelper(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64") + iface_helper = client.InterfaceHelper( + ip4_prefix="10.0.0.0/24", + ip6_prefix="2001::/64", + ) # create grpc client and connect core = client.CoreGrpcClient() diff --git a/package/examples/tutorials/tutorial7/scenario.py b/package/examples/tutorials/tutorial7/scenario.py index 6c4125ed..f8132ea5 100644 --- a/package/examples/tutorials/tutorial7/scenario.py +++ b/package/examples/tutorials/tutorial7/scenario.py @@ -1,11 +1,14 @@ from core.api.grpc import client -from core.api.grpc.wrappers import Position, Interface, NodeType +from core.api.grpc.wrappers import Position, NodeType from core.emane.models.ieee80211abg import EmaneIeee80211abgModel def main(): # interface helper - iface_helper = client.InterfaceHelper(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64") + iface_helper = client.InterfaceHelper( + ip4_prefix="10.0.0.0/24", + ip6_prefix="2001::/64", + ) # create grpc client and connect core = client.CoreGrpcClient() @@ -34,14 +37,12 @@ def main(): node2_iface.ip4_mask = 32 node2_iface.ip6 = "2001::1" node2_iface.ip6_mask = 128 - # emane_iface1 = Interface(id=0) session.add_link(node1=node2, node2=emane_net, iface1=node2_iface) node3_iface = iface_helper.create_iface(node_id=node3.id, iface_id=0) node3_iface.ip4 = "10.0.0.2" node3_iface.ip4_mask = 32 node3_iface.ip6 = "2001::2" node3_iface.ip6_mask = 128 - # emane_iface2 = Interface(id=1) session.add_link(node1=node3, node2=emane_net, iface1=node3_iface) # start session diff --git a/package/examples/tutorials/tutorial7/scenario_service.py b/package/examples/tutorials/tutorial7/scenario_service.py index 1f8b0f72..65b28c45 100644 --- a/package/examples/tutorials/tutorial7/scenario_service.py +++ b/package/examples/tutorials/tutorial7/scenario_service.py @@ -1,11 +1,14 @@ from core.api.grpc import client -from core.api.grpc.wrappers import Position, Interface, NodeType +from core.api.grpc.wrappers import Position, NodeType from core.emane.models.ieee80211abg import EmaneIeee80211abgModel def main(): # interface helper - iface_helper = client.InterfaceHelper(ip4_prefix="10.0.0.0/24", ip6_prefix="2001::/64") + iface_helper = client.InterfaceHelper( + ip4_prefix="10.0.0.0/24", + ip6_prefix="2001::/64", + ) # create grpc client and connect core = client.CoreGrpcClient() @@ -35,14 +38,12 @@ def main(): node2_iface.ip4_mask = 32 node2_iface.ip6 = "2001::1" node2_iface.ip6_mask = 128 - # emane_iface1 = Interface(id=0) session.add_link(node1=node2, node2=emane_net, iface1=node2_iface) node3_iface = iface_helper.create_iface(node_id=node3.id, iface_id=0) node3_iface.ip4 = "10.0.0.2" node3_iface.ip4_mask = 32 node3_iface.ip6 = "2001::2" node3_iface.ip6_mask = 128 - # emane_iface2 = Interface(id=1) session.add_link(node1=node3, node2=emane_net, iface1=node3_iface) # start session