Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d9efbf2
[yang_models]: Update extension yang and types yang with new yang ext…
maheshwari-mayank Feb 23, 2021
43c8510
[yang_models]:Update revision-date in import statement
maheshwari-mayank Feb 24, 2021
76e9a18
[yang-model]: Removed operations container from types yang.
maheshwari-mayank Feb 25, 2021
5cdfcdf
[yang_models]:Removed revision-date from import statement of sonic-ty…
maheshwari-mayank Feb 26, 2021
90fe5de
{yang_models]: Updated SONiC YANG extensions as per guidelines.
maheshwari-mayank Mar 2, 2021
9f814e3
[yang_models]: Updated extensions and types yang models as per review…
maheshwari-mayank Mar 17, 2021
bda2a63
Merge branch 'master' into extension-yang
maheshwari-mayank Apr 7, 2021
7fc7614
[yang_models] Removed extensions key-delim, key-pattern and map-leaf.
maheshwari-mayank May 3, 2021
65b59d7
Merge branch 'master' into extension-yang
maheshwari-mayank May 3, 2021
be95a38
[yang_models] Resolved Conflicts
maheshwari-mayank May 4, 2021
22c53a4
[yang_models] Resolved conflicts
maheshwari-mayank May 4, 2021
70c1e40
[yang_models] Updated sonic extensions yang.
maheshwari-mayank May 28, 2021
66f303e
Merge branch 'master' into extension-yang
maheshwari-mayank May 28, 2021
19f5a43
Merge branch 'master' into extension-yang
maheshwari-mayank Oct 29, 2021
23817df
Reverting changes in sonic-acl.yang to merge properly.
maheshwari-mayank Nov 12, 2021
48e0b9c
Merge branch 'master' of https://github.com/Azure/sonic-buildimage in…
maheshwari-mayank Nov 12, 2021
d5215c1
Merge branch 'Azure-master' into extension-yang
maheshwari-mayank Nov 12, 2021
fc438bd
Removed CVL specific yang extensions.
maheshwari-mayank Nov 12, 2021
c04d17b
Added CVL specific extensions to jinja template and moved extension y…
maheshwari-mayank Nov 17, 2021
3c310ab
[YANG] Added CVL specific type and moved sonic-types to j2 template.
maheshwari-mayank Nov 19, 2021
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
4 changes: 2 additions & 2 deletions src/sonic-yang-models/yang-models/sonic-acl.yang
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ module sonic-acl {

import sonic-types {
prefix stypes;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

import sonic-extension {
prefix ext;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

import sonic-port {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module sonic-breakout_cfg {

import sonic-extension {
prefix ext;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

description "BREAKOUT_CFG YANG Module for SONiC OS";
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-yang-models/yang-models/sonic-crm.yang
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module sonic-crm {

import sonic-types {
prefix stypes;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

description "CRM YANG Module for SONiC OS";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module sonic-device_metadata {

import sonic-types {
prefix stypes;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

description "DEVICE_METADATA YANG Module for SONiC OS";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module sonic-device_neighbor {

import sonic-extension {
prefix ext;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

import sonic-port {
Expand Down
45 changes: 45 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-extension.yang
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ module sonic-extension {

description "Extension yang Module for SONiC OS";

revision 2021-02-23 {
description "Adding extensions as per Sonic Yang Guidelines";
}

revision 2019-07-01 {
description "First Revision";
}
Expand All @@ -20,4 +24,45 @@ module sonic-extension {
description "Key regex used to convert config DB keys to YANG Config";
argument "value";
}

extension db-name {
description "DB name, e.g. APPL_DB, CONFIG_DB";
argument "value";
}

extension key-delim {
description "Key delimeter, e.g. - |, :";
argument "value";
}

extension key-pattern {
description "Key pattern, e.g. - ACL_RULE|{aclname}|{rulename}";
argument "value";
}

extension map-list {
description "If it is a map list";
argument "value";
}

extension map-leaf {
description "Map leaf names";
argument "value";
}

extension custom-validation {
description "Extension for custom validation.";
argument "handler";
}

extension dependent-on {
description
"Entension to define dependency on other table. So during create/update,
operation will be performed first on parent table and then on this table.
In delete operation, this table will be deleted first and then parent table.
This extension can be defined only under list. Table name should always
suffixed with '_LIST' as modeled in yang.
e.g. - dependent-on STP_LIST";
argument "value";
}
}
4 changes: 2 additions & 2 deletions src/sonic-yang-models/yang-models/sonic-interface.yang
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ module sonic-interface {

import sonic-types {
prefix stypes;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

import sonic-extension {
prefix ext;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

import sonic-port {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ module sonic-loopback-interface {

import sonic-types {
prefix stypes;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

import sonic-extension {
prefix ext;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

description
Expand Down
4 changes: 2 additions & 2 deletions src/sonic-yang-models/yang-models/sonic-port.yang
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ module sonic-port{

import sonic-types {
prefix stypes;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

import sonic-extension {
prefix ext;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

description "PORT yang Module for SONiC OS";
Expand Down
4 changes: 2 additions & 2 deletions src/sonic-yang-models/yang-models/sonic-portchannel.yang
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ module sonic-portchannel {

import sonic-types {
prefix stypes;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

import sonic-extension {
prefix ext;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

import sonic-port {
Expand Down
42 changes: 42 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-types.yang
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ module sonic-types {
* respective YANG files.
*/

revision 2021-02-23 {
description "Added new sonic types.";
}

revision 2019-07-01 {
description "First Revision";
}
Expand Down Expand Up @@ -107,4 +111,42 @@ module sonic-types {
pattern "percentage|used|free|PERCENTAGE|USED|FREE";
}
}

typedef oper-status {
type enumeration {
enum up;
enum down;
}
}

typedef mode-enable {
type enumeration {
enum enable;
enum disable;
}
}

typedef fec-mode {
type enumeration {
enum rs;
enum fc;
enum none;
}
}

typedef relay-policy-action {
type enumeration {
enum discard;
enum append;
enum replace;
}
}

typedef percentage {
type uint8 {
range "0..100";
}
description
"Integer indicating a percentage value";
}
}
4 changes: 2 additions & 2 deletions src/sonic-yang-models/yang-models/sonic-vlan.yang
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ module sonic-vlan {

import sonic-types {
prefix stypes;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

import sonic-extension {
prefix ext;
revision-date 2019-07-01;
revision-date 2021-02-23;
}

import sonic-port {
Expand Down