Skip to content

Commit

Permalink
Operation polling now supports custom endpoints (GoogleCloudPlatform#…
Browse files Browse the repository at this point in the history
…5610)

* Operation polling now supports custom endpoints

* Operation polling now supports custom endpoints

* Operation polling now supports custom endpoints
  • Loading branch information
smithson-google authored and lcaggio committed Mar 16, 2022
1 parent 772cad9 commit 0f1989c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmv1/templates/terraform/operation.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (w *<%= product_name -%>OperationWaiter) QueryOp() (interface{}, error) {
return nil, fmt.Errorf("Cannot query operation, it's unset or nil.")
}
// Returns the proper get.
url := fmt.Sprintf("<%= [object.__product.base_url, async.operation.base_url].flatten.join.gsub('{{op_id}}', '%s') -%>", w.CommonOperationWaiter.Op.Name)
url := fmt.Sprintf("%s<%= [async.operation.base_url].flatten.join.gsub('{{op_id}}', '%s')-%>", w.Config.<%= product_name -%>BasePath, w.CommonOperationWaiter.Op.Name)

return sendRequest(w.Config, "GET", <% if has_project %>w.Project<% else %>""<% end %>, url, w.UserAgent, nil<%= object.error_retry_predicates ? ", " + object.error_retry_predicates.join(',') : "" -%>)
}
Expand Down

0 comments on commit 0f1989c

Please sign in to comment.