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

Self-contained lab topologies #1817

Open
jbemmel opened this issue Jan 15, 2025 · 1 comment
Open

Self-contained lab topologies #1817

jbemmel opened this issue Jan 15, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jbemmel
Copy link
Collaborator

jbemmel commented Jan 15, 2025

It would be useful to have lab topologies that are fully self-contained in a single YAML file. Instead of forking off to a template with a couple of lines of config script, these snippets could be embedded within the single lab file

The above could become:

validate:
  r2_eth1_down:
    description: Remove R2 from the VRRP LAN
    nodes: [ r2 ]
    config:
      template:
        variable.ifstate: 'down'
        eos: |
          interface {{ interfaces[0].ifname }}
          {{ 'no ' if ifstate|default('down') == 'up' else '' }}shutdown
        frr: |
         #!/bin/bash
         ip link set {{ interfaces[0].ifname }} {{ ifstate|default('down') }}
    pass: R2 has been disconnected from the VRRP LAN
    stop_on_error: True
@ipspace
Copy link
Owner

ipspace commented Jan 16, 2025

Good idea. Will try to figure out how to make it work both in validation and in generic custom configuration without too much hassle.

@ipspace ipspace self-assigned this Jan 16, 2025
@ipspace ipspace added the enhancement New feature or request label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants