Skip to content

Commit

Permalink
de-internalize exampleoc (#61)
Browse files Browse the repository at this point in the history
* deinternalize exampleoc

* gen fix
  • Loading branch information
DanG100 authored Sep 7, 2022
1 parent 23dd370 commit 985e5d9
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 45 deletions.
1 change: 1 addition & 0 deletions exampleoc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This package MAY change without warning, and if possible SHOULD NOT be imported into your application.
6 changes: 3 additions & 3 deletions internal/exampleoc/enum.go → exampleoc/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ in this case).
This package was generated by ygnmi version: (devel): (ygot: v0.23.0)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
- ../../pathgen/testdata/yang/openconfig-nested.yang
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
- ../pathgen/testdata/yang/openconfig-nested.yang
Imported modules were sourced from:
*/
Expand Down
6 changes: 3 additions & 3 deletions internal/exampleoc/enum_map.go → exampleoc/enum_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ in this case).
This package was generated by ygnmi version: (devel): (ygot: v0.23.0)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
- ../../pathgen/testdata/yang/openconfig-nested.yang
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
- ../pathgen/testdata/yang/openconfig-nested.yang
Imported modules were sourced from:
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ based on a compressed form of the schema.
This package was generated by ygnmi version: (devel): (ygot: v0.23.0)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
- ../../pathgen/testdata/yang/openconfig-nested.yang
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
- ../pathgen/testdata/yang/openconfig-nested.yang
Imported modules were sourced from:
*/
package exampleocpath

import (
oc "github.com/openconfig/ygnmi/internal/exampleoc"
"github.com/openconfig/ygnmi/internal/exampleoc/nested"
"github.com/openconfig/ygnmi/internal/exampleoc/simple"
"github.com/openconfig/ygnmi/internal/exampleoc/withlistval"
oc "github.com/openconfig/ygnmi/exampleoc"
"github.com/openconfig/ygnmi/exampleoc/nested"
"github.com/openconfig/ygnmi/exampleoc/simple"
"github.com/openconfig/ygnmi/exampleoc/withlistval"
"github.com/openconfig/ygnmi/ygnmi"
"github.com/openconfig/ygot/ytypes"
)
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions internal/exampleoc/gen.sh → exampleoc/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ set -e

cd "$(dirname "$0")"

go run ../../app/ygnmi generator \
go run ../app/ygnmi generator \
--trim_module_prefix=openconfig \
--base_package_path=github.com/openconfig/ygnmi/internal/exampleoc \
../../pathgen/testdata/yang/openconfig-simple.yang \
../../pathgen/testdata/yang/openconfig-withlistval.yang \
../../pathgen/testdata/yang/openconfig-nested.yang
--base_package_path=github.com/openconfig/ygnmi/exampleoc \
../pathgen/testdata/yang/openconfig-simple.yang \
../pathgen/testdata/yang/openconfig-withlistval.yang \
../pathgen/testdata/yang/openconfig-nested.yang

go install golang.org/x/tools/cmd/goimports@latest
go install github.com/google/addlicense@latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ based on a compressed form of the schema.
This package was generated by ygnmi version: (devel): (ygot: v0.23.0)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
- ../../pathgen/testdata/yang/openconfig-nested.yang
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
- ../pathgen/testdata/yang/openconfig-nested.yang
Imported modules were sourced from:
*/
package nested

import (
oc "github.com/openconfig/ygnmi/internal/exampleoc"
oc "github.com/openconfig/ygnmi/exampleoc"
"github.com/openconfig/ygnmi/ygnmi"
"github.com/openconfig/ygot/ygot"
"github.com/openconfig/ygot/ytypes"
Expand Down
6 changes: 3 additions & 3 deletions internal/exampleoc/schema.go → exampleoc/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ in this case).
This package was generated by ygnmi version: (devel): (ygot: v0.23.0)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
- ../../pathgen/testdata/yang/openconfig-nested.yang
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
- ../pathgen/testdata/yang/openconfig-nested.yang
Imported modules were sourced from:
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ based on a compressed form of the schema.
This package was generated by ygnmi version: (devel): (ygot: v0.23.0)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
- ../../pathgen/testdata/yang/openconfig-nested.yang
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
- ../pathgen/testdata/yang/openconfig-nested.yang
Imported modules were sourced from:
*/
Expand All @@ -30,7 +30,7 @@ package simple
import (
"reflect"

oc "github.com/openconfig/ygnmi/internal/exampleoc"
oc "github.com/openconfig/ygnmi/exampleoc"
"github.com/openconfig/ygnmi/ygnmi"
"github.com/openconfig/ygot/ygot"
"github.com/openconfig/ygot/ytypes"
Expand Down
6 changes: 3 additions & 3 deletions internal/exampleoc/structs-0.go → exampleoc/structs-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ in this case).
This package was generated by ygnmi version: (devel): (ygot: v0.23.0)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
- ../../pathgen/testdata/yang/openconfig-nested.yang
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
- ../pathgen/testdata/yang/openconfig-nested.yang
Imported modules were sourced from:
*/
Expand Down
6 changes: 3 additions & 3 deletions internal/exampleoc/union.go → exampleoc/union.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ in this case).
This package was generated by ygnmi version: (devel): (ygot: v0.23.0)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
- ../../pathgen/testdata/yang/openconfig-nested.yang
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
- ../pathgen/testdata/yang/openconfig-nested.yang
Imported modules were sourced from:
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ based on a compressed form of the schema.
This package was generated by ygnmi version: (devel): (ygot: v0.23.0)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
- ../../pathgen/testdata/yang/openconfig-nested.yang
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
- ../pathgen/testdata/yang/openconfig-nested.yang
Imported modules were sourced from:
*/
package withlistval

import (
oc "github.com/openconfig/ygnmi/internal/exampleoc"
oc "github.com/openconfig/ygnmi/exampleoc"
"github.com/openconfig/ygnmi/ygnmi"
"github.com/openconfig/ygot/ygot"
"github.com/openconfig/ygot/ytypes"
Expand Down
4 changes: 2 additions & 2 deletions ygnmi/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"io"
"testing"

"github.com/openconfig/ygnmi/internal/exampleoc"
"github.com/openconfig/ygnmi/internal/exampleoc/exampleocpath"
"github.com/openconfig/ygnmi/exampleoc"
"github.com/openconfig/ygnmi/exampleoc/exampleocpath"
"github.com/openconfig/ygnmi/internal/testutil"
"github.com/openconfig/ygnmi/ygnmi"
"google.golang.org/grpc"
Expand Down
4 changes: 2 additions & 2 deletions ygnmi/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"log"
"time"

"github.com/openconfig/ygnmi/internal/exampleoc"
"github.com/openconfig/ygnmi/internal/exampleoc/exampleocpath"
"github.com/openconfig/ygnmi/exampleoc"
"github.com/openconfig/ygnmi/exampleoc/exampleocpath"
"github.com/openconfig/ygnmi/ygnmi"
"github.com/openconfig/ygot/ygot"
)
Expand Down
4 changes: 2 additions & 2 deletions ygnmi/ygnmi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/openconfig/gnmi/errdiff"
"github.com/openconfig/ygnmi/internal/exampleoc"
"github.com/openconfig/ygnmi/internal/exampleoc/exampleocpath"
"github.com/openconfig/ygnmi/exampleoc"
"github.com/openconfig/ygnmi/exampleoc/exampleocpath"
"github.com/openconfig/ygnmi/internal/testutil"
"github.com/openconfig/ygnmi/ygnmi"
"github.com/openconfig/ygot/util"
Expand Down

0 comments on commit 985e5d9

Please sign in to comment.