Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor out gnmitestutil to allow dependency on ygnmi package. #138

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exampleoc/a/a-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package a is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion exampleoc/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion exampleoc/enum_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion exampleoc/exampleocpath/exampleocpath.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package exampleocpath is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion exampleoc/modelb/modelb-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package modelb is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion exampleoc/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion exampleoc/structs-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion exampleoc/union.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../pathgen/testdata/yang/openconfig-simple.yang
- ../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ go 1.18

require (
github.com/golang/glog v1.1.0
github.com/google/go-cmp v0.5.9
github.com/google/go-cmp v0.6.0
github.com/openconfig/gnmi v0.10.0
github.com/openconfig/gocloser v0.0.0-20220310182203-c6c950ed3b0b
github.com/openconfig/goyang v1.4.1
github.com/openconfig/ygot v0.29.12
github.com/openconfig/goyang v1.4.3
github.com/openconfig/ygot v0.29.16
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.7.0
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.15.0
google.golang.org/grpc v1.58.0-dev
google.golang.org/protobuf v1.31.0
Expand Down
18 changes: 9 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -115,8 +115,8 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
Expand Down Expand Up @@ -167,13 +167,13 @@ github.com/openconfig/gnmi v0.10.0/go.mod h1:Y9os75GmSkhHw2wX8sMsxfI7qRGAEcDh8NT
github.com/openconfig/gocloser v0.0.0-20220310182203-c6c950ed3b0b h1:NSYuxdlOWLldNpid1dThR6Dci96juXioUguMho6aliI=
github.com/openconfig/gocloser v0.0.0-20220310182203-c6c950ed3b0b/go.mod h1:uhC/ybmPapgeyAL2b9ZrUQ+DZE+DB+J+/7377PX+lek=
github.com/openconfig/goyang v0.0.0-20200115183954-d0a48929f0ea/go.mod h1:dhXaV0JgHJzdrHi2l+w0fZrwArtXL7jEFoiqLEdmkvU=
github.com/openconfig/goyang v1.4.1 h1:OmkovLj01iOskzviwnoXkWWY0fwfhPVGTAKKCMSbgeE=
github.com/openconfig/goyang v1.4.1/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8=
github.com/openconfig/goyang v1.4.3 h1:9sr+l1vRbON0cMZxmogMhI8JiNqIf1uJoN8o4OdNqxI=
github.com/openconfig/goyang v1.4.3/go.mod h1:vX61x01Q46AzbZUzG617vWqh/cB+aisc+RrNkXRd3W8=
github.com/openconfig/grpctunnel v0.0.0-20220819142823-6f5422b8ca70 h1:t6SvvdfWCMlw0XPlsdxO8EgO+q/fXnTevDjdYREKFwU=
github.com/openconfig/grpctunnel v0.0.0-20220819142823-6f5422b8ca70/go.mod h1:OmTWe7RyZj2CIzIgy4ovEBzCLBJzRvWSZmn7u02U9gU=
github.com/openconfig/ygot v0.6.0/go.mod h1:o30svNf7O0xK+R35tlx95odkDmZWS9JyWWQSmIhqwAs=
github.com/openconfig/ygot v0.29.12 h1:LjjeaRGdGEOWhldSm0fr8YarPlTgy2fCAaCvY+3pO3Y=
github.com/openconfig/ygot v0.29.12/go.mod h1:RNnn1ytQ8GZV5LPts36l0cyoRjsYYpruiruJEvmU2sg=
github.com/openconfig/ygot v0.29.16 h1:nqSHTEHm2TtsoXVYM6BrgBilnxxFcOYF5Q19w7e6CmA=
github.com/openconfig/ygot v0.29.16/go.mod h1:GDi97RDhYa2MGyYQXSk/RbSV3OgtuOCXBPfeOKD5pQQ=
github.com/pborman/getopt v0.0.0-20190409184431-ee0cd42419d3/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o=
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
Expand All @@ -192,8 +192,8 @@ github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM=
github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ=
github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA=
github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48=
github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocconfig/a/a-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package a is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocconfig/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocconfig/enum_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package exampleocconfigpath is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocconfig/modelb/modelb-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package modelb is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocconfig/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocconfig/structs-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocconfig/union.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocunordered/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocunordered/enum_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package exampleocunorderedpath is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocunordered/nested/nested-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package nested is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocunordered/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocunordered/simple/simple-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package simple is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocunordered/structs-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocunordered/union.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ of structs which represent a YANG schema. The generated schema can be
compressed by a series of transformations (compression was true
in this case).

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/exampleocunordered/withlistval/withlistval-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package withlistval is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
4 changes: 2 additions & 2 deletions internal/testutil/gnmi.go → internal/gnmitestutil/gnmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package testutil implements a fake GNMI server with the ability to stub responses and fake schema.
package testutil
// Package gnmitestutil implements a fake GNMI server with the ability to stub responses and fake schema.
package gnmitestutil

import (
"context"
Expand Down Expand Up @@ -94,7 +94,7 @@
}

// Get is a fake implementation of gnmi.Get, it returns the GetResponse contained in the stub.
func (g *clientWithGetter) Get(ctx context.Context, req *gpb.GetRequest, _ ...grpc.CallOption) (*gpb.GetResponse, error) {

Check failure on line 97 in internal/gnmitestutil/gnmi.go

View workflow job for this annotation

GitHub Actions / go / Static Analysis

parameter 'ctx' seems to be unused, consider removing or renaming it as _
g.getRequests = append([]*gpb.GetRequest{req}, g.getRequests...)
if len(g.stub.getResponses) == 0 {
return nil, io.EOF
Expand Down Expand Up @@ -136,7 +136,7 @@
return s
}

type SetClient struct {

Check failure on line 139 in internal/gnmitestutil/gnmi.go

View workflow job for this annotation

GitHub Actions / go / Static Analysis

exported type SetClient should have comment or be unexported
gpb.GNMIClient
// Responses are the gNMI Responses to return from calls to Set.
Responses []*gpb.SetResponse
Expand All @@ -148,20 +148,20 @@
i int
}

func (f *SetClient) Reset() {

Check failure on line 151 in internal/gnmitestutil/gnmi.go

View workflow job for this annotation

GitHub Actions / go / Static Analysis

exported method SetClient.Reset should have comment or be unexported
f.Requests = nil
f.Responses = nil
f.ResponseErrs = nil
f.i = 0
}

func (f *SetClient) AddResponse(resp *gpb.SetResponse, err error) *SetClient {

Check failure on line 158 in internal/gnmitestutil/gnmi.go

View workflow job for this annotation

GitHub Actions / go / Static Analysis

exported method SetClient.AddResponse should have comment or be unexported
f.Responses = append(f.Responses, resp)
f.ResponseErrs = append(f.ResponseErrs, err)
return f
}

func (f *SetClient) Set(_ context.Context, req *gpb.SetRequest, opts ...grpc.CallOption) (*gpb.SetResponse, error) {

Check failure on line 164 in internal/gnmitestutil/gnmi.go

View workflow job for this annotation

GitHub Actions / go / Static Analysis

parameter 'opts' seems to be unused, consider removing or renaming it as _

Check failure on line 164 in internal/gnmitestutil/gnmi.go

View workflow job for this annotation

GitHub Actions / go / Static Analysis

exported method SetClient.Set should have comment or be unexported
defer func() { f.i++ }()
f.Requests = append(f.Requests, req)
return f.Responses[f.i], f.ResponseErrs[f.i]
Expand Down
2 changes: 1 addition & 1 deletion internal/uexampleoc/a/a-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package a is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/uexampleoc/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ 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 ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/uexampleoc/enum_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ 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 ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/uexampleoc/modelb/modelb-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package modelb is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/uexampleoc/nested/nested-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package nested is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/uexampleoc/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ 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 ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
2 changes: 1 addition & 1 deletion internal/uexampleoc/simple/simple-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Package simple is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema.

This package was generated by ygnmi version: (devel): (ygot: v0.29.12)
This package was generated by ygnmi version: (devel): (ygot: v0.29.16)
using the following YANG input files:
- ../../pathgen/testdata/yang/openconfig-simple.yang
- ../../pathgen/testdata/yang/openconfig-withlistval.yang
Expand Down
Loading
Loading