Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,12 @@
"desc": "INCORRECT LOOPBACK ACTION IN INTERFACE TABLE.",
"eStrKey" : "Pattern",
"eStr": ["drop|forward"]
},
"INTERFACE_ENABLE_IPV6_LINK_LOCAL": {
"desc": "Enable the ipv6 link-local."
},
"INTERFACE_INVALID_ENABLE_IPV6_LINK_LOCAL": {
"desc": "Enable the ipv6 link-local as true.",
"eStr": "Invalid value \"true\" in \"ipv6_use_link_local_only\" element."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,12 @@
"desc": "INCORRECT LOOPBACK ACTION IN PORTCHANNEL_INTERFACE TABLE.",
"eStrKey" : "Pattern",
"eStr": ["drop|forward"]
},
"PORTCHANNEL_INTERFACE_ENABLE_IPV6_LINK_LOCAL": {
"desc": "Enable the ipv6 link-local."
},
"PORTCHANNEL_INTERFACE_INVALID_ENABLE_IPV6_LINK_LOCAL": {
"desc": "Enable the ipv6 link-local as true.",
"eStr": "Invalid value \"true\" in \"ipv6_use_link_local_only\" element."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,12 @@
"desc": "INCORRECT LOOPBACK ACTION IN VLAN_INTERFACE TABLE.",
"eStrKey" : "Pattern",
"eStr": ["drop|forward"]
},
"VLAN_INTERFACE_ENABLE_IPV6_LINK_LOCAL": {
"desc": "Enable the ipv6 link-local."
},
"VLAN_INTERFACE_INVALID_ENABLE_IPV6_LINK_LOCAL": {
"desc": "Enable the ipv6 link-local as true.",
"eStr": "Invalid value \"true\" in \"ipv6_use_link_local_only\" element."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,61 @@
]
}
}
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please try to cover one negative scenario (e.g. "ipv6_use_link_local_only": "true") where yang validation should fail

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

"INTERFACE_ENABLE_IPV6_LINK_LOCAL": {
"sonic-interface:sonic-interface": {
"sonic-interface:INTERFACE": {
"INTERFACE_LIST": [
{
"name": "Ethernet8",
"ipv6_use_link_local_only": "enable"
}
]
}
},
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth8",
"description": "Ethernet8",
"fec": "rs",
"lanes": "65",
"mtu": 9000,
"name": "Ethernet8",
"speed": 25000
}
]
}
}
},
"INTERFACE_INVALID_ENABLE_IPV6_LINK_LOCAL": {
"sonic-interface:sonic-interface": {
"sonic-interface:INTERFACE": {
"INTERFACE_LIST": [
{
"name": "Ethernet8",
"ipv6_use_link_local_only": "true"
}
]
}
},
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth8",
"description": "Ethernet8",
"fec": "rs",
"lanes": "65",
"mtu": 9000,
"name": "Ethernet8",
"speed": 25000
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -428,5 +428,79 @@
]
}
}
},
"PORTCHANNEL_INTERFACE_ENABLE_IPV6_LINK_LOCAL": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"lanes": "65",
"mtu": 9000,
"name": "Ethernet0",
"speed": 25000
}
]
}
},
"sonic-portchannel:sonic-portchannel": {
"sonic-portchannel:PORTCHANNEL": {
"PORTCHANNEL_LIST": [
{
"admin_status": "up",
"min_links": "1",
"mtu": "9100",
"name": "PortChannel0001"
}
]
},
"sonic-portchannel:PORTCHANNEL_INTERFACE": {
"PORTCHANNEL_INTERFACE_LIST": [
{
"name": "PortChannel0001",
"ipv6_use_link_local_only": "enable"
}
]
}
}
},
"PORTCHANNEL_INTERFACE_INVALID_ENABLE_IPV6_LINK_LOCAL": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"lanes": "65",
"mtu": 9000,
"name": "Ethernet0",
"speed": 25000
}
]
}
},
"sonic-portchannel:sonic-portchannel": {
"sonic-portchannel:PORTCHANNEL": {
"PORTCHANNEL_LIST": [
{
"admin_status": "up",
"min_links": "1",
"mtu": "9100",
"name": "PortChannel0001"
}
]
},
"sonic-portchannel:PORTCHANNEL_INTERFACE": {
"PORTCHANNEL_INTERFACE_LIST": [
{
"name": "PortChannel0001",
"ipv6_use_link_local_only": "true"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -626,5 +626,93 @@
]
}
}
},
"VLAN_INTERFACE_ENABLE_IPV6_LINK_LOCAL": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"mtu": 9000,
"lanes": "1",
"name": "Ethernet0",
"speed": 25000
}
]
}
},
"sonic-vlan:sonic-vlan": {
"sonic-vlan:VLAN": {
"VLAN_LIST": [
{
"description": "vlan_nat",
"name": "Vlan100"
}
]
},
"sonic-vlan:VLAN_MEMBER": {
"VLAN_MEMBER_LIST": [
{
"port": "Ethernet0",
"tagging_mode": "tagged",
"name": "Vlan100"
}
]
},
"sonic-vlan:VLAN_INTERFACE": {
"VLAN_INTERFACE_LIST": [
{
"name": "Vlan100",
"ipv6_use_link_local_only": "enable"
}
]
}
}
},
"VLAN_INTERFACE_INVALID_ENABLE_IPV6_LINK_LOCAL": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth0",
"description": "Ethernet0",
"mtu": 9000,
"lanes": "1",
"name": "Ethernet0",
"speed": 25000
}
]
}
},
"sonic-vlan:sonic-vlan": {
"sonic-vlan:VLAN": {
"VLAN_LIST": [
{
"description": "vlan_nat",
"name": "Vlan100"
}
]
},
"sonic-vlan:VLAN_MEMBER": {
"VLAN_MEMBER_LIST": [
{
"port": "Ethernet0",
"tagging_mode": "tagged",
"name": "Vlan100"
}
]
},
"sonic-vlan:VLAN_INTERFACE": {
"VLAN_INTERFACE_LIST": [
{
"name": "Vlan100",
"ipv6_use_link_local_only": "true"
}
]
}
}
}
}
6 changes: 6 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-interface.yang
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ module sonic-interface {
}
}

leaf ipv6_use_link_local_only {
description "Enable/Disable IPv6 link local address on interface";
type stypes:mode-status;
default disable;
}

leaf loopback_action {
description "Packet action when a packet ingress and gets routed on the same IP interface";
type stypes:loopback_action;
Expand Down
7 changes: 7 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-portchannel.yang
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ module sonic-portchannel {
enum disable;
}
}

leaf ipv6_use_link_local_only {
description "Enable/Disable IPv6 link local address on portchannel interface";
type stypes:mode-status;
default disable;
}

} /* end of list PORTCHANNEL_INTERFACE_LIST */

list PORTCHANNEL_INTERFACE_IPPREFIX_LIST {
Expand Down
7 changes: 7 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-vlan.yang
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ module sonic-vlan {
}
}

leaf ipv6_use_link_local_only {
description "Enable/Disable IPv6 link local address on vlan interface";
type stypes:mode-status;
default disable;
}


leaf loopback_action {
description "Packet action when a packet ingress and gets routed on the same IP interface";
type stypes:loopback_action;
Expand Down