Skip to content

Commit

Permalink
Project import generated by Copybara.
Browse files Browse the repository at this point in the history
FolderOrigin-RevId: /usr/local/google/home/gdennis/copybara/temp/folder-destination11238456898606815380/.
  • Loading branch information
GGN Engprod Team authored and greg-dennis committed Sep 15, 2023
1 parent 8a2bfe0 commit 20cb3f1
Show file tree
Hide file tree
Showing 9 changed files with 46,894 additions and 46,678 deletions.
8 changes: 4 additions & 4 deletions ate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package ondatra
import (
"github.com/openconfig/ondatra/binding"
"github.com/openconfig/ondatra/otg"
"github.com/openconfig/ondatra/raw"
)

// ATEDevice is an automated test equipment.
Expand Down Expand Up @@ -45,8 +46,7 @@ func (a *ATEDevice) Actions() *Actions {
return &Actions{a.res.(binding.ATE)}
}

// RawAPI returns the underlying ATE implementation provided by the binding,
// for low-level access to ATE protocols.
func (a *ATEDevice) RawAPI() binding.ATE {
return a.res.(binding.ATE)
// RawAPIs returns a handle to raw protocol APIs on the ATE.
func (a *ATEDevice) RawAPIs() *raw.ATEAPIs {
return raw.NewATEAPIs(a.res.(binding.ATE))
}
9 changes: 1 addition & 8 deletions dut.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,7 @@ func (d *DUTDevice) Operations() *operations.Operations {
return operations.New(d.res.(binding.DUT))
}

// RawAPI returns the underlying DUT implementation provided by the binding,
// for low-level access to DUT protocols.
// Deprecated: use RawAPIs().BindingDUT() instead.
func (d *DUTDevice) RawAPI() binding.DUT {
return d.res.(binding.DUT)
}

// RawAPIs returns a handle to raw protocol APIs on the DUT.
func (d *DUTDevice) RawAPIs() *raw.DUTAPIs {
return raw.NewDUTAPIs(d.RawAPI())
return raw.NewDUTAPIs(d.res.(binding.DUT))
}
254 changes: 254 additions & 0 deletions gnmi/oc/platform/platform-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -85570,6 +85570,188 @@ func (n *Component_Transceiver_Threshold_LaserTemperatureUpperPathAny) State() y
)
}

// Component_Transceiver_Threshold_ModuleTemperatureLowerPath represents the /openconfig-platform/components/component/transceiver/thresholds/threshold/state/module-temperature-lower YANG schema element.
type Component_Transceiver_Threshold_ModuleTemperatureLowerPath struct {
*ygnmi.NodePath
parent ygnmi.PathStruct
}

// Component_Transceiver_Threshold_ModuleTemperatureLowerPathAny represents the wildcard version of the /openconfig-platform/components/component/transceiver/thresholds/threshold/state/module-temperature-lower YANG schema element.
type Component_Transceiver_Threshold_ModuleTemperatureLowerPathAny struct {
*ygnmi.NodePath
parent ygnmi.PathStruct
}

// State returns a Query that can be used in gNMI operations.
//
// Defining module: "openconfig-platform-transceiver"
// Instantiating module: "openconfig-platform-transceiver"
// Path from parent: "state/module-temperature-lower"
// Path from root: "/components/component/transceiver/thresholds/threshold/state/module-temperature-lower"
func (n *Component_Transceiver_Threshold_ModuleTemperatureLowerPath) State() ygnmi.SingletonQuery[float64] {
return ygnmi.NewSingletonQuery[float64](
"Component_Transceiver_Threshold",
true,
true,
true,
true,
false,
ygnmi.NewNodePath(
[]string{"state", "module-temperature-lower"},
nil,
n.parent,
),
func(gs ygot.ValidatedGoStruct) (float64, bool) {
ret := gs.(*oc.Component_Transceiver_Threshold).ModuleTemperatureLower
if ret == nil {
var zero float64
return zero, false
}
return *ret, true
},
func() ygot.ValidatedGoStruct { return new(oc.Component_Transceiver_Threshold) },
func() *ytypes.Schema {
return &ytypes.Schema{
Root: &oc.Root{},
SchemaTree: oc.SchemaTree,
Unmarshal: oc.Unmarshal,
}
},
nil,
nil,
)
}

// State returns a Query that can be used in gNMI operations.
//
// Defining module: "openconfig-platform-transceiver"
// Instantiating module: "openconfig-platform-transceiver"
// Path from parent: "state/module-temperature-lower"
// Path from root: "/components/component/transceiver/thresholds/threshold/state/module-temperature-lower"
func (n *Component_Transceiver_Threshold_ModuleTemperatureLowerPathAny) State() ygnmi.WildcardQuery[float64] {
return ygnmi.NewWildcardQuery[float64](
"Component_Transceiver_Threshold",
true,
true,
true,
true,
false,
ygnmi.NewNodePath(
[]string{"state", "module-temperature-lower"},
nil,
n.parent,
),
func(gs ygot.ValidatedGoStruct) (float64, bool) {
ret := gs.(*oc.Component_Transceiver_Threshold).ModuleTemperatureLower
if ret == nil {
var zero float64
return zero, false
}
return *ret, true
},
func() ygot.ValidatedGoStruct { return new(oc.Component_Transceiver_Threshold) },
func() *ytypes.Schema {
return &ytypes.Schema{
Root: &oc.Root{},
SchemaTree: oc.SchemaTree,
Unmarshal: oc.Unmarshal,
}
},
nil,
)
}

// Component_Transceiver_Threshold_ModuleTemperatureUpperPath represents the /openconfig-platform/components/component/transceiver/thresholds/threshold/state/module-temperature-upper YANG schema element.
type Component_Transceiver_Threshold_ModuleTemperatureUpperPath struct {
*ygnmi.NodePath
parent ygnmi.PathStruct
}

// Component_Transceiver_Threshold_ModuleTemperatureUpperPathAny represents the wildcard version of the /openconfig-platform/components/component/transceiver/thresholds/threshold/state/module-temperature-upper YANG schema element.
type Component_Transceiver_Threshold_ModuleTemperatureUpperPathAny struct {
*ygnmi.NodePath
parent ygnmi.PathStruct
}

// State returns a Query that can be used in gNMI operations.
//
// Defining module: "openconfig-platform-transceiver"
// Instantiating module: "openconfig-platform-transceiver"
// Path from parent: "state/module-temperature-upper"
// Path from root: "/components/component/transceiver/thresholds/threshold/state/module-temperature-upper"
func (n *Component_Transceiver_Threshold_ModuleTemperatureUpperPath) State() ygnmi.SingletonQuery[float64] {
return ygnmi.NewSingletonQuery[float64](
"Component_Transceiver_Threshold",
true,
true,
true,
true,
false,
ygnmi.NewNodePath(
[]string{"state", "module-temperature-upper"},
nil,
n.parent,
),
func(gs ygot.ValidatedGoStruct) (float64, bool) {
ret := gs.(*oc.Component_Transceiver_Threshold).ModuleTemperatureUpper
if ret == nil {
var zero float64
return zero, false
}
return *ret, true
},
func() ygot.ValidatedGoStruct { return new(oc.Component_Transceiver_Threshold) },
func() *ytypes.Schema {
return &ytypes.Schema{
Root: &oc.Root{},
SchemaTree: oc.SchemaTree,
Unmarshal: oc.Unmarshal,
}
},
nil,
nil,
)
}

// State returns a Query that can be used in gNMI operations.
//
// Defining module: "openconfig-platform-transceiver"
// Instantiating module: "openconfig-platform-transceiver"
// Path from parent: "state/module-temperature-upper"
// Path from root: "/components/component/transceiver/thresholds/threshold/state/module-temperature-upper"
func (n *Component_Transceiver_Threshold_ModuleTemperatureUpperPathAny) State() ygnmi.WildcardQuery[float64] {
return ygnmi.NewWildcardQuery[float64](
"Component_Transceiver_Threshold",
true,
true,
true,
true,
false,
ygnmi.NewNodePath(
[]string{"state", "module-temperature-upper"},
nil,
n.parent,
),
func(gs ygot.ValidatedGoStruct) (float64, bool) {
ret := gs.(*oc.Component_Transceiver_Threshold).ModuleTemperatureUpper
if ret == nil {
var zero float64
return zero, false
}
return *ret, true
},
func() ygot.ValidatedGoStruct { return new(oc.Component_Transceiver_Threshold) },
func() *ytypes.Schema {
return &ytypes.Schema{
Root: &oc.Root{},
SchemaTree: oc.SchemaTree,
Unmarshal: oc.Unmarshal,
}
},
nil,
)
}

// Component_Transceiver_Threshold_OutputPowerLowerPath represents the /openconfig-platform/components/component/transceiver/thresholds/threshold/state/output-power-lower YANG schema element.
type Component_Transceiver_Threshold_OutputPowerLowerPath struct {
*ygnmi.NodePath
Expand Down Expand Up @@ -86324,6 +86506,78 @@ func (n *Component_Transceiver_ThresholdPathAny) LaserTemperatureUpper() *Compon
return ps
}

// ModuleTemperatureLower (leaf): The lower temperature threshold for the transceiver module.
//
// Defining module: "openconfig-platform-transceiver"
// Instantiating module: "openconfig-platform"
// Path from parent: "state/module-temperature-lower"
// Path from root: "/components/component/transceiver/thresholds/threshold/state/module-temperature-lower"
func (n *Component_Transceiver_ThresholdPath) ModuleTemperatureLower() *Component_Transceiver_Threshold_ModuleTemperatureLowerPath {
ps := &Component_Transceiver_Threshold_ModuleTemperatureLowerPath{
NodePath: ygnmi.NewNodePath(
[]string{"state", "module-temperature-lower"},
map[string]interface{}{},
n,
),
parent: n,
}
return ps
}

// ModuleTemperatureLower (leaf): The lower temperature threshold for the transceiver module.
//
// Defining module: "openconfig-platform-transceiver"
// Instantiating module: "openconfig-platform"
// Path from parent: "state/module-temperature-lower"
// Path from root: "/components/component/transceiver/thresholds/threshold/state/module-temperature-lower"
func (n *Component_Transceiver_ThresholdPathAny) ModuleTemperatureLower() *Component_Transceiver_Threshold_ModuleTemperatureLowerPathAny {
ps := &Component_Transceiver_Threshold_ModuleTemperatureLowerPathAny{
NodePath: ygnmi.NewNodePath(
[]string{"state", "module-temperature-lower"},
map[string]interface{}{},
n,
),
parent: n,
}
return ps
}

// ModuleTemperatureUpper (leaf): The upper temperature threshold for the transceiver module.
//
// Defining module: "openconfig-platform-transceiver"
// Instantiating module: "openconfig-platform"
// Path from parent: "state/module-temperature-upper"
// Path from root: "/components/component/transceiver/thresholds/threshold/state/module-temperature-upper"
func (n *Component_Transceiver_ThresholdPath) ModuleTemperatureUpper() *Component_Transceiver_Threshold_ModuleTemperatureUpperPath {
ps := &Component_Transceiver_Threshold_ModuleTemperatureUpperPath{
NodePath: ygnmi.NewNodePath(
[]string{"state", "module-temperature-upper"},
map[string]interface{}{},
n,
),
parent: n,
}
return ps
}

// ModuleTemperatureUpper (leaf): The upper temperature threshold for the transceiver module.
//
// Defining module: "openconfig-platform-transceiver"
// Instantiating module: "openconfig-platform"
// Path from parent: "state/module-temperature-upper"
// Path from root: "/components/component/transceiver/thresholds/threshold/state/module-temperature-upper"
func (n *Component_Transceiver_ThresholdPathAny) ModuleTemperatureUpper() *Component_Transceiver_Threshold_ModuleTemperatureUpperPathAny {
ps := &Component_Transceiver_Threshold_ModuleTemperatureUpperPathAny{
NodePath: ygnmi.NewNodePath(
[]string{"state", "module-temperature-upper"},
map[string]interface{}{},
n,
),
parent: n,
}
return ps
}

// OutputPowerLower (leaf): The lower power threshold for the laser output power.
//
// Defining module: "openconfig-platform-transceiver"
Expand Down
Loading

0 comments on commit 20cb3f1

Please sign in to comment.