-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into robjs-structmerge
- Loading branch information
Showing
28 changed files
with
222 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
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
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
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,62 @@ | ||
/* | ||
Package ocstructs is a generated package which contains definitions | ||
of structs which represent a YANG schema. The generated schema can be | ||
compressed by a series of transformations (compression was false | ||
in this case). | ||
|
||
This package was generated by codegen-tests | ||
using the following YANG input files: | ||
- testdata/structs/empty.yang | ||
Imported modules were sourced from: | ||
*/ | ||
package ocstructs | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
"reflect" | ||
|
||
"github.com/openconfig/ygot/ygot" | ||
) | ||
|
||
// Binary is a type that is used for fields that have a YANG type of | ||
// binary. It is used such that binary fields can be distinguished from | ||
// leaf-lists of uint8s (which are mapped to []uint8, equivalent to | ||
// []byte in reflection). | ||
type Binary []byte | ||
|
||
// YANGEmpty is a type that is used for fields that have a YANG type of | ||
// empty. It is used such that empty fields can be distinguished from boolean fields | ||
// in the generated code. | ||
type YANGEmpty bool | ||
|
||
// Empty_Test represents the /empty/test YANG schema element. | ||
type Empty_Test struct { | ||
Config *Empty_Test_Config `path:"/test/config" module:"empty"` | ||
State *Empty_Test_State `path:"/test/state" module:"empty"` | ||
} | ||
|
||
// IsYANGGoStruct ensures that Empty_Test implements the yang.GoStruct | ||
// interface. This allows functions that need to handle this struct to | ||
// identify it as being generated by ygen. | ||
func (*Empty_Test) IsYANGGoStruct() {} | ||
|
||
// Empty_Test_Config represents the /empty/test/config YANG schema element. | ||
type Empty_Test_Config struct { | ||
E YANGEmpty `path:"e" module:"empty"` | ||
} | ||
|
||
// IsYANGGoStruct ensures that Empty_Test_Config implements the yang.GoStruct | ||
// interface. This allows functions that need to handle this struct to | ||
// identify it as being generated by ygen. | ||
func (*Empty_Test_Config) IsYANGGoStruct() {} | ||
|
||
// Empty_Test_State represents the /empty/test/state YANG schema element. | ||
type Empty_Test_State struct { | ||
E YANGEmpty `path:"e" module:"empty"` | ||
} | ||
|
||
// IsYANGGoStruct ensures that Empty_Test_State implements the yang.GoStruct | ||
// interface. This allows functions that need to handle this struct to | ||
// identify it as being generated by ygen. | ||
func (*Empty_Test_State) IsYANGGoStruct() {} |
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 empty { | ||
prefix "e"; | ||
namespace "urn:e"; | ||
|
||
grouping e-cfg { | ||
leaf e { type empty; } | ||
} | ||
|
||
container test { | ||
container config { | ||
uses e-cfg; | ||
} | ||
|
||
container state { | ||
config false; | ||
uses e-cfg; | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.