Custom python scripts for GNS3 .net files
Hi, I'm working on a python script and need some help. This script will go to all the GNS3 folder, look for the all .net files, go in and find and replace the necessary parameter for the .net files to work on your computer. I need some help to find out all of the parameter that need to be change. I'm using a mac computer so I need input for the PC guy. This what I have:
I rarely use GNS3 since I have a RACK, but I'm planing to use little bit more in the future. I had a .net file and the only thing I needed to change was the following:
from this:
image = C:\Users\Karim\Documents\IOS\c3725-adventerprisek9-mz.124-15.T14.bin
to this:
image = /Volumes/HDMac2/CCIE/IOS/c3725/c3725-adventerprisek9-mz.124-12.image
I know that we have more complicated net file and that when I need your help. Can you guys tell me what are the most common changes that we need to do to be able to use the .net files on our computer?
I rarely use GNS3 since I have a RACK, but I'm planing to use little bit more in the future. I had a .net file and the only thing I needed to change was the following:
from this:
image = C:\Users\Karim\Documents\IOS\c3725-adventerprisek9-mz.124-15.T14.bin
to this:
image = /Volumes/HDMac2/CCIE/IOS/c3725/c3725-adventerprisek9-mz.124-12.image
I know that we have more complicated net file and that when I need your help. Can you guys tell me what are the most common changes that we need to do to be able to use the .net files on our computer?
Comments
-
FloOz Member Posts: 1,614 ■■■■□□□□□□Image path (like you posted), console lines, and most IMPORTANT the proper idle PC value. This would be a really helpful script since I constantly have to manually go into the .net files and replace these 3 parameters.
-
amb1s1 Member Posts: 408Do you guys ussually use only one IOS? If I match a line with image and *.bin, I will be able to change all of the IOS images but if there are different images on the files, I will be changing all the images to one version.
About PC Iddle and console lines, can you show me an original output and your change for these two lines? -
wintermute000 Banned Posts: 172My GNS3 auto detects the IOS properly to the new path I just have to hit OK then save it.
-
FloOz Member Posts: 1,614 ■■■■□□□□□□Yes but what if you download a bunch of labs online (ex. Routergods). All the.net files will have a different ios path as well and idlepc.
-
instant000 Member Posts: 1,745I thought that someone already posted a script that fixed this issue a couple years back, and there wouldn't be a need to do it yourself.
Also, some people use a text editor that can do find/replace across multiple files to take care of the issue.
I don't have the links right now, but I believe the text editor was Notepad++, and I believe that I saw the script (might have been perl or something else) on ieoc, and also on daniel's blog (or some guy's CCIE blog ... they all blend together, after a while).
Routergods has a video on notepad++
Search and replace through multiple documents with Notepad++ - YouTube
Hope this helps.Currently Working: CCIE R&S
LinkedIn: http://www.linkedin.com/in/lewislampkin (Please connect: Just say you're from TechExams.Net!)