-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
147 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ func (s *RegionalForwardingRulesV1) Insert(ctx context.Context, req *pb.InsertFo | |
OperationType: PtrTo("insert"), | ||
User: PtrTo("[email protected]"), | ||
} | ||
return s.startGlobalLRO(ctx, name.Project.ID, op, func() (proto.Message, error) { | ||
return s.startRegionalLRO(ctx, name.Project.ID, name.Region, op, func() (proto.Message, error) { | ||
return obj, nil | ||
}) | ||
} | ||
|
@@ -134,7 +134,7 @@ func (s *RegionalForwardingRulesV1) Delete(ctx context.Context, req *pb.DeleteFo | |
OperationType: PtrTo("delete"), | ||
User: PtrTo("[email protected]"), | ||
} | ||
return s.startGlobalLRO(ctx, name.Project.ID, op, func() (proto.Message, error) { | ||
return s.startRegionalLRO(ctx, name.Project.ID, name.Region, op, func() (proto.Message, error) { | ||
return deleted, nil | ||
}) | ||
} | ||
|
@@ -166,7 +166,7 @@ func (s *RegionalForwardingRulesV1) SetLabels(ctx context.Context, req *pb.SetLa | |
// SetLabels operation has EndTime in response | ||
EndTime: PtrTo("2024-04-01T12:34:56.123456Z"), | ||
} | ||
return s.startGlobalLRO(ctx, name.Project.ID, op, func() (proto.Message, error) { | ||
return s.startRegionalLRO(ctx, name.Project.ID, name.Region, op, func() (proto.Message, error) { | ||
return obj, nil | ||
}) | ||
} | ||
|
@@ -196,7 +196,7 @@ func (s *RegionalForwardingRulesV1) SetTarget(ctx context.Context, req *pb.SetTa | |
OperationType: PtrTo("SetTarget"), | ||
User: PtrTo("[email protected]"), | ||
} | ||
return s.startGlobalLRO(ctx, name.Project.ID, op, func() (proto.Message, error) { | ||
return s.startRegionalLRO(ctx, name.Project.ID, name.Region, op, func() (proto.Message, error) { | ||
return obj, nil | ||
}) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -789,6 +789,40 @@ X-Xss-Protection: 0 | |
|
||
--- | ||
|
||
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": "insert", | ||
"progress": 100, | ||
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", | ||
"startTime": "2024-04-01T12:34:56.123456Z", | ||
"status": "DONE", | ||
"targetId": "${forwardingRulesId}", | ||
"targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/computeglobalforwardingrule-${uniqueId}", | ||
"user": "[email protected]" | ||
} | ||
|
||
--- | ||
|
||
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/global/forwardingRules/${forwardingRuleID} | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -551,7 +551,8 @@ X-Xss-Protection: 0 | |
"name": "${operationID}", | ||
"operationType": "insert", | ||
"progress": 0, | ||
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", | ||
"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}", | ||
|
@@ -561,6 +562,41 @@ X-Xss-Protection: 0 | |
|
||
--- | ||
|
||
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": "insert", | ||
"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}", | ||
"startTime": "2024-04-01T12:34:56.123456Z", | ||
"status": "DONE", | ||
"targetId": "${forwardingRulesId}", | ||
"targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}", | ||
"user": "[email protected]" | ||
} | ||
|
||
--- | ||
|
||
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/${forwardingRuleID} | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager | ||
|
@@ -633,7 +669,8 @@ X-Xss-Protection: 0 | |
"name": "${operationID}", | ||
"operationType": "SetLabels", | ||
"progress": 0, | ||
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", | ||
"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}", | ||
|
@@ -643,6 +680,41 @@ X-Xss-Protection: 0 | |
|
||
--- | ||
|
||
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", | ||
"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}", | ||
"startTime": "2024-04-01T12:34:56.123456Z", | ||
"status": "DONE", | ||
"targetId": "${forwardingRulesId}", | ||
"targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}", | ||
"user": "[email protected]" | ||
} | ||
|
||
--- | ||
|
||
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/${forwardingRuleID} | ||
Content-Type: application/json | ||
User-Agent: kcc/controller-manager | ||
|
@@ -705,7 +777,8 @@ X-Xss-Protection: 0 | |
"name": "${operationID}", | ||
"operationType": "delete", | ||
"progress": 0, | ||
"selfLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/global/operations/${operationID}", | ||
"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}", | ||
|
@@ -715,12 +788,12 @@ X-Xss-Protection: 0 | |
|
||
--- | ||
|
||
GET https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/${forwardingRuleID} | ||
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&forwarding_rule=computeregionalforwardingrule-${uniqueId} | ||
x-goog-request-params: project=${projectId}®ion=us-central1&operation=${operationID} | ||
|
||
404 Not Found | ||
200 OK | ||
Cache-Control: private | ||
Content-Type: application/json; charset=UTF-8 | ||
Server: ESF | ||
|
@@ -732,17 +805,20 @@ X-Frame-Options: SAMEORIGIN | |
X-Xss-Protection: 0 | ||
|
||
{ | ||
"error": { | ||
"code": 404, | ||
"errors": [ | ||
{ | ||
"domain": "global", | ||
"message": "forwardingRule \"projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}\" not found", | ||
"reason": "notFound" | ||
} | ||
], | ||
"message": "forwardingRule \"projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}\" not found" | ||
} | ||
"endTime": "2024-04-01T12:34:56.123456Z", | ||
"id": "000000000000000000000", | ||
"insertTime": "2024-04-01T12:34:56.123456Z", | ||
"kind": "compute#operation", | ||
"name": "${operationID}", | ||
"operationType": "delete", | ||
"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}", | ||
"startTime": "2024-04-01T12:34:56.123456Z", | ||
"status": "DONE", | ||
"targetId": "${forwardingRulesId}", | ||
"targetLink": "https://www.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/forwardingRules/computeregionalforwardingrule-${uniqueId}", | ||
"user": "[email protected]" | ||
} | ||
|
||
--- | ||
|