-
Notifications
You must be signed in to change notification settings - Fork 16
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 xml and jinja template for mgmt vrf #202
Conversation
src/CLI/actioner/sonic-cli-vrf.py
Outdated
import collections | ||
import re | ||
import ast | ||
import openconfig_acl_client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openconfig_acl_client - is this import required?
|
||
def run(func, args): | ||
|
||
c = openconfig_network_instance_client.Configuration() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont we need import for openconfig_network_instance_client?
{{'VRF-NAME'.ljust(20)}}{{'INTERFACES'}} | ||
{% if json_output and 'openconfig-network-instance' in json_output -%} | ||
{% set inst_info = json_output['openconfig-network-instance'] %} | ||
{% set state = inst_info['state'] %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which command format are we following here?
OS10:
Mgmt VRF:
S6K-12(config)# ip vrf management
S6K-12(conf-vrf)# interface management
S6K-12(conf-vrf)#
Data VRF:
S6K-12(config)# ip vrf blue
S6K-12(conf-vrf)#
S6K-12(config)# interface vlan 10
S6K-12(conf-if-vl-10)# ip vrf forwarding blue
S6K-12(conf-if-vl-10)#
CISCO:
ct-ms-cisco-01(config)# vrf context management
ct-ms-cisco-01(config-vrf)#
ct-ms-cisco-01(config)# int mgmt 0
ct-ms-cisco-01(config-if)# vrf member management
ct-ms-cisco-01(config-if)#
ct-ms-cisco-01# show vrf
VRF-Name VRF-ID State Reason
default 1 Up --
management 2 Up --
ct-ms-cisco-01#
Arista:
ct-ms-arista(config)#vrf definition MGMT
ct-ms-arista(config)#int management 1
ct-ms-arista(config-if-Ma1)#vrf forwarding MGMT
ct-ms-arista(config-if-Ma1)#
ct-ms-arista#show vrf
Vrf RD Protocols State Interfaces
MGMT incomplete
blue 2:2 ipv4 no routing Ethernet47
management incomplete
red 1:1 ipv4 no routing Ethernet46
test incomplete
ct-ms-arista#
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine.
…are-to-dell_sonic_4.x_share sync from broadcom_sonic_4.x_share to dell_sonic_4.x_share - 1013
Add 3 files for management vrf configuration from CLI.
src/CLI/actioner/sonic-cli-mgmt-vrf.py
src/CLI/clitree/cli-xml/mgmt_vrf.xml
src/CLI/renderer/templates/show_mgmt_vrf.j2
The management HLD pull request is at
https://github.com/project-arlo/SONiC/pull/28/files
output of the CLI on the switch
..................................................................
onic(config)#
end Exit to the exec Mode
exit Exit from current mode
interface Select an interface
ip Global IP configuration subcommands
no To delete / disable commands in config mode
vrf vrf instance configuration
sonic(config)# vrf
management management vrf configuration
sonic(config)# do show
interface Show Interface info
ip show IP commands
lldp Show lldp information
platform Show platform information
system Show system information
vrf Show vrf information
sonic(config)# do show vrf
management Show management vrf information
sonic(config)# do show vrf