-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[yang_models]: Update extension yang and types yang with new yang ext… (
#6861) * [yang_models]: Update extension yang and types yang with new yang extensions and types respectively. * [YANG] Added CVL specific type and moved sonic-types to j2 template.
- Loading branch information
1 parent
368b038
commit 5f235a9
Showing
12 changed files
with
101 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/sonic-yang-models/yang-templates/sonic-extension.yang.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module sonic-extension { | ||
|
||
yang-version 1.1; | ||
|
||
namespace "http://github.com/Azure/sonic-extension"; | ||
prefix sonic-extension; | ||
|
||
description "Extension yang Module for SONiC OS"; | ||
|
||
revision 2019-07-01 { | ||
description "First Revision"; | ||
} | ||
|
||
/* For complete guide of using these extensions in SONiC yangs, refer | ||
SONiC yang guidelines at | ||
https://github.com/Azure/SONiC/blob/master/doc/mgmt/SONiC_YANG_Model_Guidelines.md */ | ||
|
||
extension db-name { | ||
description "DB name, e.g. APPL_DB, CONFIG_DB"; | ||
argument "value"; | ||
} | ||
|
||
{% if yang_model_type == "cvl" %} | ||
extension custom-validation-cvl { | ||
description "Extension for registering cvl based custom validation handler."; | ||
argument "handler"; | ||
} | ||
|
||
extension dependent-on { | ||
description | ||
"Extension to define dependency on other table. During CREATE/UPDATE, | ||
the action will be performed first on the Parent table and then on the | ||
Dependent table. In DELETE operation, the Dependent table will be | ||
deleted first and then the Parent table. This extension can be defined | ||
only under List nodes. Table name should always be suffixed with '_LIST' | ||
as modeled in yang. e.g. - dependent-on STP_LIST"; | ||
argument "value"; | ||
} | ||
{% else %} | ||
{% endif %} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters