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

Add support for multiple optional variables in directive #293

Open
33Fraise33 opened this issue Oct 18, 2024 · 0 comments
Open

Add support for multiple optional variables in directive #293

33Fraise33 opened this issue Oct 18, 2024 · 0 comments
Assignees
Labels
feature New feature or request

Comments

@33Fraise33
Copy link

Version

v2.0.4

Feature Details

I have quite some vrfs on my switches and I would like to template some more variable than the current "target" offers.

it would be nice to specify the command with variable names and to provide options that can be filled into those variable names.

Feature Type

Change to Existing Functionality

Use Case

  • show bgp summary (optional: instance <instance_options>) (optional: group <group_options>
  • show route table <instance_options>.inet<ip_version_options>

an example directive file could look like the following 2 options:

show-bgp-summary:
    name: BGP Summary
    rules:
        - command: show bgp summary{instance}{group}
    field:
      options:
        group:
          command: ' group '
          required: false
          items:
            - name: party_x
            - name: party_y
        instance:
          command: ' instance '
          required: true
          items:
            - name: vrf_blue
            - name: vrf_red

or option2:

show-bgp-summary:
    name: BGP Summary
    rules:
        - command: show bgp summary{instance_options}{group_options}
    field:
      options:
        - name: vrf_blue
          command: " instance "
          target: instance_options
        - name: vrf_red
          command: " instance "
          target: instance_options
        - name: party1
          command: " group "
          target: group_options
        - name: party2
          command: " group "
          target: group_options     
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants