diff --git a/mockgcp/mockcompute/globalforwardingrulesv1.go b/mockgcp/mockcompute/globalforwardingrulesv1.go index 5338e34d26..f8bb0cc15f 100644 --- a/mockgcp/mockcompute/globalforwardingrulesv1.go +++ b/mockgcp/mockcompute/globalforwardingrulesv1.go @@ -42,6 +42,9 @@ func (s *GlobalForwardingRulesV1) Get(ctx context.Context, req *pb.GetGlobalForw obj := &pb.ForwardingRule{} if err := s.storage.Get(ctx, fqn, obj); err != nil { + if status.Code(err) == codes.NotFound { + return nil, status.Errorf(codes.NotFound, "The resource '%s' was not found", fqn) + } return nil, err } @@ -160,10 +163,13 @@ func (s *GlobalForwardingRulesV1) SetLabels(ctx context.Context, req *pb.SetLabe op := &pb.Operation{ TargetId: obj.Id, TargetLink: obj.SelfLink, - OperationType: PtrTo("SetLabels"), + OperationType: PtrTo("setLabels"), User: PtrTo("user@example.com"), // SetLabels operation has EndTime in response EndTime: PtrTo("2024-04-01T12:34:56.123456Z"), + // SetLabels operation finished super fast + Progress: PtrTo(int32(100)), + Status: PtrTo(pb.Operation_DONE), } return s.startGlobalLRO(ctx, name.Project.ID, op, func() (proto.Message, error) { return obj, nil diff --git a/mockgcp/mockcompute/operations.go b/mockgcp/mockcompute/operations.go index fd3b1ec4e8..c1b16baaf1 100644 --- a/mockgcp/mockcompute/operations.go +++ b/mockgcp/mockcompute/operations.go @@ -91,13 +91,17 @@ func (s *computeOperations) startLRO0(ctx context.Context, op *pb.Operation, fqn op.InsertTime = PtrTo(formatTime(now)) op.Id = PtrTo(uint64(nanos)) - op.Progress = PtrTo(int32(0)) + if op.Progress == nil { + op.Progress = PtrTo(int32(0)) + } + + if op.Status == nil { + op.Status = PtrTo(pb.Operation_RUNNING) + } op.Kind = PtrTo("compute#operation") op.SelfLink = PtrTo("https://www.googleapis.com/compute/v1/" + fqn) - op.Status = PtrTo(pb.Operation_RUNNING) - log.Info("storing operation", "fqn", fqn) if err := s.storage.Create(ctx, fqn, op); err != nil { return nil, err diff --git a/mockgcp/mockcompute/regionalforwardingrulev1.go b/mockgcp/mockcompute/regionalforwardingrulev1.go index 6f64832373..f301362a5a 100644 --- a/mockgcp/mockcompute/regionalforwardingrulev1.go +++ b/mockgcp/mockcompute/regionalforwardingrulev1.go @@ -42,6 +42,9 @@ func (s *RegionalForwardingRulesV1) Get(ctx context.Context, req *pb.GetForwardi obj := &pb.ForwardingRule{} if err := s.storage.Get(ctx, fqn, obj); err != nil { + if status.Code(err) == codes.NotFound { + return nil, status.Errorf(codes.NotFound, "The resource '%s' was not found", fqn) + } return nil, err } @@ -64,6 +67,7 @@ func (s *RegionalForwardingRulesV1) Insert(ctx context.Context, req *pb.InsertFo obj.CreationTimestamp = PtrTo(s.nowString()) obj.Id = &id obj.Kind = PtrTo("compute#forwardingRule") + obj.Region = PtrTo(fmt.Sprintf("https://www.googleapis.com/compute/v1/projects/%s/regions/%s", name.Project.ID, name.Region)) // If below values are not provided by user, it appears to default by GCP if obj.LabelFingerprint == nil { obj.LabelFingerprint = PtrTo(computeFingerprint(obj)) @@ -161,10 +165,13 @@ func (s *RegionalForwardingRulesV1) SetLabels(ctx context.Context, req *pb.SetLa op := &pb.Operation{ TargetId: obj.Id, TargetLink: obj.SelfLink, - OperationType: PtrTo("SetLabels"), + OperationType: PtrTo("setLabels"), User: PtrTo("user@example.com"), // SetLabels operation has EndTime in response EndTime: PtrTo("2024-04-01T12:34:56.123456Z"), + // SetLabels operation finished super fast + Progress: PtrTo(int32(100)), + Status: PtrTo(pb.Operation_DONE), } return s.startRegionalLRO(ctx, name.Project.ID, name.Region, op, func() (proto.Message, error) { return obj, nil diff --git a/pkg/controller/direct/compute/forwardingrule_controller.go b/pkg/controller/direct/compute/forwardingrule_controller.go index c1d3aa4d2d..f323b2eccd 100644 --- a/pkg/controller/direct/compute/forwardingrule_controller.go +++ b/pkg/controller/direct/compute/forwardingrule_controller.go @@ -333,9 +333,11 @@ func (a *forwardingRuleAdapter) Create(ctx context.Context, createOp *directbase if err != nil { return fmt.Errorf("creating ComputeForwardingRule %s: %w", a.fullyQualifiedName(), err) } - err = op.Wait(ctx) - if err != nil { - return fmt.Errorf("waiting ComputeForwardingRule %s create failed: %w", a.fullyQualifiedName(), err) + if !op.Done() { + err = op.Wait(ctx) + if err != nil { + return fmt.Errorf("waiting ComputeForwardingRule %s create failed: %w", a.fullyQualifiedName(), err) + } } log.V(2).Info("successfully created ComputeForwardingRule", "name", a.fullyQualifiedName()) // Get the created resource @@ -412,11 +414,14 @@ func (a *forwardingRuleAdapter) Update(ctx context.Context, updateOp *directbase if err != nil { return fmt.Errorf("updating ComputeForwardingRule labels %s: %w", a.fullyQualifiedName(), err) } - err = op.Wait(ctx) - if err != nil { - return fmt.Errorf("waiting ComputeForwardingRule %s update labels failed: %w", a.fullyQualifiedName(), err) + if !op.Done() { + err = op.Wait(ctx) + if err != nil { + return fmt.Errorf("waiting ComputeForwardingRule %s update labels failed: %w", a.fullyQualifiedName(), err) + } } log.V(2).Info("successfully updated ComputeForwardingRule labels", "name", a.fullyQualifiedName()) + // Get the updated resource if a.id.location == "global" { getReq := &computepb.GetGlobalForwardingRuleRequest{ @@ -457,9 +462,11 @@ func (a *forwardingRuleAdapter) Update(ctx context.Context, updateOp *directbase if err != nil { return fmt.Errorf("updating ComputeForwardingRule target %s: %w", a.fullyQualifiedName(), err) } - err = op.Wait(ctx) - if err != nil { - return fmt.Errorf("waiting ComputeForwardingRule %s update target failed: %w", a.fullyQualifiedName(), err) + if !op.Done() { + err = op.Wait(ctx) + if err != nil { + return fmt.Errorf("waiting ComputeForwardingRule %s update target failed: %w", a.fullyQualifiedName(), err) + } } log.V(2).Info("successfully updated ComputeForwardingRule target", "name", a.fullyQualifiedName()) } @@ -544,9 +551,11 @@ func (a *forwardingRuleAdapter) Delete(ctx context.Context, deleteOp *directbase if err != nil { return false, fmt.Errorf("deleting ComputeForwardingRule %s: %w", a.id.forwardingRule, err) } - err = op.Wait(ctx) - if err != nil { - return false, fmt.Errorf("waiting ComputeForwardingRule %s delete failed: %w", a.id.forwardingRule, err) + if !op.Done() { + err = op.Wait(ctx) + if err != nil { + return false, fmt.Errorf("waiting ComputeForwardingRule %s delete failed: %w", a.id.forwardingRule, err) + } } log.V(2).Info("successfully deleted ComputeForwardingRule", "name", a.id.forwardingRule) return true, nil diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_http.log index 398e273a35..f59fb860d4 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrule/_http.log @@ -731,11 +731,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "forwardingRule \"projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "forwardingRule \"projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}' was not found" } } @@ -895,41 +895,7 @@ X-Xss-Protection: 0 "insertTime": "2024-04-01T12:34:56.123456Z", "kind": "compute#operation", "name": "${operationID}", - "operationType": "SetLabels", - "progress": 0, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "RUNNING", - "targetId": "${forwardingRulesId}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID} -Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: project=${projectId}&operation=${operationID} - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "endTime": "2024-04-01T12:34:56.123456Z", - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "SetLabels", + "operationType": "setLabels", "progress": 100, "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log index 17d48f79dc..57f48926dd 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulefull/_http.log @@ -731,11 +731,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "forwardingRule \"projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "forwardingRule \"projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}' was not found" } } @@ -921,41 +921,7 @@ X-Xss-Protection: 0 "insertTime": "2024-04-01T12:34:56.123456Z", "kind": "compute#operation", "name": "${operationID}", - "operationType": "SetLabels", - "progress": 0, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "RUNNING", - "targetId": "${forwardingRulesId}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID} -Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: project=${projectId}&operation=${operationID} - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "endTime": "2024-04-01T12:34:56.123456Z", - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "SetLabels", + "operationType": "setLabels", "progress": 100, "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulehttps/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulehttps/_http.log index 31e0110913..ca23ad1c1b 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulehttps/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulehttps/_http.log @@ -1026,11 +1026,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "forwardingRule \"projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "forwardingRule \"projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}' was not found" } } @@ -1188,41 +1188,7 @@ X-Xss-Protection: 0 "insertTime": "2024-04-01T12:34:56.123456Z", "kind": "compute#operation", "name": "${operationID}", - "operationType": "SetLabels", - "progress": 0, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "RUNNING", - "targetId": "${forwardingRulesId}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID} -Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: project=${projectId}&operation=${operationID} - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "endTime": "2024-04-01T12:34:56.123456Z", - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "SetLabels", + "operationType": "setLabels", "progress": 100, "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulessl/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulessl/_http.log index ef23a003d0..a2fdb227f9 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulessl/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingrulessl/_http.log @@ -846,11 +846,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "forwardingRule \"projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "forwardingRule \"projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}' was not found" } } @@ -1008,41 +1008,7 @@ X-Xss-Protection: 0 "insertTime": "2024-04-01T12:34:56.123456Z", "kind": "compute#operation", "name": "${operationID}", - "operationType": "SetLabels", - "progress": 0, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "RUNNING", - "targetId": "${forwardingRulesId}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID} -Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: project=${projectId}&operation=${operationID} - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "endTime": "2024-04-01T12:34:56.123456Z", - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "SetLabels", + "operationType": "setLabels", "progress": 100, "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log index e4edb5ca97..5bc2dc8787 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/globalcomputeforwardingruletcp/_http.log @@ -706,11 +706,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "forwardingRule \"projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "forwardingRule \"projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}' was not found" } } @@ -869,41 +869,7 @@ X-Xss-Protection: 0 "insertTime": "2024-04-01T12:34:56.123456Z", "kind": "compute#operation", "name": "${operationID}", - "operationType": "SetLabels", - "progress": 0, - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "RUNNING", - "targetId": "${forwardingRulesId}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID} -Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: project=${projectId}&operation=${operationID} - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "endTime": "2024-04-01T12:34:56.123456Z", - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "SetLabels", + "operationType": "setLabels", "progress": 100, "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", "startTime": "2024-04-01T12:34:56.123456Z", diff --git a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrule/_http.log b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrule/_http.log index 38db2c7bd9..8abf352f1f 100644 --- a/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrule/_http.log +++ b/pkg/test/resourcefixture/testdata/basic/compute/v1beta1/computeforwardingrule/regionalcomputeforwardingrule/_http.log @@ -542,11 +542,11 @@ X-Xss-Protection: 0 "errors": [ { "domain": "global", - "message": "forwardingRule \"projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}\" not found", + "message": "The resource 'projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}' was not found", "reason": "notFound" } ], - "message": "forwardingRule \"projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}\" not found" + "message": "The resource 'projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}' was not found" } } @@ -668,6 +668,7 @@ X-Xss-Protection: 0 "loadBalancingScheme": "EXTERNAL", "name": "computeregionalforwardingrule-${uniqueId}", "networkTier": "PREMIUM", + "region": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1", "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}", "target": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/targetVpnGateways/computetargetvpngateway-${uniqueId}" } @@ -705,42 +706,7 @@ X-Xss-Protection: 0 "insertTime": "2024-04-01T12:34:56.123456Z", "kind": "compute#operation", "name": "${operationID}", - "operationType": "SetLabels", - "progress": 0, - "region": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1", - "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/operations/${operationID}", - "startTime": "2024-04-01T12:34:56.123456Z", - "status": "RUNNING", - "targetId": "${forwardingRulesId}", - "targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}", - "user": "user@example.com" -} - ---- - -GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/operations/${operationID} -Content-Type: application/json -User-Agent: kcc/controller-manager -x-goog-request-params: project=${projectId}®ion=us-central1&operation=${operationID} - -200 OK -Cache-Control: private -Content-Type: application/json; charset=UTF-8 -Server: ESF -Vary: Origin -Vary: X-Origin -Vary: Referer -X-Content-Type-Options: nosniff -X-Frame-Options: SAMEORIGIN -X-Xss-Protection: 0 - -{ - "endTime": "2024-04-01T12:34:56.123456Z", - "id": "000000000000000000000", - "insertTime": "2024-04-01T12:34:56.123456Z", - "kind": "compute#operation", - "name": "${operationID}", - "operationType": "SetLabels", + "operationType": "setLabels", "progress": 100, "region": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1", "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/operations/${operationID}", @@ -786,6 +752,7 @@ X-Xss-Protection: 0 "loadBalancingScheme": "EXTERNAL", "name": "computeregionalforwardingrule-${uniqueId}", "networkTier": "PREMIUM", + "region": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1", "selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}", "target": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/targetVpnGateways/computetargetvpngateway-${uniqueId}" }