diff --git a/pkg/cloud/gen/main.go b/pkg/cloud/gen/main.go index b6474e45..b7a9bbb7 100644 --- a/pkg/cloud/gen/main.go +++ b/pkg/cloud/gen/main.go @@ -738,9 +738,9 @@ func (g *{{.GCEWrapType}}) List(ctx context.Context, zone string, fl *filter.F) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("{{.GCEWrapType}}.List(%v, ..., %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -876,9 +876,9 @@ func (g *{{.GCEWrapType}}) AggregatedList(ctx context.Context, fl *filter.F) (ma klog.V(4).Infof("{{.GCEWrapType}}.AggregatedList(%v, %v) = %v, %v", ctx, fl, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("{{.GCEWrapType}}.AggregatedList(%v, %v) = [%v items], %v", ctx, fl, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) @@ -957,9 +957,9 @@ func (g *{{.GCEWrapType}}) {{.FcnArgs}} { klog.V(4).Infof("{{.GCEWrapType}}.{{.Name}}(%v, %v, ...) = %v, %v", ctx, key, nil, err) return nil, err } - if klog.V(4) { + if klog.V(4).Enabled() { klog.V(4).Infof("{{.GCEWrapType}}.{{.Name}}(%v, %v, ...) = [%v items], %v", ctx, key, len(all), nil) - } else if klog.V(5) { + } else if klog.V(5).Enabled() { var asStr []string for _, o := range all { asStr = append(asStr, fmt.Sprintf("%+v", o)) diff --git a/pkg/cloud/meta/meta.go b/pkg/cloud/meta/meta.go index c2a3023a..7b5db45e 100644 --- a/pkg/cloud/meta/meta.go +++ b/pkg/cloud/meta/meta.go @@ -199,6 +199,28 @@ var AllServices = []*ServiceInfo{ "Resize", }, }, + { + Object: "Firewall", + Service: "Firewalls", + Resource: "firewalls", + version: VersionAlpha, + keyType: Global, + serviceType: reflect.TypeOf(&alpha.FirewallsService{}), + additionalMethods: []string{ + "Update", + }, + }, + { + Object: "Firewall", + Service: "Firewalls", + Resource: "firewalls", + version: VersionBeta, + keyType: Global, + serviceType: reflect.TypeOf(&beta.FirewallsService{}), + additionalMethods: []string{ + "Update", + }, + }, { Object: "Firewall", Service: "Firewalls", @@ -566,7 +588,7 @@ var AllServices = []*ServiceInfo{ Resource: "sslPolicies", keyType: Global, serviceType: reflect.TypeOf(&ga.SslPoliciesService{}), - options: NoList, // List() naming convention is different in GCE API for this resource + options: NoList, // List() naming convention is different in GCE API for this resource }, { Object: "Subnetwork",