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-destination7995445277811077995/.
  • Loading branch information
GGN Engprod Team authored and greg-dennis committed Jun 10, 2023
1 parent 58948d7 commit 8e40661
Show file tree
Hide file tree
Showing 17 changed files with 46,504 additions and 45,637 deletions.
2 changes: 1 addition & 1 deletion binding/grpcutil/testservice/gen/testservice.pb.go

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

4 changes: 0 additions & 4 deletions 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.

6 changes: 4 additions & 2 deletions gnmi/oc/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -1246,10 +1246,12 @@ const (
Bgp_CommunityType_STANDARD E_Bgp_CommunityType = 1
// Bgp_CommunityType_EXTENDED corresponds to the value EXTENDED of Bgp_CommunityType
Bgp_CommunityType_EXTENDED E_Bgp_CommunityType = 2
// Bgp_CommunityType_LARGE corresponds to the value LARGE of Bgp_CommunityType
Bgp_CommunityType_LARGE E_Bgp_CommunityType = 3
// Bgp_CommunityType_BOTH corresponds to the value BOTH of Bgp_CommunityType
Bgp_CommunityType_BOTH E_Bgp_CommunityType = 3
Bgp_CommunityType_BOTH E_Bgp_CommunityType = 4
// Bgp_CommunityType_NONE corresponds to the value NONE of Bgp_CommunityType
Bgp_CommunityType_NONE E_Bgp_CommunityType = 4
Bgp_CommunityType_NONE E_Bgp_CommunityType = 5
)

// E_Bgp_Neighbor_SessionState is a derived int64 type which is used to represent
Expand Down
14 changes: 12 additions & 2 deletions gnmi/oc/enum_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,9 @@ var ΛEnum = map[string]map[int64]ygot.EnumDefinition{
"E_Bgp_CommunityType": {
1: {Name: "STANDARD"},
2: {Name: "EXTENDED"},
3: {Name: "BOTH"},
4: {Name: "NONE"},
3: {Name: "LARGE"},
4: {Name: "BOTH"},
5: {Name: "NONE"},
},
"E_Bgp_Neighbor_SessionState": {
1: {Name: "IDLE"},
Expand Down Expand Up @@ -3042,6 +3043,9 @@ func initΛEnumTypes() {
"/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/state/afi-safi-name": {
reflect.TypeOf((E_BgpTypes_AFI_SAFI_TYPE)(0)),
},
"/network-instances/network-instance/protocols/protocol/bgp/global/afi-safis/afi-safi/state/send-community-type": {
reflect.TypeOf((E_Bgp_CommunityType)(0)),
},
"/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/apply-policy/state/default-export-policy": {
reflect.TypeOf((E_RoutingPolicy_DefaultPolicyType)(0)),
},
Expand Down Expand Up @@ -3081,6 +3085,9 @@ func initΛEnumTypes() {
"/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/send-community": {
reflect.TypeOf((E_Bgp_CommunityType)(0)),
},
"/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/send-community-type": {
reflect.TypeOf((E_Bgp_CommunityType)(0)),
},
"/network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/state/session-state": {
reflect.TypeOf((E_Bgp_Neighbor_SessionState)(0)),
},
Expand Down Expand Up @@ -3111,6 +3118,9 @@ func initΛEnumTypes() {
"/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/state/send-community": {
reflect.TypeOf((E_Bgp_CommunityType)(0)),
},
"/network-instances/network-instance/protocols/protocol/bgp/peer-groups/peer-group/state/send-community-type": {
reflect.TypeOf((E_Bgp_CommunityType)(0)),
},
"/network-instances/network-instance/protocols/protocol/bgp/rib/afi-safis/afi-safi/ipv4-srte-policy/loc-rib/routes/route/state/invalid-reason": {
reflect.TypeOf((E_RibBgpTypes_INVALID_ROUTE_REASON)(0)),
},
Expand Down
124 changes: 124 additions & 0 deletions gnmi/oc/gnmicollectormetadata/gnmicollectormetadata-0.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,76 @@ func (n *Meta_LatestTimestampPathAny) State() ygnmi.WildcardQuery[int64] {
)
}

// State returns a Query that can be used in gNMI operations.
//
// Defining module: "gnmi-collector-metadata"
// Instantiating module: "gnmi-collector-metadata"
// Path from parent: "serverName"
// Path from root: "/meta/serverName"
func (n *Meta_ServerNamePath) State() ygnmi.SingletonQuery[string] {
return ygnmi.NewLeafSingletonQuery[string](
"Meta",
true,
true,
ygnmi.NewNodePath(
[]string{"serverName"},
nil,
n.parent,
),
func(gs ygot.ValidatedGoStruct) (string, bool) {
ret := gs.(*oc.Meta).ServerName
if ret == nil {
var zero string
return zero, false
}
return *ret, true
},
func() ygot.ValidatedGoStruct { return new(oc.Meta) },
func() *ytypes.Schema {
return &ytypes.Schema{
Root: &oc.Root{},
SchemaTree: oc.SchemaTree,
Unmarshal: oc.Unmarshal,
}
},
)
}

// State returns a Query that can be used in gNMI operations.
//
// Defining module: "gnmi-collector-metadata"
// Instantiating module: "gnmi-collector-metadata"
// Path from parent: "serverName"
// Path from root: "/meta/serverName"
func (n *Meta_ServerNamePathAny) State() ygnmi.WildcardQuery[string] {
return ygnmi.NewLeafWildcardQuery[string](
"Meta",
true,
true,
ygnmi.NewNodePath(
[]string{"serverName"},
nil,
n.parent,
),
func(gs ygot.ValidatedGoStruct) (string, bool) {
ret := gs.(*oc.Meta).ServerName
if ret == nil {
var zero string
return zero, false
}
return *ret, true
},
func() ygot.ValidatedGoStruct { return new(oc.Meta) },
func() *ytypes.Schema {
return &ytypes.Schema{
Root: &oc.Root{},
SchemaTree: oc.SchemaTree,
Unmarshal: oc.Unmarshal,
}
},
)
}

// State returns a Query that can be used in gNMI operations.
//
// Defining module: "gnmi-collector-metadata"
Expand Down Expand Up @@ -1361,6 +1431,18 @@ type Meta_LatestTimestampPathAny struct {
parent ygnmi.PathStruct
}

// Meta_ServerNamePath represents the /gnmi-collector-metadata/meta/serverName YANG schema element.
type Meta_ServerNamePath struct {
*ygnmi.NodePath
parent ygnmi.PathStruct
}

// Meta_ServerNamePathAny represents the wildcard version of the /gnmi-collector-metadata/meta/serverName YANG schema element.
type Meta_ServerNamePathAny struct {
*ygnmi.NodePath
parent ygnmi.PathStruct
}

// Meta_SyncPath represents the /gnmi-collector-metadata/meta/sync YANG schema element.
type Meta_SyncPath struct {
*ygnmi.NodePath
Expand Down Expand Up @@ -1747,6 +1829,48 @@ func (n *MetaPathAny) LatestTimestamp() *Meta_LatestTimestampPathAny {
}
}

// ServerName (leaf): serverName is an optional string metadata used to identify the server
// hosting the cache to the clients. It is useful in situations where a
// client is connected to a cache server behind a frontend system or a
// load-balancing system and the client wants to know exactly which cache
// server it is connected to
//
// Defining module: "gnmi-collector-metadata"
// Instantiating module: "gnmi-collector-metadata"
// Path from parent: "serverName"
// Path from root: "/meta/serverName"
func (n *MetaPath) ServerName() *Meta_ServerNamePath {
return &Meta_ServerNamePath{
NodePath: ygnmi.NewNodePath(
[]string{"serverName"},
map[string]interface{}{},
n,
),
parent: n,
}
}

// ServerName (leaf): serverName is an optional string metadata used to identify the server
// hosting the cache to the clients. It is useful in situations where a
// client is connected to a cache server behind a frontend system or a
// load-balancing system and the client wants to know exactly which cache
// server it is connected to
//
// Defining module: "gnmi-collector-metadata"
// Instantiating module: "gnmi-collector-metadata"
// Path from parent: "serverName"
// Path from root: "/meta/serverName"
func (n *MetaPathAny) ServerName() *Meta_ServerNamePathAny {
return &Meta_ServerNamePathAny{
NodePath: ygnmi.NewNodePath(
[]string{"serverName"},
map[string]interface{}{},
n,
),
parent: n,
}
}

// Sync (leaf): sync indicates that at least one copy of the target's entire tree has
// been received, as indicated by the sync_response field in a gNMI
// SubscribeResponse message
Expand Down
Loading

0 comments on commit 8e40661

Please sign in to comment.