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

vrf: T4562: Rewrite show vrf name xxx delete old script op-mode #1443

Merged
merged 1 commit into from
Jul 29, 2022

Conversation

sever-sever
Copy link
Member

@sever-sever sever-sever commented Jul 29, 2022

Change Summary

Add option --name for function show to get the required VRF name
Delete old script show_vrf.py

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Component(s) name

vrf

Proposed changes

How to test

VyOS config:

vyos@r14:~$ show conf com | match vrf
set interfaces ethernet eth1 vif 2 vrf 'foo'
set interfaces ethernet eth1 vif 5 vrf 'bar'
set vrf name bar table '1020'
set vrf name foo table '1010'
vyos@r14:~$ 

Show specific VRF:

vyos@r14:~$ show vrf foo
Name    State    MAC address        Flags                     Interfaces
------  -------  -----------------  ------------------------  ------------
foo     up       aa:de:40:58:2e:dd  noarp,master,up,lower_up  eth1.2
vyos@r14:~$ 

Get raw data:

vyos@r14:~$ /usr/libexec/vyos/op_mode/vrf.py show --name bar --raw
[
    {
        "ifname": "bar",
        "operstate": "UP",
        "address": "ce:c1:4f:e8:dc:9a",
        "flags": [
            "NOARP",
            "MASTER",
            "UP",
            "LOWER_UP"
        ]
    }
]
vyos@r14:~$

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Add option "--name" for function "show" to get required VRF name
Delete old script "show_vrf.py"
@c-po c-po merged commit 0d7ad93 into vyos:current Jul 29, 2022
@sever-sever sever-sever deleted the T4562 branch August 1, 2022 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants