1

Within a UBUNTU VM, using GNS3 I created code that is an attempt to perform 3 different outcomes, since these programs can't run mutally in the same terminal however I'm not sure how to seperate them into seperate terminals and add delays inbetween to prevent any issues that might occur.

 #!/usr/bin/python3
 import os
 import subprocess
 os.system("cd /home/sdn/Downloads/ryu/ryu/app")
 print("The working directory : ")
 os.system("pwd")
 print('\n')
 #insert time delay and open new terminal
 os.system('./rest_router.py')
 os.system('./gui_topology.py')
 #insert time delay and open new terminal
 os.system('sudo /opt/onos/bin/onos-service start')
 #insert time delay
 #these curl commands are apparently wrong syntax?
 os.system('curl - X POST -d '\{'address': '10.1.1.2/24'\}' http://localhost:8080/router/000056e95a9e4843)
 os.system('curl -X POST -d '\{'address': '10.2.2.2/24'\}' http://localhost:8080/router/000056e95a9e4843)
 os.system('curl -X POST -d '\{'address': '10.3.3.2/24'\}' http://localhost:8080/router/000056e95a9e4843)
asked Oct 26, 2022 at 6:12

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.