forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add YANG model for FABRIC_PORT (sonic-net#15629)
#### Why I did it Introduce YANG model for FABRIC in CONFIG_DB, which was added in sonic-net#14170. #### How I did it This is a clone of @jfeng-arista's PR sonic-net#14282 to resolve conflicts with upstream changes. #### How to verify it Passing pipeline build is sufficient.
- Loading branch information
1 parent
7b89066
commit 04989ec
Showing
8 changed files
with
138 additions
and
0 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 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
5 changes: 5 additions & 0 deletions
5
src/sonic-yang-models/tests/yang_model_tests/tests/fabric_port.json
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,5 @@ | ||
{ | ||
"FABRIC_PORT_POSITIVE_CONFIG": { | ||
"desc": "Configure FABRIC_PORT no failure." | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/sonic-yang-models/tests/yang_model_tests/tests_config/fabric_port.json
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,16 @@ | ||
{ | ||
"FABRIC_PORT_POSITIVE_CONFIG": { | ||
"sonic-fabric-port:sonic-fabric-port": { | ||
"sonic-fabric-port:FABRIC_PORT": { | ||
"FABRIC_PORT_LIST": [ | ||
{ | ||
"name": "Fabric0", | ||
"alias": "Fabric0", | ||
"isolateStatus": "False", | ||
"lanes": "0" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
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,61 @@ | ||
module sonic-fabric-port{ | ||
|
||
yang-version 1.1; | ||
|
||
namespace "https://github.com/sonic-net/sonic-fabric-port"; | ||
prefix fabric-port; | ||
|
||
import sonic-types { | ||
prefix stypes; | ||
} | ||
|
||
description "FABRIC_PORT yang Module for SONiC OS"; | ||
|
||
revision 2023-03-14 { | ||
description "First Revision"; | ||
} | ||
|
||
container sonic-fabric-port { | ||
|
||
container FABRIC_PORT { | ||
|
||
description "FABRIC_PORT part of config_db.json"; | ||
|
||
list FABRIC_PORT_LIST { | ||
|
||
key "name"; | ||
|
||
leaf name { | ||
type string { | ||
length 1..128; | ||
} | ||
} | ||
|
||
leaf isolateStatus { | ||
description "Isolation status of a fabric port"; | ||
type stypes:boolean_type; | ||
default "False"; | ||
} | ||
|
||
leaf alias { | ||
description "Alias of a fabric port"; | ||
type string { | ||
length 1..128; | ||
} | ||
} | ||
|
||
leaf lanes { | ||
description "Lanes of a fabric port"; | ||
mandatory true; | ||
type string { | ||
length 1..128; | ||
} | ||
} | ||
|
||
} /* end of list FABRIC_PORT_LIST */ | ||
|
||
} /* end of container FABRIC_PORT */ | ||
|
||
} /* end of container sonic-fabric-port */ | ||
|
||
} /* end of module sonic-fabric-port */ |