docs: updated formatting on tutorial files

This commit is contained in:
Blake Harnden 2023-06-08 14:43:02 -07:00
parent 81230edac3
commit cbc35b74f8
13 changed files with 73 additions and 39 deletions

View file

@ -14,7 +14,7 @@ def main():
print("sessions=", sessions)
for i in range(300):
position = Position(x= 100, y = 100 + i)
position = Position(x=100, y=100 + i)
core.move_node(sessions[0].id, 2, position=position)
time.sleep(1)
print("press enter to quit")
@ -23,10 +23,3 @@ def main():
if __name__ == "__main__":
main()

View file

@ -6,7 +6,10 @@ from core.api.grpc.wrappers import NodeType, 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()
@ -17,7 +20,12 @@ def main():
# create nodes
position = Position(x=200, y=200)
wlan = session.add_node(3, name="wlan3", _type=NodeType.WIRELESS_LAN, position=position)
wlan = session.add_node(
3,
name="wlan3",
_type=NodeType.WIRELESS_LAN,
position=position,
)
position = Position(x=100, y=100)
node1 = session.add_node(1, name="n1", model="mdr", position=position)
position = Position(x=300, y=100)