Skip to content

Commit

Permalink
Merge pull request #226 from AwesomePatrol/fix-364244347
Browse files Browse the repository at this point in the history
Fix calls to NetworkServices List
  • Loading branch information
google-oss-prow[bot] authored Sep 6, 2024
2 parents 6f792c8 + d2360d4 commit c62a30e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pkg/cloud/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -51999,7 +51999,8 @@ func (g *TDTcpRoutes) List(ctx context.Context, fl *filter.F, options ...Option)
return nil, err
}
klog.V(5).Infof("TDTcpRoutes.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck)
call := g.s.NetworkServicesGA.TcpRoutes.List(projectID)
parent := fmt.Sprintf("projects/%s/locations/global", projectID)
call := g.s.NetworkServicesGA.TcpRoutes.List(parent)

var all []*networkservicesga.TcpRoute
f := func(l *networkservicesga.ListTcpRoutesResponse) error {
Expand Down Expand Up @@ -52420,7 +52421,8 @@ func (g *TDBetaTcpRoutes) List(ctx context.Context, fl *filter.F, options ...Opt
return nil, err
}
klog.V(5).Infof("TDBetaTcpRoutes.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck)
call := g.s.NetworkServicesBeta.TcpRoutes.List(projectID)
parent := fmt.Sprintf("projects/%s/locations/global", projectID)
call := g.s.NetworkServicesBeta.TcpRoutes.List(parent)

var all []*networkservicesbeta.TcpRoute
f := func(l *networkservicesbeta.ListTcpRoutesResponse) error {
Expand Down Expand Up @@ -52841,7 +52843,8 @@ func (g *TDMeshes) List(ctx context.Context, fl *filter.F, options ...Option) ([
return nil, err
}
klog.V(5).Infof("TDMeshes.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck)
call := g.s.NetworkServicesGA.Meshes.List(projectID)
parent := fmt.Sprintf("projects/%s/locations/global", projectID)
call := g.s.NetworkServicesGA.Meshes.List(parent)

var all []*networkservicesga.Mesh
f := func(l *networkservicesga.ListMeshesResponse) error {
Expand Down Expand Up @@ -53262,7 +53265,8 @@ func (g *TDBetaMeshes) List(ctx context.Context, fl *filter.F, options ...Option
return nil, err
}
klog.V(5).Infof("TDBetaMeshes.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck)
call := g.s.NetworkServicesBeta.Meshes.List(projectID)
parent := fmt.Sprintf("projects/%s/locations/global", projectID)
call := g.s.NetworkServicesBeta.Meshes.List(parent)

var all []*networkservicesbeta.Mesh
f := func(l *networkservicesbeta.ListMeshesResponse) error {
Expand Down
5 changes: 5 additions & 0 deletions pkg/cloud/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -837,8 +837,13 @@ func (g *{{.GCPWrapType}}) List(ctx context.Context, zone string, fl *filter.F,
{{- if .KeyIsGlobal}}
klog.V(5).Infof("{{.GCPWrapType}}.List(%v, %v): projectID = %v, ck = %+v", ctx, fl, projectID, ck)
{{- if .IsNetworkServices }}
parent := fmt.Sprintf("projects/%s/locations/global", projectID)
call := g.s.{{.GroupVersionTitle}}.{{.Service}}.List(parent)
{{- else}}
call := g.s.{{.GroupVersionTitle}}.{{.Service}}.List(projectID)
{{- end -}}
{{- end -}}
{{- if .KeyIsRegional}}
klog.V(5).Infof("{{.GCPWrapType}}.List(%v, %v, %v): projectID = %v, ck = %+v", ctx, region, fl, projectID, ck)
call := g.s.{{.GroupVersionTitle}}.{{.Service}}.List(projectID, region)
Expand Down

0 comments on commit c62a30e

Please sign in to comment.