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

Feat(avd_to_containerlab): Add role to generate containerlab topology #1104

Closed
wants to merge 7 commits into from
Closed

Feat(avd_to_containerlab): Add role to generate containerlab topology #1104

wants to merge 7 commits into from

Conversation

titom73
Copy link
Contributor

@titom73 titom73 commented Jul 20, 2021

Change Summary

Initial support of containerlab to build l3ls-evpn topology from
EOS-DESIGNS.

Require: avd in version 3.x & PR #1000

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Documentation content changes
  • Other (please describe):

Component(s) name

arista.avd.eos_designs_to_containerlab

How to test

---
- name: Build containerlab topology
  hosts: DC1_FABRIC
  connection: local
  gather_facts: false
  tasks:
    - name: 'Build a containerlab topolgy'
      import_role:
        name: arista.avd.eos_designs_to_containerlab
      vars:
        mgmt_network_v4: 10.73.0.0/16
        ceos_version: arista/ceos:4.25.2F

Checklist:

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have updated molecule CI testing accordingly
  • All new and existing tests passed (pre-commit, make linting and make sanity-lint).

Initial support of containerlab to build l3ls-evpn topology from
EOS-DESIGNS.

Require: avd in version 3.x & PR#1000
@github-actions github-actions bot added the type: code quality CI and development toolset label Jul 21, 2021
@titom73 titom73 added the role: eos_designs_to_containerlab Role to manage containerlab builder role label Jul 21, 2021
@titom73 titom73 marked this pull request as ready for review July 22, 2021 14:59
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the state: conflict PR with conflict label Jul 23, 2021
@github-actions
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the state: conflict PR with conflict label Jul 26, 2021
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the state: conflict PR with conflict label Jul 27, 2021
@github-actions github-actions bot removed the state: conflict PR with conflict label Jul 29, 2021
@github-actions
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

topology:
nodes:
{% for node_type in node_types | arista.avd.natural_sort %}
{# --------------------- NODE GROUPS LIST --------------------- #}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach will only work if the target for the play knows about all nodes. Since this role should run after
eos_designs, I would prefer if we could read some of the generated data, instead of having to maintain the datamodel here as well.
I believe most of it should be in the structured_config including peer-switch information.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering this role will be only for CI, local testing, it would be part of a specific playbook meaning the previous playbook will have to save debug files to make facts available in another play or playbook.

So user experience would be more complex than reading eos_designs inputs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant reading structured_configuration instead. So we can change eos_designs freely without affecting this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using structured_config files will create constraint when eos_cli_config_gen is similar to the current relationship with eos_designs and will also make rendering more complex:

  • Run task for one host.
  • Load structured_config for all hosts with a per-host approach to saving data.
  • Read structured_config to generate file.

Where the current implementation just reads existing inventory variables.

Note: this PR is only for the eos_designs approach

@titom73 titom73 marked this pull request as draft August 12, 2021 13:54
@titom73 titom73 closed this Sep 14, 2021
@titom73 titom73 deleted the features/containerlab branch October 1, 2021 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: eos_designs_to_containerlab Role to manage containerlab builder role state: Documentation role Updated type: code quality CI and development toolset
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants