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

Adding Support for ArcOS #1

Merged
merged 5 commits into from
Jan 7, 2021
Merged

Adding Support for ArcOS #1

merged 5 commits into from
Jan 7, 2021

Conversation

dt-arrcus
Copy link
Contributor

Few Notes:

I have followed all the steps on your https://netsim-tools.readthedocs.io/en/latest/platforms.html#contributing-new-devices page. Thanks for making it straight forward to add a new device type. This PR passes the tests you laid out in that document.

A customer wishing to use ArcOS nodes in these topologies will need to reach out to their Arrcus Rep for access to both the Vagrant Box file and Ansible collection for ArcOS. I added a note to that in the install.md file

Since ArcOS doesn't support a gather_facts module, I wrote a quick playbook so the collect configs would still be supported. Not sure where you wanted to store that so I added a new directory called vendor_specific_tasks. Now that I type that its sort of a terrible name, so if you need that renamed let me know.

@ipspace
Copy link
Owner

ipspace commented Jan 5, 2021

Thanks a million. As I don't have access to Arrcos images (and no time to play with them ;) please try to implement these ideas:

In "ansible/config/arcos.yml"

  • The config modules usually accept Jinja2 templates. If arrcus.arcos.arcos_config works the same way you could skip the first step
  • Looks like Arrcos config file is a text file. If that's the case, please use txt not xml extension (if you need an extra temporary file - see above)

**in "vendor_specific_tasks/arcos/collect_config.yml" **

Is that really the simplest way to collect information from Arrcos device? Creating a file and then reading a file and then... seems way too convoluted.

After you have a streamlined version of both tasks I'll merge the pull request and rearrange the configuration gathering to be more modular (there might be other platforms that don't return configuration data in fact gathering).

@dt-arrcus
Copy link
Contributor Author

Thanks for the feedback.

Today, sadly, we don't accept a template as an input source, so the template rendering is a two-step process. Hopefully, that will change in the future, and once it does, I will update this repo as well.

Agreed on the file extension. That was a leftover relic from when I was pushing XML config, but I am using CLI spec here, as you correctly pointed out. Also, I can streamline the config gathering right from bash. I will work on those and add them to this PR.

@ipspace
Copy link
Owner

ipspace commented Jan 5, 2021 via email

@dt-arrcus
Copy link
Contributor Author

Made the following changes:

  • in arcos_config module, added a delete_src_file attribute, so there is no longer a need for a 2nd step of deleting the temp file. Note once that module supports templates directly I will clean up more.
  • Added the ability to get the running-config from ArcOS device in a single task.

@ipspace ipspace merged commit bdc44b6 into ipspace:master Jan 7, 2021
ipspace added a commit that referenced this pull request Dec 28, 2021
* Rename 'nodes' to 'link_nodes' in 'augment_p2p_link' to avoid naming confusion
* Cleanup 'get_link_type' and 'check_link_type' (they no longer need access to nodes dictionary)
* Remove 'nodes_map' in main, nodes, and links
* Replace 'adjust_node_list' with 'create_node_dict'
ipspace added a commit that referenced this pull request Aug 23, 2022
ipspace added a commit that referenced this pull request Aug 23, 2022
ipspace added a commit that referenced this pull request Nov 17, 2023
ipspace added a commit that referenced this pull request Feb 11, 2024
ipspace added a commit that referenced this pull request Feb 11, 2024
ipspace added a commit that referenced this pull request Feb 11, 2024
ipspace added a commit that referenced this pull request Feb 11, 2024
ipspace added a commit that referenced this pull request Feb 11, 2024
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

Successfully merging this pull request may close these issues.

2 participants