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

Adding Drivenets in vendor list and config APIs #123

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 2 additions & 3 deletions binding/grpcutil/testservice/gen/testservice.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion binding/grpcutil/testservice/gen/testservice_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions config/vendor.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ func (c *VendorConfig) WithJuniperText(text string) *VendorConfig {
return c
}

// WithDrivenetsText sets the config to be pushed if the DUT vendor is Drivenets.
func (c *VendorConfig) WithDrivenetsText(text string) *VendorConfig {
c.perVendor[opb.Device_DRIVENETS] = configText(text)
return c
}

// WithFile sets the config to be pushed regardless of the DUT vendor.
// This should only be used when the DUT vendor was already taken into account
// in the generation of the config and only when no per-vendor configs are set.
Expand Down Expand Up @@ -175,6 +181,12 @@ func (c *VendorConfig) WithJuniperFile(path string) *VendorConfig {
return c
}

// WithDrivenetsFile sets the config to be pushed if the DUT vendor is Drivenets.
func (c *VendorConfig) WithDrivenetsFile(path string) *VendorConfig {
c.perVendor[opb.Device_DRIVENETS] = configFile(path)
return c
}

// WithVarValue replaces each occurrence of {{ var "key" }} in the pushed config
// with the specified value.
func (c *VendorConfig) WithVarValue(key, value string) *VendorConfig {
Expand Down
2 changes: 2 additions & 0 deletions device.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ const (
ARUBA = Vendor(opb.Device_ARUBA)
// ALPINE vendor.
ALPINE = Vendor(opb.Device_ALPINE)
// DRIVENETS vendor.
DRIVENETS = Vendor(opb.Device_DRIVENETS)
)

// String returns the name of the vendor.
Expand Down
97,370 changes: 48,684 additions & 48,686 deletions gnmi/oc/schema.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions knebind/solver/solver.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ var (
tpb.Vendor_OPENCONFIG: opb.Device_OPENCONFIG,
tpb.Vendor_HOST: opb.Device_VENDOR_UNSPECIFIED,
tpb.Vendor_ALPINE: opb.Device_ALPINE,
tpb.Vendor_DRIVENETS: opb.Device_DRIVENETS,
}
)

Expand Down
25 changes: 12 additions & 13 deletions proto/ate.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading