GNS3 / gns3-gui

GNS3 Graphical Network Simulator
http://www.gns3.com
GNU General Public License v3.0
2.17k stars 436 forks source link

Custom script / command for nodes #3113

Open g1augusto opened 3 years ago

g1augusto commented 3 years ago

Hi Everyone,

This is more of a usability feature but I guess not too hard to implement:

I would like to have an option to run a custom link along with the normal console for a node, one use case can be to open a web GUI for a node that has a webserver or in the end any type of link.

Another nice feature would be to run scripts on the guest operating system but this would be maybe a little too much and carry the burden of portability.

Thanks all

ghost commented 3 years ago

I'm not 100% sure I understand you correctly: You want to have a way to open a node specific website/link in your local web browser. Is that correct?

Currently there is only a tedious way to do that. You can create "custom console" commands, that can start any program on your GUI system with the parameters you want. That doesn't need to be a application creating a console, It can start a web browser, for example, or anything else, including scripts.

I wrote a blog article about integration of program/scripts into GNS3, maybe that will give you some ideas: https://www.b-ehlers.de/blog/posts/2018-01-12-gns3-integrate-programs/.

In that article I presented a tools system, that would be quite flexible, I proposed that in issue https://github.com/GNS3/gns3-gui/issues/708#issuecomment-529929063.

g1augusto commented 3 years ago

I'm not 100% sure I understand you correctly: You want to have a way to open a node specific website/link in your local web browser. Is that correct?

Currently there is only a tedious way to do that. You can create "custom console" commands, that can start any program on your GUI system with the parameters you want. That doesn't need to be a application creating a console, It can start a web browser, for example, or anything else, including scripts.

I wrote a blog article about integration of program/scripts into GNS3, maybe that will give you some ideas: https://www.b-ehlers.de/blog/posts/2018-01-12-gns3-integrate-programs/.

In that article I presented a tools system, that would be quite flexible, I proposed that in issue #708 (comment).

Yes, your solution is interesting and you understood correctly my request, thanks.

possibly a simple GUI extension would be enough, honestly I thought about this for two main reasons:

1) opening Web interfaces on nodes without bookmarking each lab (and without killing the console option by overwriting it) 2) execute actions by just a double click (I would see this option too along with right click + option)

2 would lead to an idea of playbooks in GNS3 but possibly is something that can be done already via other methods even if I think it would make GNS3 only better