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/alexmasi/copybara/temp/folder-destination13954499514165865671/.
  • Loading branch information
GGN Engprod Team authored and alexmasi committed Oct 17, 2022
1 parent 7ae8708 commit 5b9b8e5
Show file tree
Hide file tree
Showing 143 changed files with 88,949 additions and 87,421 deletions.
7 changes: 7 additions & 0 deletions binding/abstract.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
mpb "github.com/openconfig/gnoi/mpls"
ospb "github.com/openconfig/gnoi/os"
otpb "github.com/openconfig/gnoi/otdr"
plqpb "github.com/openconfig/gnoi/packet_link_qualification"
spb "github.com/openconfig/gnoi/system"
wpb "github.com/openconfig/gnoi/wavelength_router"

Expand Down Expand Up @@ -225,6 +226,12 @@ func (g *AbstractGNOIClients) Layer2() lpb.Layer2Client {
return nil
}

// LinkQualification logs a fatal unimplemented error.
func (g *AbstractGNOIClients) LinkQualification() plqpb.LinkQualificationClient {
log.Fatal("LinkQualification unimplemented")
return nil
}

// MPLS logs a fatal unimplemented error.
func (g *AbstractGNOIClients) MPLS() mpb.MPLSClient {
log.Fatal("MPLS unimplemented")
Expand Down
2 changes: 2 additions & 0 deletions binding/binding.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
mpb "github.com/openconfig/gnoi/mpls"
ospb "github.com/openconfig/gnoi/os"
otpb "github.com/openconfig/gnoi/otdr"
plqpb "github.com/openconfig/gnoi/packet_link_qualification"
spb "github.com/openconfig/gnoi/system"
wpb "github.com/openconfig/gnoi/wavelength_router"
grpb "github.com/openconfig/gribi/v1/proto/service"
Expand Down Expand Up @@ -209,6 +210,7 @@ type GNOIClients interface {
Healthz() hpb.HealthzClient
Interface() ipb.InterfaceClient
Layer2() lpb.Layer2Client
LinkQualification() plqpb.LinkQualificationClient
MPLS() mpb.MPLSClient
OS() ospb.OSClient
OTDR() otpb.OTDRClient
Expand Down
3 changes: 2 additions & 1 deletion config/acl/acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Package acl is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema. The generated paths are
based on a compressed form of the schema.
This package was generated by /usr/local/google/home/gdennis/go/pkg/mod/github.com/openconfig/[email protected]/genutil/names.go
This package was generated by /usr/local/google/home/alexmasi/go/pkg/mod/github.com/openconfig/[email protected]/genutil/names.go
using the following YANG input files:
- gnmi-collector-metadata.yang
- gnsi/authz/gnsi-authz.yang
Expand All @@ -25,6 +25,7 @@ using the following YANG input files:
- public/release/models/interfaces/openconfig-if-ethernet-ext.yang
- public/release/models/interfaces/openconfig-if-ip-ext.yang
- public/release/models/interfaces/openconfig-if-ip.yang
- public/release/models/interfaces/openconfig-if-sdn-ext.yang
- public/release/models/interfaces/openconfig-interfaces.yang
- public/release/models/isis/openconfig-isis.yang
- public/release/models/lacp/openconfig-lacp.yang
Expand Down
1 change: 0 additions & 1 deletion config/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package config contains generated code to perform gNMI Set operations on devices.
package config

import (
Expand Down
3 changes: 2 additions & 1 deletion config/device/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Package device is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema. The generated paths are
based on a compressed form of the schema.
This package was generated by /usr/local/google/home/gdennis/go/pkg/mod/github.com/openconfig/[email protected]/genutil/names.go
This package was generated by /usr/local/google/home/alexmasi/go/pkg/mod/github.com/openconfig/[email protected]/genutil/names.go
using the following YANG input files:
- gnmi-collector-metadata.yang
- gnsi/authz/gnsi-authz.yang
Expand All @@ -25,6 +25,7 @@ using the following YANG input files:
- public/release/models/interfaces/openconfig-if-ethernet-ext.yang
- public/release/models/interfaces/openconfig-if-ip-ext.yang
- public/release/models/interfaces/openconfig-if-ip.yang
- public/release/models/interfaces/openconfig-if-sdn-ext.yang
- public/release/models/interfaces/openconfig-interfaces.yang
- public/release/models/isis/openconfig-isis.yang
- public/release/models/lacp/openconfig-lacp.yang
Expand Down
3 changes: 2 additions & 1 deletion config/gnmicollectormetadata/gnmicollectormetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Package gnmicollectormetadata is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema. The generated paths are
based on a compressed form of the schema.
This package was generated by /usr/local/google/home/gdennis/go/pkg/mod/github.com/openconfig/[email protected]/genutil/names.go
This package was generated by /usr/local/google/home/alexmasi/go/pkg/mod/github.com/openconfig/[email protected]/genutil/names.go
using the following YANG input files:
- gnmi-collector-metadata.yang
- gnsi/authz/gnsi-authz.yang
Expand All @@ -25,6 +25,7 @@ using the following YANG input files:
- public/release/models/interfaces/openconfig-if-ethernet-ext.yang
- public/release/models/interfaces/openconfig-if-ip-ext.yang
- public/release/models/interfaces/openconfig-if-ip.yang
- public/release/models/interfaces/openconfig-if-sdn-ext.yang
- public/release/models/interfaces/openconfig-interfaces.yang
- public/release/models/isis/openconfig-isis.yang
- public/release/models/lacp/openconfig-lacp.yang
Expand Down
71 changes: 70 additions & 1 deletion config/interfaces/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Package interfaces is a generated package which contains definitions
of structs which generate gNMI paths for a YANG schema. The generated paths are
based on a compressed form of the schema.
This package was generated by /usr/local/google/home/gdennis/go/pkg/mod/github.com/openconfig/[email protected]/genutil/names.go
This package was generated by /usr/local/google/home/alexmasi/go/pkg/mod/github.com/openconfig/[email protected]/genutil/names.go
using the following YANG input files:
- gnmi-collector-metadata.yang
- gnsi/authz/gnsi-authz.yang
Expand All @@ -25,6 +25,7 @@ using the following YANG input files:
- public/release/models/interfaces/openconfig-if-ethernet-ext.yang
- public/release/models/interfaces/openconfig-if-ip-ext.yang
- public/release/models/interfaces/openconfig-if-ip.yang
- public/release/models/interfaces/openconfig-if-sdn-ext.yang
- public/release/models/interfaces/openconfig-interfaces.yang
- public/release/models/isis/openconfig-isis.yang
- public/release/models/lacp/openconfig-lacp.yang
Expand Down Expand Up @@ -104,6 +105,16 @@ type Interface_EnabledPathAny struct {
*ygot.NodePath
}

// Interface_ForwardingViablePath represents the /openconfig-interfaces/interfaces/interface/config/forwarding-viable YANG schema element.
type Interface_ForwardingViablePath struct {
*ygot.NodePath
}

// Interface_ForwardingViablePathAny represents the wildcard version of the /openconfig-interfaces/interfaces/interface/config/forwarding-viable YANG schema element.
type Interface_ForwardingViablePathAny struct {
*ygot.NodePath
}

// Interface_IdPath represents the /openconfig-interfaces/interfaces/interface/config/id YANG schema element.
type Interface_IdPath struct {
*ygot.NodePath
Expand Down Expand Up @@ -366,6 +377,64 @@ func (n *InterfacePathAny) Ethernet() *Interface_EthernetPathAny {
}
}

// ForwardingViable (leaf): This value indicates whether the interface may be used
// to route traffic or not. If set to false, the
// interface is not used for forwarding traffic, but as long as
// it is up, the interface still maintains its layer-2
// adjacencies and runs its configured layer-2 functions
// (e.g., LLDP, etc.).
// This is used by an external programming entity to disable an interface
// (usually part of an aggregate) for the purposes of forwarding
// traffic. This allows a logical aggregate to continue to be
// used with partial capacity, for example. Note that setting
// `forwarding-viable = false` is not equivalent to
// administratively disabling the interface -- in particular, the
// interface is expected to participate in L2 protocols such as
// LLDP or LACP even if it blocked from forwarding traffic.
// ----------------------------------------
// Defining module: "openconfig-if-sdn-ext"
// Instantiating module: "openconfig-interfaces"
// Path from parent: "config/forwarding-viable"
// Path from root: "/interfaces/interface/config/forwarding-viable"
func (n *InterfacePath) ForwardingViable() *Interface_ForwardingViablePath {
return &Interface_ForwardingViablePath{
NodePath: ygot.NewNodePath(
[]string{"config", "forwarding-viable"},
map[string]interface{}{},
n,
),
}
}

// ForwardingViable (leaf): This value indicates whether the interface may be used
// to route traffic or not. If set to false, the
// interface is not used for forwarding traffic, but as long as
// it is up, the interface still maintains its layer-2
// adjacencies and runs its configured layer-2 functions
// (e.g., LLDP, etc.).
// This is used by an external programming entity to disable an interface
// (usually part of an aggregate) for the purposes of forwarding
// traffic. This allows a logical aggregate to continue to be
// used with partial capacity, for example. Note that setting
// `forwarding-viable = false` is not equivalent to
// administratively disabling the interface -- in particular, the
// interface is expected to participate in L2 protocols such as
// LLDP or LACP even if it blocked from forwarding traffic.
// ----------------------------------------
// Defining module: "openconfig-if-sdn-ext"
// Instantiating module: "openconfig-interfaces"
// Path from parent: "config/forwarding-viable"
// Path from root: "/interfaces/interface/config/forwarding-viable"
func (n *InterfacePathAny) ForwardingViable() *Interface_ForwardingViablePathAny {
return &Interface_ForwardingViablePathAny{
NodePath: ygot.NewNodePath(
[]string{"config", "forwarding-viable"},
map[string]interface{}{},
n,
),
}
}

// HoldTime (container): Top-level container for hold-time settings to enable
// dampening advertisements of interface transitions.
// ----------------------------------------
Expand Down
103 changes: 103 additions & 0 deletions config/interfaces/telemetry-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -2498,6 +2498,109 @@ func convertInterface_Ethernet_SwitchedVlan_TrunkVlansPath(t testing.TB, md *gen
return qv
}

// Lookup fetches the value at /openconfig-interfaces/interfaces/interface/config/forwarding-viable with a ONCE subscription.
// It returns nil if there is no value present at the path.
func (n *Interface_ForwardingViablePath) Lookup(t testing.TB) *oc.QualifiedBool {
t.Helper()
goStruct := &oc.Interface{}
md, ok := oc.Lookup(t, n, "Interface", goStruct, true, true)
if ok {
return convertInterface_ForwardingViablePath(t, md, goStruct)
}
return (&oc.QualifiedBool{
Metadata: md,
}).SetVal(goStruct.GetForwardingViable())
}

// Get fetches the value at /openconfig-interfaces/interfaces/interface/config/forwarding-viable with a ONCE subscription,
// failing the test fatally if no value is present at the path.
// To avoid a fatal test failure, use the Lookup method instead.
func (n *Interface_ForwardingViablePath) Get(t testing.TB) bool {
t.Helper()
return n.Lookup(t).Val(t)
}

// Lookup fetches the values at /openconfig-interfaces/interfaces/interface/config/forwarding-viable with a ONCE subscription.
// It returns an empty list if no values are present at the path.
func (n *Interface_ForwardingViablePathAny) Lookup(t testing.TB) []*oc.QualifiedBool {
t.Helper()
datapoints, queryPath := genutil.MustGet(t, n)
datapointGroups, sortedPrefixes := genutil.BundleDatapoints(t, datapoints, uint(len(queryPath.Elem)))

var data []*oc.QualifiedBool
for _, prefix := range sortedPrefixes {
goStruct := &oc.Interface{}
md, ok := genutil.MustUnmarshal(t, datapointGroups[prefix], oc.GetSchema(), "Interface", goStruct, queryPath, true, true)
if !ok {
continue
}
qv := convertInterface_ForwardingViablePath(t, md, goStruct)
data = append(data, qv)
}
return data
}

// Get fetches the values at /openconfig-interfaces/interfaces/interface/config/forwarding-viable with a ONCE subscription.
func (n *Interface_ForwardingViablePathAny) Get(t testing.TB) []bool {
t.Helper()
fulldata := n.Lookup(t)
var data []bool
for _, full := range fulldata {
data = append(data, full.Val(t))
}
return data
}

// Delete deletes the configuration at /openconfig-interfaces/interfaces/interface/config/forwarding-viable.
func (n *Interface_ForwardingViablePath) Delete(t testing.TB) *gpb.SetResponse {
t.Helper()
return genutil.Delete(t, n)
}

// BatchDelete buffers a config delete operation at /openconfig-interfaces/interfaces/interface/config/forwarding-viable in the given batch object.
func (n *Interface_ForwardingViablePath) BatchDelete(t testing.TB, b *config.SetRequestBatch) {
t.Helper()
b.BatchDelete(t, n)
}

// Replace replaces the configuration at /openconfig-interfaces/interfaces/interface/config/forwarding-viable.
func (n *Interface_ForwardingViablePath) Replace(t testing.TB, val bool) *gpb.SetResponse {
t.Helper()
return genutil.Replace(t, n, &val)
}

// BatchReplace buffers a config replace operation at /openconfig-interfaces/interfaces/interface/config/forwarding-viable in the given batch object.
func (n *Interface_ForwardingViablePath) BatchReplace(t testing.TB, b *config.SetRequestBatch, val bool) {
t.Helper()
b.BatchReplace(t, n, &val)
}

// Update updates the configuration at /openconfig-interfaces/interfaces/interface/config/forwarding-viable.
func (n *Interface_ForwardingViablePath) Update(t testing.TB, val bool) *gpb.SetResponse {
t.Helper()
return genutil.Update(t, n, &val)
}

// BatchUpdate buffers a config update operation at /openconfig-interfaces/interfaces/interface/config/forwarding-viable in the given batch object.
func (n *Interface_ForwardingViablePath) BatchUpdate(t testing.TB, b *config.SetRequestBatch, val bool) {
t.Helper()
b.BatchUpdate(t, n, &val)
}

// convertInterface_ForwardingViablePath extracts the value of the leaf ForwardingViable from its parent oc.Interface
// and combines the update with an existing Metadata to return a *oc.QualifiedBool.
func convertInterface_ForwardingViablePath(t testing.TB, md *genutil.Metadata, parent *oc.Interface) *oc.QualifiedBool {
t.Helper()
qv := &oc.QualifiedBool{
Metadata: md,
}
val := parent.ForwardingViable
if !reflect.ValueOf(val).IsZero() {
qv.SetVal(*val)
}
return qv
}

// Lookup fetches the value at /openconfig-interfaces/interfaces/interface/hold-time with a ONCE subscription.
// It returns nil if there is no value present at the path.
func (n *Interface_HoldTimePath) Lookup(t testing.TB) *oc.QualifiedInterface_HoldTime {
Expand Down
Loading

0 comments on commit 5b9b8e5

Please sign in to comment.