Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring started nodes #106

Open
sinaebrahimi opened this issue Aug 23, 2022 · 3 comments
Open

Configuring started nodes #106

sinaebrahimi opened this issue Aug 23, 2022 · 3 comments

Comments

@sinaebrahimi
Copy link

Suppose that I have started some nodes from templates (an FRR, a VPCS, and another Cisco router, for example), and also connected their links as instructed in the guide.

I want to configure these nodes in my code and not in the GNS3 itself. For example, give one or two interfaces an IP address, and then get OSPF up and running.
Is there anyway predicted in this wrapper that we could send config commands to these nodes?

@davidban77
Copy link
Owner

Not for this wrapper I am afraid. Its focus is to provide an SDK for GNS3 objects, and that is better reflected on v1.

Now, you can take a look at Labby which is a CLI application working towards doing just that.

It uses gns3fy as dependency to create LabbyNode objects and be able to start, stop, destroy and configure them. You can see here if you want for an example of how that is done:

https://github.com/davidban77/labby/blob/develop/labby/providers/gns3/node.py#L212-L434

@sinaebrahimi
Copy link
Author

Oh! Thank you very much, David.

Do you happen to have more examples?

@davidban77
Copy link
Owner

Nothing quickly show, but for example you can create a python Node object inheriting from the gns3fy v1 Node and then use something like a netmiko-like method on it where you can send configuration commands to it for that specific node.

Keep in mind though that gns3fy object don't track IP or DNS of the nodes, so that will need injected to the netmiko function you can use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants