-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5335 from jlamillan/jlamillan/oci-provider-fail-f…
…ast-capacity oci provider: fail fast, recover fast, when instance-pool/node-group is out of capacity
- Loading branch information
Showing
17 changed files
with
1,273 additions
and
37 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
...scaler/cloudprovider/oci/oci-go-sdk/v43/workrequests/get_work_request_request_response.go
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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. | ||
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
// Code generated. DO NOT EDIT. | ||
|
||
package workrequests | ||
|
||
import ( | ||
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/oci-go-sdk/v43/common" | ||
"net/http" | ||
) | ||
|
||
// GetWorkRequestRequest wrapper for the GetWorkRequest operation | ||
// | ||
// # See also | ||
// | ||
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/workrequests/GetWorkRequest.go.html to see an example of how to use GetWorkRequestRequest. | ||
type GetWorkRequestRequest struct { | ||
|
||
// The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. | ||
WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` | ||
|
||
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a | ||
// particular request, please provide the request ID. | ||
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` | ||
|
||
// Metadata about the request. This information will not be transmitted to the service, but | ||
// represents information that the SDK will consume to drive retry behavior. | ||
RequestMetadata common.RequestMetadata | ||
} | ||
|
||
func (request GetWorkRequestRequest) String() string { | ||
return common.PointerString(request) | ||
} | ||
|
||
// HTTPRequest implements the OCIRequest interface | ||
func (request GetWorkRequestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser) (http.Request, error) { | ||
|
||
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) | ||
} | ||
|
||
// BinaryRequestBody implements the OCIRequest interface | ||
func (request GetWorkRequestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { | ||
|
||
return nil, false | ||
|
||
} | ||
|
||
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. | ||
func (request GetWorkRequestRequest) RetryPolicy() *common.RetryPolicy { | ||
return request.RequestMetadata.RetryPolicy | ||
} | ||
|
||
// GetWorkRequestResponse wrapper for the GetWorkRequest operation | ||
type GetWorkRequestResponse struct { | ||
|
||
// The underlying http response | ||
RawResponse *http.Response | ||
|
||
// The WorkRequest instance | ||
WorkRequest `presentIn:"body"` | ||
|
||
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a | ||
// particular request, please provide the request ID. | ||
OpcRequestId *string `presentIn:"header" name:"opc-request-id"` | ||
} | ||
|
||
func (response GetWorkRequestResponse) String() string { | ||
return common.PointerString(response) | ||
} | ||
|
||
// HTTPResponse implements the OCIResponse interface | ||
func (response GetWorkRequestResponse) HTTPResponse() *http.Response { | ||
return response.RawResponse | ||
} |
115 changes: 115 additions & 0 deletions
115
...loudprovider/oci/oci-go-sdk/v43/workrequests/list_work_request_errors_request_response.go
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 |
---|---|---|
@@ -0,0 +1,115 @@ | ||
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. | ||
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
// Code generated. DO NOT EDIT. | ||
|
||
package workrequests | ||
|
||
import ( | ||
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/oci-go-sdk/v43/common" | ||
"net/http" | ||
) | ||
|
||
// ListWorkRequestErrorsRequest wrapper for the ListWorkRequestErrors operation | ||
// | ||
// # See also | ||
// | ||
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/workrequests/ListWorkRequestErrors.go.html to see an example of how to use ListWorkRequestErrorsRequest. | ||
type ListWorkRequestErrorsRequest struct { | ||
|
||
// The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. | ||
WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` | ||
|
||
// For list pagination. The maximum number of results per page, or items to return in a | ||
// paginated "List" call. For important details about how pagination works, see | ||
// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). | ||
Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` | ||
|
||
// For list pagination. The value of the `opc-next-page` response header from the | ||
// previous "List" call. For important details about how pagination works, see | ||
// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). | ||
Page *string `mandatory:"false" contributesTo:"query" name:"page"` | ||
|
||
// The sort order to use, either ascending (`ASC`) or descending (`DESC`). | ||
SortOrder ListWorkRequestErrorsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` | ||
|
||
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a | ||
// particular request, please provide the request ID. | ||
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` | ||
|
||
// Metadata about the request. This information will not be transmitted to the service, but | ||
// represents information that the SDK will consume to drive retry behavior. | ||
RequestMetadata common.RequestMetadata | ||
} | ||
|
||
func (request ListWorkRequestErrorsRequest) String() string { | ||
return common.PointerString(request) | ||
} | ||
|
||
// HTTPRequest implements the OCIRequest interface | ||
func (request ListWorkRequestErrorsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser) (http.Request, error) { | ||
|
||
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) | ||
} | ||
|
||
// BinaryRequestBody implements the OCIRequest interface | ||
func (request ListWorkRequestErrorsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { | ||
|
||
return nil, false | ||
|
||
} | ||
|
||
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. | ||
func (request ListWorkRequestErrorsRequest) RetryPolicy() *common.RetryPolicy { | ||
return request.RequestMetadata.RetryPolicy | ||
} | ||
|
||
// ListWorkRequestErrorsResponse wrapper for the ListWorkRequestErrors operation | ||
type ListWorkRequestErrorsResponse struct { | ||
|
||
// The underlying http response | ||
RawResponse *http.Response | ||
|
||
// A list of []WorkRequestError instances | ||
Items []WorkRequestError `presentIn:"body"` | ||
|
||
// For list pagination. When this header appears in the response, additional pages of | ||
// results remain. For important details about how pagination works, see | ||
// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). | ||
OpcNextPage *string `presentIn:"header" name:"opc-next-page"` | ||
|
||
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a | ||
// particular request, please provide the request ID. | ||
OpcRequestId *string `presentIn:"header" name:"opc-request-id"` | ||
} | ||
|
||
func (response ListWorkRequestErrorsResponse) String() string { | ||
return common.PointerString(response) | ||
} | ||
|
||
// HTTPResponse implements the OCIResponse interface | ||
func (response ListWorkRequestErrorsResponse) HTTPResponse() *http.Response { | ||
return response.RawResponse | ||
} | ||
|
||
// ListWorkRequestErrorsSortOrderEnum Enum with underlying type: string | ||
type ListWorkRequestErrorsSortOrderEnum string | ||
|
||
// Set of constants representing the allowable values for ListWorkRequestErrorsSortOrderEnum | ||
const ( | ||
ListWorkRequestErrorsSortOrderAsc ListWorkRequestErrorsSortOrderEnum = "ASC" | ||
ListWorkRequestErrorsSortOrderDesc ListWorkRequestErrorsSortOrderEnum = "DESC" | ||
) | ||
|
||
var mappingListWorkRequestErrorsSortOrder = map[string]ListWorkRequestErrorsSortOrderEnum{ | ||
"ASC": ListWorkRequestErrorsSortOrderAsc, | ||
"DESC": ListWorkRequestErrorsSortOrderDesc, | ||
} | ||
|
||
// GetListWorkRequestErrorsSortOrderEnumValues Enumerates the set of values for ListWorkRequestErrorsSortOrderEnum | ||
func GetListWorkRequestErrorsSortOrderEnumValues() []ListWorkRequestErrorsSortOrderEnum { | ||
values := make([]ListWorkRequestErrorsSortOrderEnum, 0) | ||
for _, v := range mappingListWorkRequestErrorsSortOrder { | ||
values = append(values, v) | ||
} | ||
return values | ||
} |
115 changes: 115 additions & 0 deletions
115
.../cloudprovider/oci/oci-go-sdk/v43/workrequests/list_work_request_logs_request_response.go
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 |
---|---|---|
@@ -0,0 +1,115 @@ | ||
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. | ||
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
// Code generated. DO NOT EDIT. | ||
|
||
package workrequests | ||
|
||
import ( | ||
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/oci-go-sdk/v43/common" | ||
"net/http" | ||
) | ||
|
||
// ListWorkRequestLogsRequest wrapper for the ListWorkRequestLogs operation | ||
// | ||
// # See also | ||
// | ||
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/workrequests/ListWorkRequestLogs.go.html to see an example of how to use ListWorkRequestLogsRequest. | ||
type ListWorkRequestLogsRequest struct { | ||
|
||
// The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. | ||
WorkRequestId *string `mandatory:"true" contributesTo:"path" name:"workRequestId"` | ||
|
||
// For list pagination. The maximum number of results per page, or items to return in a | ||
// paginated "List" call. For important details about how pagination works, see | ||
// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). | ||
Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` | ||
|
||
// For list pagination. The value of the `opc-next-page` response header from the | ||
// previous "List" call. For important details about how pagination works, see | ||
// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). | ||
Page *string `mandatory:"false" contributesTo:"query" name:"page"` | ||
|
||
// The sort order to use, either ascending (`ASC`) or descending (`DESC`). | ||
SortOrder ListWorkRequestLogsSortOrderEnum `mandatory:"false" contributesTo:"query" name:"sortOrder" omitEmpty:"true"` | ||
|
||
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a | ||
// particular request, please provide the request ID. | ||
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` | ||
|
||
// Metadata about the request. This information will not be transmitted to the service, but | ||
// represents information that the SDK will consume to drive retry behavior. | ||
RequestMetadata common.RequestMetadata | ||
} | ||
|
||
func (request ListWorkRequestLogsRequest) String() string { | ||
return common.PointerString(request) | ||
} | ||
|
||
// HTTPRequest implements the OCIRequest interface | ||
func (request ListWorkRequestLogsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser) (http.Request, error) { | ||
|
||
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) | ||
} | ||
|
||
// BinaryRequestBody implements the OCIRequest interface | ||
func (request ListWorkRequestLogsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { | ||
|
||
return nil, false | ||
|
||
} | ||
|
||
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. | ||
func (request ListWorkRequestLogsRequest) RetryPolicy() *common.RetryPolicy { | ||
return request.RequestMetadata.RetryPolicy | ||
} | ||
|
||
// ListWorkRequestLogsResponse wrapper for the ListWorkRequestLogs operation | ||
type ListWorkRequestLogsResponse struct { | ||
|
||
// The underlying http response | ||
RawResponse *http.Response | ||
|
||
// A list of []WorkRequestLogEntry instances | ||
Items []WorkRequestLogEntry `presentIn:"body"` | ||
|
||
// For list pagination. When this header appears in the response, additional pages of | ||
// results remain. For important details about how pagination works, see | ||
// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). | ||
OpcNextPage *string `presentIn:"header" name:"opc-next-page"` | ||
|
||
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a | ||
// particular request, please provide the request ID. | ||
OpcRequestId *string `presentIn:"header" name:"opc-request-id"` | ||
} | ||
|
||
func (response ListWorkRequestLogsResponse) String() string { | ||
return common.PointerString(response) | ||
} | ||
|
||
// HTTPResponse implements the OCIResponse interface | ||
func (response ListWorkRequestLogsResponse) HTTPResponse() *http.Response { | ||
return response.RawResponse | ||
} | ||
|
||
// ListWorkRequestLogsSortOrderEnum Enum with underlying type: string | ||
type ListWorkRequestLogsSortOrderEnum string | ||
|
||
// Set of constants representing the allowable values for ListWorkRequestLogsSortOrderEnum | ||
const ( | ||
ListWorkRequestLogsSortOrderAsc ListWorkRequestLogsSortOrderEnum = "ASC" | ||
ListWorkRequestLogsSortOrderDesc ListWorkRequestLogsSortOrderEnum = "DESC" | ||
) | ||
|
||
var mappingListWorkRequestLogsSortOrder = map[string]ListWorkRequestLogsSortOrderEnum{ | ||
"ASC": ListWorkRequestLogsSortOrderAsc, | ||
"DESC": ListWorkRequestLogsSortOrderDesc, | ||
} | ||
|
||
// GetListWorkRequestLogsSortOrderEnumValues Enumerates the set of values for ListWorkRequestLogsSortOrderEnum | ||
func GetListWorkRequestLogsSortOrderEnumValues() []ListWorkRequestLogsSortOrderEnum { | ||
values := make([]ListWorkRequestLogsSortOrderEnum, 0) | ||
for _, v := range mappingListWorkRequestLogsSortOrder { | ||
values = append(values, v) | ||
} | ||
return values | ||
} |
92 changes: 92 additions & 0 deletions
92
...aler/cloudprovider/oci/oci-go-sdk/v43/workrequests/list_work_requests_request_response.go
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
// Copyright (c) 2016, 2018, 2021, Oracle and/or its affiliates. All rights reserved. | ||
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
// Code generated. DO NOT EDIT. | ||
|
||
package workrequests | ||
|
||
import ( | ||
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/oci-go-sdk/v43/common" | ||
"net/http" | ||
) | ||
|
||
// ListWorkRequestsRequest wrapper for the ListWorkRequests operation | ||
// | ||
// # See also | ||
// | ||
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/workrequests/ListWorkRequests.go.html to see an example of how to use ListWorkRequestsRequest. | ||
type ListWorkRequestsRequest struct { | ||
|
||
// The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. | ||
CompartmentId *string `mandatory:"true" contributesTo:"query" name:"compartmentId"` | ||
|
||
// The OCID (https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the resource. | ||
ResourceId *string `mandatory:"false" contributesTo:"query" name:"resourceId"` | ||
|
||
// For list pagination. The maximum number of results per page, or items to return in a | ||
// paginated "List" call. For important details about how pagination works, see | ||
// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). | ||
Limit *int `mandatory:"false" contributesTo:"query" name:"limit"` | ||
|
||
// For list pagination. The value of the `opc-next-page` response header from the | ||
// previous "List" call. For important details about how pagination works, see | ||
// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). | ||
Page *string `mandatory:"false" contributesTo:"query" name:"page"` | ||
|
||
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a | ||
// particular request, please provide the request ID. | ||
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` | ||
|
||
// Metadata about the request. This information will not be transmitted to the service, but | ||
// represents information that the SDK will consume to drive retry behavior. | ||
RequestMetadata common.RequestMetadata | ||
} | ||
|
||
func (request ListWorkRequestsRequest) String() string { | ||
return common.PointerString(request) | ||
} | ||
|
||
// HTTPRequest implements the OCIRequest interface | ||
func (request ListWorkRequestsRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser) (http.Request, error) { | ||
|
||
return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) | ||
} | ||
|
||
// BinaryRequestBody implements the OCIRequest interface | ||
func (request ListWorkRequestsRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { | ||
|
||
return nil, false | ||
|
||
} | ||
|
||
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. | ||
func (request ListWorkRequestsRequest) RetryPolicy() *common.RetryPolicy { | ||
return request.RequestMetadata.RetryPolicy | ||
} | ||
|
||
// ListWorkRequestsResponse wrapper for the ListWorkRequests operation | ||
type ListWorkRequestsResponse struct { | ||
|
||
// The underlying http response | ||
RawResponse *http.Response | ||
|
||
// A list of []WorkRequestSummary instances | ||
Items []WorkRequestSummary `presentIn:"body"` | ||
|
||
// For list pagination. When this header appears in the response, additional pages of | ||
// results remain. For important details about how pagination works, see | ||
// List Pagination (https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). | ||
OpcNextPage *string `presentIn:"header" name:"opc-next-page"` | ||
|
||
// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a | ||
// particular request, please provide the request ID. | ||
OpcRequestId *string `presentIn:"header" name:"opc-request-id"` | ||
} | ||
|
||
func (response ListWorkRequestsResponse) String() string { | ||
return common.PointerString(response) | ||
} | ||
|
||
// HTTPResponse implements the OCIResponse interface | ||
func (response ListWorkRequestsResponse) HTTPResponse() *http.Response { | ||
return response.RawResponse | ||
} |
Oops, something went wrong.