deps: update osbuild/images to 157e798fdf8d

Update the osbuild/images dependency from 246b718310ea to 157e798fdf8d.
This commit is contained in:
Achilleas Koutsou 2023-08-01 12:42:59 +02:00 committed by Tomáš Hozza
parent 4c7b3dd25a
commit a4798ea64d
55 changed files with 42304 additions and 41796 deletions

File diff suppressed because it is too large Load diff

View file

@ -3317,6 +3317,11 @@
"List"
]
},
"Patch": {
"methods": [
"Patch"
]
},
"SetIamPolicy": {
"methods": [
"SetIamPolicy"

View file

@ -155,7 +155,7 @@ func (c *RegionSecurityPoliciesClient) List(ctx context.Context, req *computepb.
return c.internalClient.List(ctx, req, opts...)
}
// Patch patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
// Patch patches the specified policy with the data included in the request. To clear fields in the policy, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
func (c *RegionSecurityPoliciesClient) Patch(ctx context.Context, req *computepb.PatchRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
return c.internalClient.Patch(ctx, req, opts...)
}
@ -540,7 +540,7 @@ func (c *regionSecurityPoliciesRESTClient) List(ctx context.Context, req *comput
return it
}
// Patch patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
// Patch patches the specified policy with the data included in the request. To clear fields in the policy, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
func (c *regionSecurityPoliciesRESTClient) Patch(ctx context.Context, req *computepb.PatchRegionSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
m := protojson.MarshalOptions{AllowPartial: true}
body := req.GetSecurityPolicyResource()

View file

@ -50,6 +50,7 @@ type ResourcePoliciesCallOptions struct {
GetIamPolicy []gax.CallOption
Insert []gax.CallOption
List []gax.CallOption
Patch []gax.CallOption
SetIamPolicy []gax.CallOption
TestIamPermissions []gax.CallOption
}
@ -110,6 +111,9 @@ func defaultResourcePoliciesRESTCallOptions() *ResourcePoliciesCallOptions {
http.StatusServiceUnavailable)
}),
},
Patch: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
},
SetIamPolicy: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
},
@ -130,6 +134,7 @@ type internalResourcePoliciesClient interface {
GetIamPolicy(context.Context, *computepb.GetIamPolicyResourcePolicyRequest, ...gax.CallOption) (*computepb.Policy, error)
Insert(context.Context, *computepb.InsertResourcePolicyRequest, ...gax.CallOption) (*Operation, error)
List(context.Context, *computepb.ListResourcePoliciesRequest, ...gax.CallOption) *ResourcePolicyIterator
Patch(context.Context, *computepb.PatchResourcePolicyRequest, ...gax.CallOption) (*Operation, error)
SetIamPolicy(context.Context, *computepb.SetIamPolicyResourcePolicyRequest, ...gax.CallOption) (*computepb.Policy, error)
TestIamPermissions(context.Context, *computepb.TestIamPermissionsResourcePolicyRequest, ...gax.CallOption) (*computepb.TestPermissionsResponse, error)
}
@ -199,6 +204,11 @@ func (c *ResourcePoliciesClient) List(ctx context.Context, req *computepb.ListRe
return c.internalClient.List(ctx, req, opts...)
}
// Patch modify the specified resource policy.
func (c *ResourcePoliciesClient) Patch(ctx context.Context, req *computepb.PatchResourcePolicyRequest, opts ...gax.CallOption) (*Operation, error) {
return c.internalClient.Patch(ctx, req, opts...)
}
// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
func (c *ResourcePoliciesClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyResourcePolicyRequest, opts ...gax.CallOption) (*computepb.Policy, error) {
return c.internalClient.SetIamPolicy(ctx, req, opts...)
@ -752,6 +762,84 @@ func (c *resourcePoliciesRESTClient) List(ctx context.Context, req *computepb.Li
return it
}
// Patch modify the specified resource policy.
func (c *resourcePoliciesRESTClient) Patch(ctx context.Context, req *computepb.PatchResourcePolicyRequest, opts ...gax.CallOption) (*Operation, error) {
m := protojson.MarshalOptions{AllowPartial: true}
body := req.GetResourcePolicyResource()
jsonReq, err := m.Marshal(body)
if err != nil {
return nil, err
}
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/regions/%v/resourcePolicies/%v", req.GetProject(), req.GetRegion(), req.GetResourcePolicy())
params := url.Values{}
if req != nil && req.RequestId != nil {
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
}
if req != nil && req.UpdateMask != nil {
params.Add("updateMask", fmt.Sprintf("%v", req.GetUpdateMask()))
}
baseUrl.RawQuery = params.Encode()
// Build HTTP headers from client and context metadata.
md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "region", url.QueryEscape(req.GetRegion()), "resource_policy", url.QueryEscape(req.GetResourcePolicy())))
headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json"))
opts = append((*c.CallOptions).Patch[0:len((*c.CallOptions).Patch):len((*c.CallOptions).Patch)], opts...)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
resp := &computepb.Operation{}
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq))
if err != nil {
return err
}
httpReq = httpReq.WithContext(ctx)
httpReq.Header = headers
httpRsp, err := c.httpClient.Do(httpReq)
if err != nil {
return err
}
defer httpRsp.Body.Close()
if err = googleapi.CheckResponse(httpRsp); err != nil {
return err
}
buf, err := io.ReadAll(httpRsp.Body)
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, e
}
op := &Operation{
&regionOperationsHandle{
c: c.operationClient,
proto: resp,
project: req.GetProject(),
region: req.GetRegion(),
},
}
return op, nil
}
// SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
func (c *resourcePoliciesRESTClient) SetIamPolicy(ctx context.Context, req *computepb.SetIamPolicyResourcePolicyRequest, opts ...gax.CallOption) (*computepb.Policy, error) {
m := protojson.MarshalOptions{AllowPartial: true}

View file

@ -238,12 +238,12 @@ func (c *SecurityPoliciesClient) ListPreconfiguredExpressionSets(ctx context.Con
return c.internalClient.ListPreconfiguredExpressionSets(ctx, req, opts...)
}
// Patch patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
// Patch patches the specified policy with the data included in the request. To clear fields in the policy, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
func (c *SecurityPoliciesClient) Patch(ctx context.Context, req *computepb.PatchSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
return c.internalClient.Patch(ctx, req, opts...)
}
// PatchRule patches a rule at the specified priority.
// PatchRule patches a rule at the specified priority. To clear fields in the rule, leave the fields empty and specify them in the updateMask.
func (c *SecurityPoliciesClient) PatchRule(ctx context.Context, req *computepb.PatchRuleSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
return c.internalClient.PatchRule(ctx, req, opts...)
}
@ -948,7 +948,7 @@ func (c *securityPoliciesRESTClient) ListPreconfiguredExpressionSets(ctx context
return resp, nil
}
// Patch patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
// Patch patches the specified policy with the data included in the request. To clear fields in the policy, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
func (c *securityPoliciesRESTClient) Patch(ctx context.Context, req *computepb.PatchSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
m := protojson.MarshalOptions{AllowPartial: true}
body := req.GetSecurityPolicyResource()
@ -1022,7 +1022,7 @@ func (c *securityPoliciesRESTClient) Patch(ctx context.Context, req *computepb.P
return op, nil
}
// PatchRule patches a rule at the specified priority.
// PatchRule patches a rule at the specified priority. To clear fields in the rule, leave the fields empty and specify them in the updateMask.
func (c *securityPoliciesRESTClient) PatchRule(ctx context.Context, req *computepb.PatchRuleSecurityPolicyRequest, opts ...gax.CallOption) (*Operation, error) {
m := protojson.MarshalOptions{AllowPartial: true}
body := req.GetSecurityPolicyRuleResource()

View file

@ -15,4 +15,4 @@
package internal
// Version is the current tagged release of the library.
const Version = "1.22.0"
const Version = "1.23.0"