Skip to content

Commit

Permalink
[YANG MODEL] Fix breakout validation failed
Browse files Browse the repository at this point in the history
- Missing 'ipv6_use_link_local_only' key
- Remove the restriction about no default gateway in the static management IP
  • Loading branch information
cyo-chang committed Dec 12, 2022
1 parent 0dc22bd commit 700b353
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
8 changes: 8 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-interface.yang
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ module sonic-interface {
default "0";
}

leaf ipv6_use_link_local_only {
description "Enable/disable IPv6 link-local";
type enumeration {
enum enable;
enum disable;
}
}

leaf mpls {
description "Enable/disable MPLS routing for the interface";
type enumeration {
Expand Down
8 changes: 4 additions & 4 deletions src/sonic-yang-models/yang-models/sonic-mgmt_interface.yang
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ module sonic-mgmt_interface {
}

leaf ip_prefix {
must "(contains(current(), ':') and contains(../gwaddr, ':')) or (contains(current(), '.') and contains(../gwaddr, '.'))";
must "(contains(current(), ':')) or (contains(current(), '.'))";
type stypes:sonic-ip-prefix;
}

leaf gwaddr {
must "(contains(current(), ':') and contains(../ip_prefix, ':')) or (contains(current(), '.') and contains(../ip_prefix, '.'))";
must "(contains(current(), ':') and contains(../ip_prefix, ':')) or (contains(current(), '.') and contains(../ip_prefix, '.'))";
type inet:ip-address;
}

Expand All @@ -57,11 +57,11 @@ module sonic-mgmt_interface {
}

description
"This configuration allows addtional routes to be added to default VRF table
"This configuration allows addtional routes to be added to default VRF table
or mgmt VRF table, based on if Management VRF is configured.
Details can be found in interfaces.j2.";
}

} /* end of list MGMT_INTERFACE_IPADDR_LIST */

} /* end of container MGMT_INTERFACE */
Expand Down
10 changes: 9 additions & 1 deletion src/sonic-yang-models/yang-models/sonic-vlan.yang
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ module sonic-vlan {
description "Packet action when a packet ingress and gets routed on the same IP interface";
type stypes:loopback_action;
}

leaf ipv6_use_link_local_only {
description "Enable/disable IPv6 link-local";
type enumeration {
enum enable;
enum disable;
}
}
}
/* end of VLAN_INTERFACE_LIST */

Expand Down Expand Up @@ -163,7 +171,7 @@ module sonic-vlan {
list VLAN_LIST {

key "name";

leaf name {
type string {
pattern 'Vlan([0-9]{1,3}|[1-3][0-9]{3}|[4][0][0-8][0-9]|[4][0][9][0-4])';
Expand Down

0 comments on commit 700b353

Please sign in to comment.