-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
22 changed files
with
351 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
test: test1 test2 test3 test4 | ||
|
||
test1: | ||
$(PYANG) -Werror x-base.yang | ||
|
||
test2: | ||
$(PYANG) -Werror y-base.yang | ||
|
||
test3: | ||
$(PYANG) -Werror z-base.yang | ||
|
||
test4: | ||
$(PYANG) -Werror --print-error-code y1-base.yang 2>&1 \ | ||
| grep XPATH_NODE_NOT_FOUND2 >/dev/null || exit 1 |
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,7 @@ | ||
module x-base { | ||
yang-version 1.1; | ||
namespace "http://example.com/x-base"; | ||
prefix x-b; | ||
include x-base2; | ||
include x-profiles; | ||
} |
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,10 @@ | ||
submodule x-base2 { | ||
yang-version 1.1; | ||
belongs-to x-base { | ||
prefix x-b; | ||
} | ||
container configs { | ||
container profiles { | ||
} | ||
} | ||
} |
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,14 @@ | ||
submodule x-profiles { | ||
yang-version 1.1; | ||
belongs-to x-base { | ||
prefix x-b; | ||
} | ||
augment "/x-b:configs/x-b:profiles" { | ||
list profile { | ||
key name; | ||
leaf name { | ||
type string; | ||
} | ||
} | ||
} | ||
} |
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,7 @@ | ||
module y-base { | ||
yang-version 1.1; | ||
namespace "http://example.com/y-base"; | ||
prefix y-b; | ||
include y-base2; | ||
include y-profiles; | ||
} |
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,10 @@ | ||
submodule y-base2 { | ||
yang-version 1.1; | ||
belongs-to y-base { | ||
prefix y-b; | ||
} | ||
container configs { | ||
container profiles { | ||
} | ||
} | ||
} |
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 @@ | ||
submodule y-profiles { | ||
yang-version 1.1; | ||
belongs-to y-base { | ||
prefix y-b; | ||
} | ||
|
||
container y { | ||
must "/y-b:configs/y-b:profiles"; | ||
list profile { | ||
key name; | ||
leaf name { | ||
type string; | ||
} | ||
} | ||
} | ||
} |
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,6 @@ | ||
module y1-base { | ||
namespace "http://example.com/y1-base"; | ||
prefix y-b; | ||
include y1-base2; | ||
include y1-profiles; | ||
} |
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,9 @@ | ||
submodule y1-base2 { | ||
belongs-to y1-base { | ||
prefix y-b; | ||
} | ||
container configs { | ||
container profiles { | ||
} | ||
} | ||
} |
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,15 @@ | ||
submodule y1-profiles { | ||
belongs-to y1-base { | ||
prefix y-b; | ||
} | ||
|
||
container y { | ||
must "/y-b:configs/y-b:profiles"; | ||
list profile { | ||
key name; | ||
leaf name { | ||
type string; | ||
} | ||
} | ||
} | ||
} |
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,7 @@ | ||
module z-base { | ||
yang-version 1.1; | ||
namespace "http://example.com/z-base"; | ||
prefix z-b; | ||
include z-base2; | ||
include z-profiles; | ||
} |
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,13 @@ | ||
submodule z-base2 { | ||
yang-version 1.1; | ||
belongs-to z-base { | ||
prefix z-b; | ||
} | ||
container configs { | ||
container profiles { | ||
leaf foo { | ||
type string; | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
submodule z-profiles { | ||
yang-version 1.1; | ||
belongs-to z-base { | ||
prefix z-b; | ||
} | ||
augment "/z-b:configs/z-b:profiles" { | ||
list profile { | ||
key name; | ||
leaf name { | ||
type leafref { | ||
path "../../foo"; | ||
} | ||
} | ||
} | ||
} | ||
} |
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,14 @@ | ||
test: test1 test2 test3 test4 | ||
|
||
test1: | ||
$(PYANG) -Werror -p v1.1 v1.1/native.yang | ||
|
||
test2: | ||
$(PYANG) -Werror -p v1.1 v1.1/bgp.yang | ||
|
||
test3: | ||
$(PYANG) -Werror -p v1 v1/native.yang | ||
|
||
test4: | ||
$(PYANG) -Werror -p v1 --print-error-code v1/bgp.yang 2>&1 \ | ||
| grep LEAFREF_IDENTIFIER_NOT_FOUND >/dev/null || exit 1 |
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,27 @@ | ||
module bgp { | ||
yang-version 1.1; | ||
namespace "http://example.com/bgp"; | ||
prefix ios-bgp; | ||
|
||
import native { | ||
prefix ios; | ||
} | ||
|
||
|
||
grouping config-bgp-grouping { | ||
list bgp { | ||
key "id"; | ||
leaf id { | ||
type string; | ||
} | ||
|
||
container interface { | ||
uses ios:interface-with-dependency-grouping; | ||
} | ||
} | ||
} | ||
|
||
augment "/ios:native/ios:router" { | ||
uses config-bgp-grouping; | ||
} | ||
} |
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,42 @@ | ||
submodule native-sub { | ||
yang-version 1.1; | ||
belongs-to native { | ||
prefix ii; | ||
} | ||
|
||
grouping interface-with-dependency-grouping { | ||
choice interface-choice { | ||
leaf GigabitEthernet { | ||
description | ||
"Service-Context Virtual Interface Compress"; | ||
type leafref { | ||
path "/ii:native/ii:interface/ii:GigabitEthernet/ii:name"; | ||
} | ||
} | ||
} | ||
} | ||
|
||
grouping config-interface-grouping { | ||
container interface { | ||
description | ||
"Configure Interfaces"; | ||
list GigabitEthernet { | ||
description | ||
"Service-Context Virtual Interface Compress"; | ||
key "name"; | ||
leaf name { | ||
type uint16; | ||
} | ||
uses interface-common-grouping; | ||
} | ||
} | ||
} | ||
|
||
grouping interface-common-grouping { | ||
container switchport-conf { | ||
leaf switchport { | ||
type boolean; | ||
} | ||
} | ||
} | ||
} |
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,19 @@ | ||
module native { | ||
yang-version 1.1; | ||
namespace "http://example.com/native"; | ||
prefix ios; | ||
|
||
include native-sub; | ||
|
||
container native { | ||
container router; | ||
container ip { | ||
container routing-conf { | ||
leaf routing { | ||
type string; | ||
} | ||
} | ||
} | ||
uses config-interface-grouping; | ||
} | ||
} |
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,26 @@ | ||
module bgp { | ||
namespace "http://example.com/bgp"; | ||
prefix ios-bgp; | ||
|
||
import native { | ||
prefix ios; | ||
} | ||
|
||
|
||
grouping config-bgp-grouping { | ||
list bgp { | ||
key "id"; | ||
leaf id { | ||
type string; | ||
} | ||
|
||
container interface { | ||
uses ios:interface-with-dependency-grouping; | ||
} | ||
} | ||
} | ||
|
||
augment "/ios:native/ios:router" { | ||
uses config-bgp-grouping; | ||
} | ||
} |
Oops, something went wrong.