diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.terraform.tfstate.lock.info b/.terraform.tfstate.lock.info new file mode 100644 index 0000000..f69078b --- /dev/null +++ b/.terraform.tfstate.lock.info @@ -0,0 +1 @@ +{"ID":"ce8a6c85-724a-2103-76d4-17478b531b03","Operation":"OperationTypeApply","Info":"","Who":"duy@duy-ThinkPad-T460","Version":"1.3.5","Created":"2023-02-08T09:12:08.869515269Z","Path":"terraform.tfstate"} \ No newline at end of file diff --git a/build.sh b/build.sh index a1e9d59..646bda0 100755 --- a/build.sh +++ b/build.sh @@ -1,10 +1,10 @@ #bin/bash -export TF_LOG=debug +#export TF_LOG=debug rm -rf .terraform rm -r .terraform.lock.hcl go build -o terraform-provider-vngcloud #OS_ARCH="$(go env GOHOSTOS)_$(go env GOHOSTARCH)" -OS_ARCH="darwin_amd64" +OS_ARCH="linux_amd64" echo $OS_ARCH #rm -rf ~/.terraform.d/plugins/vngcloud.vn/terraform/vngcloud/0.2 #mkdir -p ~/.terraform.d/plugins/vngcloud.vn/terraform/vngcloud/0.2/$OS_ARCH @@ -12,5 +12,5 @@ echo $OS_ARCH rm -rf ~/.terraform.d/plugins/registry.terraform.tunm4/vngcloud/vngcloud/0.2 mkdir -p ~/.terraform.d/plugins/registry.terraform.tunm4/vngcloud/vngcloud/0.2/$OS_ARCH mv terraform-provider-vngcloud ~/.terraform.d/plugins/registry.terraform.tunm4/vngcloud/vngcloud/0.2/$OS_ARCH -# terraform init -# terraform apply \ No newline at end of file +#terraform init +#terraform apply \ No newline at end of file diff --git a/client/vserver/api_bandwidth_controller.go b/client/vserver/api_bandwidth_controller.go new file mode 100644 index 0000000..c608c64 --- /dev/null +++ b/client/vserver/api_bandwidth_controller.go @@ -0,0 +1,907 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type BandwidthControllerApiService service + +/* +BandwidthControllerApiService Change type bandwidth + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param changeTypeBandwidthRequest changeTypeBandwidthRequest + - @param projectId The project id + +@return BandwidthResponse +*/ +func (a *BandwidthControllerApiService) ChangeTypeBandwidthUsingPUT(ctx context.Context, changeTypeBandwidthRequest ChangeTypeBandwidthRequest, projectId string) (BandwidthResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue BandwidthResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/{project_id}/bandwidth/change-type" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &changeTypeBandwidthRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v BandwidthResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +BandwidthControllerApiService Create bandwidth + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createBandwidthRequest createBandwidthRequest + - @param projectId The project id + +@return BandwidthResponse +*/ +func (a *BandwidthControllerApiService) CreateBandwidthUsingPOST(ctx context.Context, createBandwidthRequest CreateBandwidthRequest, projectId string) (BandwidthResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue BandwidthResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/{project_id}/bandwidth" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &createBandwidthRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v BandwidthResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +BandwidthControllerApiService Delete bandwidth + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param deleteBandwidthRequest deleteBandwidthRequest + - @param projectId The project id + +@return BaseResponse +*/ +func (a *BandwidthControllerApiService) DeleteBandwidthUsingDELETE(ctx context.Context, deleteBandwidthRequest DeleteBandwidthRequest, projectId string) (BaseResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue BaseResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/{project_id}/bandwidth" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &deleteBandwidthRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v BaseResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +BandwidthControllerApiService Get Bandwidth + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + - @param uuid The bandwidth id + +@return BandwidthResponse +*/ +func (a *BandwidthControllerApiService) GetBandwidthUsingGET(ctx context.Context, projectId string, uuid string) (BandwidthResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue BandwidthResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/{project_id}/bandwidth/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v BandwidthResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +BandwidthControllerApiService List all traffic + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + +@return BandwidthTrafficResponse +*/ +func (a *BandwidthControllerApiService) ListAllTrafficUsingGET(ctx context.Context, projectId string) (BandwidthTrafficResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue BandwidthTrafficResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/{project_id}/bandwidth/traffic" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v BandwidthTrafficResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +BandwidthControllerApiService List Bandwidths + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + +@return BandwidthResponse +*/ +func (a *BandwidthControllerApiService) ListBandwidthsUsingGET(ctx context.Context, projectId string) (BandwidthResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue BandwidthResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/{project_id}/bandwidth" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v BandwidthResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +BandwidthControllerApiService List Bandwidth Packages + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + +@return BandwidthPackageResponse +*/ +func (a *BandwidthControllerApiService) ListPackagesUsingGET(ctx context.Context, projectId string) (BandwidthPackageResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue BandwidthPackageResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/{project_id}/bandwidth/packages" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v BandwidthPackageResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +BandwidthControllerApiService List resource IPs + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param listResourceIpRequest listResourceIpRequest + - @param projectId The project id + +@return BandwidthResourceIpResponse +*/ +func (a *BandwidthControllerApiService) ListResourceIpsUsingGET(ctx context.Context, listResourceIpRequest ListResourceIpRequest, projectId string) (BandwidthResourceIpResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue BandwidthResourceIpResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/{project_id}/bandwidth/IP" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &listResourceIpRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v BandwidthResourceIpResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +BandwidthControllerApiService Recover bandwidth + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + - @param recoverBandwidthRequest recoverBandwidthRequest + +@return BandwidthResponse +*/ +func (a *BandwidthControllerApiService) RecoverBandwidthUsingPUT(ctx context.Context, projectId string, recoverBandwidthRequest RecoverBandwidthRequest) (BandwidthResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue BandwidthResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/{project_id}/bandwidth/recover" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &recoverBandwidthRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v BandwidthResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +BandwidthControllerApiService Renew bandwidth + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + - @param renewBandwidthRequest renewBandwidthRequest + +@return BaseResponse +*/ +func (a *BandwidthControllerApiService) RenewBandwidthUsingPUT(ctx context.Context, projectId string, renewBandwidthRequest RenewBandwidthRequest) (BaseResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue BaseResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v1/{project_id}/bandwidth/renew" + localVarPath = strings.Replace(localVarPath, "{"+"project_id"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &renewBandwidthRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v BaseResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/client/vserver/api_ca_rest_controller_v2.go b/client/vserver/api_ca_rest_controller_v2.go new file mode 100644 index 0000000..7cd68ca --- /dev/null +++ b/client/vserver/api_ca_rest_controller_v2.go @@ -0,0 +1,281 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "bytes" + "context" + "fmt" + "github.com/antihax/optional" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type CaRestControllerV2ApiService service + +/* +CaRestControllerV2ApiService Delete Certificate Authority + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param caId The ca id + - @param projectId The project id +*/ +func (a *CaRestControllerV2ApiService) DeleteCertificateAuthorityUsingDELETE(ctx context.Context, caId string, projectId string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/cas/{caId}" + localVarPath = strings.Replace(localVarPath, "{"+"caId"+"}", fmt.Sprintf("%v", caId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +CaRestControllerV2ApiService List All Certificate Authority + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param projectId project id + * @param optional nil or *CaRestControllerV2ApiGetAllListCertificateAuthorityUsingGETOpts - Optional Parameters: + * @param "Name" (optional.String) - name + +@return PagingCaDto +*/ + +type CaRestControllerV2ApiGetAllListCertificateAuthorityUsingGETOpts struct { + Name optional.String +} + +func (a *CaRestControllerV2ApiService) GetAllListCertificateAuthorityUsingGET(ctx context.Context, projectId string, localVarOptionals *CaRestControllerV2ApiGetAllListCertificateAuthorityUsingGETOpts) (PagingCaDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue PagingCaDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/cas" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Name.IsSet() { + localVarQueryParams.Add("name", parameterToString(localVarOptionals.Name.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v PagingCaDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +CaRestControllerV2ApiService Import Certificate Authority + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param importCARequest importCARequest + - @param projectId The project id + +@return DataResponseCaDto +*/ +func (a *CaRestControllerV2ApiService) ImportCAUsingPOST(ctx context.Context, importCARequest ImportCaRequest, projectId string) (DataResponseCaDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseCaDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/cas" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &importCARequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v DataResponseCaDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/client/vserver/api_k8_s_cluster_rest_controller_v2.go b/client/vserver/api_k8_s_cluster_rest_controller_v2.go index 31dee72..b979990 100644 --- a/client/vserver/api_k8_s_cluster_rest_controller_v2.go +++ b/client/vserver/api_k8_s_cluster_rest_controller_v2.go @@ -3,7 +3,7 @@ * * Api Documentation * - * API version: 1.0.2 + * API version: 1.0.5 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ @@ -28,30 +28,202 @@ var ( type K8SClusterRestControllerV2ApiService service /* -K8SClusterRestControllerV2ApiService List cluster - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param projectId The project id - * @param optional nil or *K8SClusterRestControllerV2ApiListClusterUsingGETOpts - Optional Parameters: - * @param "Name" (optional.String) - name - * @param "Page" (optional.Int32) - page - * @param "Size" (optional.Int32) - size +K8SClusterRestControllerV2ApiService Attach Load Balancer + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param attachToLoadBalancerBackendRequest attachToLoadBalancerBackendRequest + - @param clusterId The cluster id + - @param projectId The project id -@return PagingInterfaceK8SClusterDetail +@return DataResponseSimpleServerTaskDto */ +func (a *K8SClusterRestControllerV2ApiService) AttachToLbUsingPOST(ctx context.Context, attachToLoadBalancerBackendRequest AttachToLoadBalancerBackendRequest, clusterId string, projectId string) (DataResponseSimpleServerTaskDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseSimpleServerTaskDto + ) -type K8SClusterRestControllerV2ApiListClusterUsingGETOpts struct { - Name optional.String - Page optional.Int32 - Size optional.Int32 + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/attach-load-balancer" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &attachToLoadBalancerBackendRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseSimpleServerTaskDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil } -func (a *K8SClusterRestControllerV2ApiService) ListClusterUsingGET(ctx context.Context, projectId string, localVarOptionals *K8SClusterRestControllerV2ApiListClusterUsingGETOpts) (PagingInterfaceK8SClusterDetail, *http.Response, error) { +/* +K8SClusterRestControllerV2ApiService Create Cluster Node Group + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param createNodeGroupBackendRequest createNodeGroupBackendRequest + - @param projectId The project id + +@return DataResponseClusterNodeGroupDto +*/ +func (a *K8SClusterRestControllerV2ApiService) CreateClusterNodeGroupUsingPOST(ctx context.Context, clusterId string, createNodeGroupBackendRequest CreateNodeGroupBackendRequest, projectId string) (DataResponseClusterNodeGroupDto, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Get") + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseClusterNodeGroupDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/cluster-node-groups" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &createNodeGroupBackendRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 202 { + var v DataResponseClusterNodeGroupDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Create cluster + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createClusterRequest createClusterRequest + - @param projectId The project Id + +@return DataResponseClusterDto +*/ +func (a *K8SClusterRestControllerV2ApiService) CreateClusterUsingPOST(ctx context.Context, createClusterRequest CreateClusterRequest, projectId string) (DataResponseClusterDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - localVarReturnValue PagingInterfaceK8SClusterDetail + localVarReturnValue DataResponseClusterDto ) // create path and map variables @@ -62,15 +234,96 @@ func (a *K8SClusterRestControllerV2ApiService) ListClusterUsingGET(ctx context.C localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if localVarOptionals != nil && localVarOptionals.Name.IsSet() { - localVarQueryParams.Add("name", parameterToString(localVarOptionals.Name.Value(), "")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } - if localVarOptionals != nil && localVarOptionals.Page.IsSet() { - localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), "")) + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept } - if localVarOptionals != nil && localVarOptionals.Size.IsSet() { - localVarQueryParams.Add("size", parameterToString(localVarOptionals.Size.Value(), "")) + // body params + localVarPostBody = &createClusterRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 202 { + var v DataResponseClusterDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Delete Cluster Node Group + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param nodeGroupId The cluster node group id + - @param projectId The project id + +@return DataResponseClusterNodeGroupDto +*/ +func (a *K8SClusterRestControllerV2ApiService) DeleteClusterNodeGroupUsingDELETE(ctx context.Context, nodeGroupId string, projectId string) (DataResponseClusterNodeGroupDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseClusterNodeGroupDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/cluster-node-groups/{nodeGroupId}" + localVarPath = strings.Replace(localVarPath, "{"+"nodeGroupId"+"}", fmt.Sprintf("%v", nodeGroupId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + // to determine the Content-Type header localVarHttpContentTypes := []string{} @@ -117,7 +370,2223 @@ func (a *K8SClusterRestControllerV2ApiService) ListClusterUsingGET(ctx context.C } if localVarHttpResponse.StatusCode == 200 { - var v PagingInterfaceK8SClusterDetail + var v DataResponseClusterNodeGroupDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Delete Cluster + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param projectId The project id + +@return DataResponseClusterDto +*/ +func (a *K8SClusterRestControllerV2ApiService) DeleteClusterUsingDELETE(ctx context.Context, clusterId string, projectId string) (DataResponseClusterDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseClusterDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseClusterDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Get Cluster Node Group + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param nodegroupId The node group id + - @param projectId The project id + +@return ClusterNodeGroupDto +*/ +func (a *K8SClusterRestControllerV2ApiService) GetClusterNodeGroupUsingGET(ctx context.Context, nodegroupId string, projectId string) (DataResponseClusterNodeGroupDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseClusterNodeGroupDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/cluster-node-groups/{nodegroupId}" + localVarPath = strings.Replace(localVarPath, "{"+"nodegroupId"+"}", fmt.Sprintf("%v", nodegroupId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseClusterNodeGroupDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Get cluster + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param projectId The project Id + +@return DataResponseClusterDto +*/ +func (a *K8SClusterRestControllerV2ApiService) GetClusterUsingGET(ctx context.Context, clusterId string, projectId string) (DataResponseClusterDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseClusterDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseClusterDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Get Config + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param projectId The project id + +@return ClusterConfigResultDto +*/ +func (a *K8SClusterRestControllerV2ApiService) GetConfigUsingGET(ctx context.Context, clusterId string, projectId string) (ClusterConfigResultDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue ClusterConfigResultDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/config" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v ClusterConfigResultDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Get Console + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + - @param serverId The server id + +@return NodeConsoleResultDto +*/ +func (a *K8SClusterRestControllerV2ApiService) GetConsoleUsingGET(ctx context.Context, projectId string, serverId string) (NodeConsoleResultDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue NodeConsoleResultDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/nodes/{serverId}/console" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serverId"+"}", fmt.Sprintf("%v", serverId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v NodeConsoleResultDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService List K8s ETCD Package + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + +@return []K8SEtcdPackageEntity +*/ +func (a *K8SClusterRestControllerV2ApiService) GetEtcdPackageUsingGET(ctx context.Context, projectId string) ([]K8SEtcdPackageEntity, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []K8SEtcdPackageEntity + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/etcd-package" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []K8SEtcdPackageEntity + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Get Flavor Limit + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + +@return string +*/ +func (a *K8SClusterRestControllerV2ApiService) GetFlavorLimitUsingGET(ctx context.Context, projectId string) (string, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/flavor-limit" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v string + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Get K8s Config + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId the project id + +@return string +*/ +func (a *K8SClusterRestControllerV2ApiService) GetK8sConfigUsingGET(ctx context.Context, projectId string) (string, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/k8s-config" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v string + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Get K8s Default Flavor Id + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId the project id + +@return string +*/ +func (a *K8SClusterRestControllerV2ApiService) GetK8sDefaultFlavorIdUsingGET(ctx context.Context, projectId string) (string, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/k8s-default-flavor" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v string + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Get K8s Volume Config + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId the project id + +@return string +*/ +func (a *K8SClusterRestControllerV2ApiService) GetK8sVolumeConfigUsingGET(ctx context.Context, projectId string) (string, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/k8s-volume-config" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v string + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Get max node count + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project Id + +@return int32 +*/ +func (a *K8SClusterRestControllerV2ApiService) GetMaxNodeCountUsingGET(ctx context.Context, projectId string) (int32, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue int32 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/max-node-count" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v int32 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService List node + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param nodeGroupId The node group id + - @param projectId The project Ii + +@return []ClusterNodeDto +*/ +func (a *K8SClusterRestControllerV2ApiService) GetNodeByIdUsingGET(ctx context.Context, clusterId string, nodeGroupId string, projectId string) ([]ClusterNodeDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []ClusterNodeDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/nodes/{nodeGroupId}" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"nodeGroupId"+"}", fmt.Sprintf("%v", nodeGroupId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []ClusterNodeDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Get Server Task Status + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId the cluster id + - @param projectId the project id + - @param serverTaskId the server task id + +@return string +*/ +func (a *K8SClusterRestControllerV2ApiService) GetServerTaskStatusUsingGET(ctx context.Context, clusterId string, projectId string, serverTaskId string) (string, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/server-task/{serverTaskId}" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"serverTaskId"+"}", fmt.Sprintf("%v", serverTaskId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + //err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return string(localVarBody), localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v string + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService List Cluster Node Group + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param projectId The project id + +@return []SimpleClusterNodeGroupDto +*/ +func (a *K8SClusterRestControllerV2ApiService) ListClusterNodeGroupUsingGET(ctx context.Context, clusterId string, projectId string) ([]SimpleClusterNodeGroupDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []SimpleClusterNodeGroupDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/cluster-node-groups" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []SimpleClusterNodeGroupDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService List cluster pools + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param projectId The project id + +@return []ClusterPoolDto +*/ +func (a *K8SClusterRestControllerV2ApiService) ListClusterPoolByClusterUsingGET(ctx context.Context, clusterId string, projectId string) ([]ClusterPoolDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []ClusterPoolDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/pools" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []ClusterPoolDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService List cluster + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param projectId The project id + * @param optional nil or *K8SClusterRestControllerV2ApiListClusterUsingGETOpts - Optional Parameters: + * @param "Name" (optional.String) - name + * @param "Page" (optional.Int32) - page + * @param "Size" (optional.Int32) - size + +@return PagingClusterDto +*/ + +type K8SClusterRestControllerV2ApiListClusterUsingGETOpts struct { + Name optional.String + Page optional.Int32 + Size optional.Int32 +} + +func (a *K8SClusterRestControllerV2ApiService) ListClusterUsingGET(ctx context.Context, projectId string, localVarOptionals *K8SClusterRestControllerV2ApiListClusterUsingGETOpts) (PagingClusterDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue PagingClusterDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Name.IsSet() { + localVarQueryParams.Add("name", parameterToString(localVarOptionals.Name.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Page.IsSet() { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Size.IsSet() { + localVarQueryParams.Add("size", parameterToString(localVarOptionals.Size.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v PagingClusterDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService List K8s Networks Type + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project Id + +@return []K8sNetworkTypeDto +*/ +func (a *K8SClusterRestControllerV2ApiService) ListK8sNetworkTypeUsingGET(ctx context.Context, projectId string) ([]K8sNetworkTypeDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []K8sNetworkTypeDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/network-types" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []K8sNetworkTypeDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService List K8s Version + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project Id + +@return []K8sVersionDto +*/ +func (a *K8SClusterRestControllerV2ApiService) ListK8sVersionUsingGET(ctx context.Context, projectId string) ([]K8sVersionDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []K8sVersionDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/versions" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []K8sVersionDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService List node + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param projectId The project Id + +@return []ClusterNodeDto +*/ +func (a *K8SClusterRestControllerV2ApiService) ListNodeUsingGET(ctx context.Context, clusterId string, projectId string) ([]ClusterNodeDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []ClusterNodeDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/nodes" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []ClusterNodeDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Get Cluster Sec Group Detail + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param projectId The project id + - @param type_ The type + +@return []ClusterSecGroupDto +*/ +func (a *K8SClusterRestControllerV2ApiService) ListSecGroupUsingGET(ctx context.Context, clusterId string, projectId string, type_ bool) ([]ClusterSecGroupDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []ClusterSecGroupDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/sec-group/master/{type}" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"type"+"}", fmt.Sprintf("%v", type_), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []ClusterSecGroupDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService List Secgroup Default + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param projectId The project id + +@return []ClusterSecgroupDefault +*/ +func (a *K8SClusterRestControllerV2ApiService) ListSecgroupDefaultUsingGET(ctx context.Context, clusterId string, projectId string) ([]ClusterSecgroupDefault, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []ClusterSecgroupDefault + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/secgroups-default" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []ClusterSecgroupDefault + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService List volume + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param projectId The project id + +@return []ClusterVolumeDto +*/ +func (a *K8SClusterRestControllerV2ApiService) ListVolumeUsingGET3(ctx context.Context, clusterId string, projectId string) ([]ClusterVolumeDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []ClusterVolumeDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/volumes" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v []ClusterVolumeDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Scale Minion + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param clusterId The cluster id + - @param projectId The project id + - @param scaleMinionBackendRequest scaleMinionBackendRequest + +@return DataResponseSimpleServerTaskDto +*/ +func (a *K8SClusterRestControllerV2ApiService) ScaleMinionUsingPOST(ctx context.Context, clusterId string, projectId string, nodeGroupId string, scaleMinionBackendRequest ScaleMinionBackendRequest) (DataResponseSimpleServerTaskDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseSimpleServerTaskDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/scale-minion/{nodeGroupId}" + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"nodeGroupId"+"}", fmt.Sprintf("%v", nodeGroupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &scaleMinionBackendRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseSimpleServerTaskDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Update sec group + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + - @param updateClusterSecGroupRequest updateClusterSecGroupRequest + +@return DataResponseListClusterSecGroupDto +*/ +func (a *K8SClusterRestControllerV2ApiService) UpdateSecGroupUsingPUT(ctx context.Context, projectId string, clusterId string, updateClusterSecGroupRequest UpdateClusterSecGroupRequest) (DataResponseListClusterSecGroupDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseListClusterSecGroupDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/sec-group" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &updateClusterSecGroupRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseListClusterSecGroupDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +K8SClusterRestControllerV2ApiService Update Cluster Description + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + - @param updateClusterDescriptionRequest updateClusterDescriptionRequest + +@return DataResponseClusterDto +*/ +func (a *K8SClusterRestControllerV2ApiService) UpdateClusterDescriptionUsingPut(ctx context.Context, projectId string, clusterId string, updateClusterDescriptionRequest UpdateClusterDescriptionRequest) (DataResponseClusterDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseClusterDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/clusters/{clusterId}/description" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", fmt.Sprintf("%v", clusterId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &updateClusterDescriptionRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseListClusterSecGroupDto err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/client/vserver/api_load_balancer_listener_rest_controller_v2.go b/client/vserver/api_load_balancer_listener_rest_controller_v2.go new file mode 100644 index 0000000..217b775 --- /dev/null +++ b/client/vserver/api_load_balancer_listener_rest_controller_v2.go @@ -0,0 +1,307 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type LoadBalancerListenerRestControllerV2ApiService service + +/* +LoadBalancerListenerRestControllerV2ApiService Get list policies of a listener + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param authorization Access Token + - @param listenerId The listener id + - @param loadBalancerId The Load Balancer id + - @param portalUserId portal-user-id + - @param projectId The project id + +@return DataResponseListL7Policy +*/ +func (a *LoadBalancerListenerRestControllerV2ApiService) GetListL7PoliciesUsingGET(ctx context.Context, authorization string, listenerId string, loadBalancerId string, portalUserId int32, projectId string) (DataResponseListL7Policy, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseListL7Policy + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}/l7policies" + localVarPath = strings.Replace(localVarPath, "{"+"listenerId"+"}", fmt.Sprintf("%v", listenerId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", fmt.Sprintf("%v", loadBalancerId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseListL7Policy + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +LoadBalancerListenerRestControllerV2ApiService Get list of listeners of a Load Balancer + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param authorization Access Token + - @param loadBalancerId The Load Balancer id + - @param portalUserId portal-user-id + - @param projectId The project id + +@return DataResponseListListener +*/ +func (a *LoadBalancerListenerRestControllerV2ApiService) GetListListenersByLoadBalancerUsingGET(ctx context.Context, authorization string, loadBalancerId string, portalUserId int32, projectId string) (DataResponseListListener, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseListListener + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/loadBalancers/{loadBalancerId}/listeners" + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", fmt.Sprintf("%v", loadBalancerId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseListListener + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +LoadBalancerListenerRestControllerV2ApiService Get a specific listener + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param authorization Access Token + - @param listenerId The listener id + - @param loadBalancerId The Load Balancer id + - @param portalUserId portal-user-id + - @param projectId The project id + +@return DataResponseListener +*/ +func (a *LoadBalancerListenerRestControllerV2ApiService) GetListenersUsingGET(ctx context.Context, authorization string, listenerId string, loadBalancerId string, portalUserId int32, projectId string) (DataResponseListener, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseListener + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}" + localVarPath = strings.Replace(localVarPath, "{"+"listenerId"+"}", fmt.Sprintf("%v", listenerId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", fmt.Sprintf("%v", loadBalancerId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseListener + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/client/vserver/api_load_balancer_pool_rest_controller_v2.go b/client/vserver/api_load_balancer_pool_rest_controller_v2.go new file mode 100644 index 0000000..2cea727 --- /dev/null +++ b/client/vserver/api_load_balancer_pool_rest_controller_v2.go @@ -0,0 +1,305 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type LoadBalancerPoolRestControllerV2ApiService service + +/* +LoadBalancerPoolRestControllerV2ApiService Get the health monitor associated with a specific pool + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param authorization Access Token + - @param poolId pool id + - @param portalUserId portal-user-id + - @param projectId The project id + +@return DataResponseHealthMonitor +*/ +func (a *LoadBalancerPoolRestControllerV2ApiService) GetHealthMonitorFromPoolUsingGET(ctx context.Context, authorization string, poolId string, portalUserId int32, projectId string) (DataResponseHealthMonitor, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseHealthMonitor + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId}/healthMonitor" + localVarPath = strings.Replace(localVarPath, "{"+"pool_id"+"}", fmt.Sprintf("%v", poolId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseHealthMonitor + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +LoadBalancerPoolRestControllerV2ApiService Get list of pools of a load balancer + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param authorization Access Token + - @param loadBalancerId The Load Balancer id + - @param portalUserId portal-user-id + - @param projectId The project id + +@return DataResponseListPool +*/ +func (a *LoadBalancerPoolRestControllerV2ApiService) GetListPoolsUsingGET(ctx context.Context, authorization string, loadBalancerId string, portalUserId int32, projectId string) (DataResponseListPool, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseListPool + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/loadBalancers/{loadBalancerId}/pools" + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", fmt.Sprintf("%v", loadBalancerId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseListPool + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +LoadBalancerPoolRestControllerV2ApiService Get a specific pool + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param authorization Access Token + - @param loadBalancerId The Load Balancer id + - @param poolId The listener id + - @param portalUserId portal-user-id + - @param projectId The project id + +@return DataResponsePool +*/ +func (a *LoadBalancerPoolRestControllerV2ApiService) GetPoolUsingGET(ctx context.Context, authorization string, loadBalancerId string, poolId string, portalUserId int32, projectId string) (DataResponsePool, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponsePool + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId}" + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", fmt.Sprintf("%v", loadBalancerId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"poolId"+"}", fmt.Sprintf("%v", poolId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponsePool + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/client/vserver/api_load_balancer_rest_controller_v2.go b/client/vserver/api_load_balancer_rest_controller_v2.go new file mode 100644 index 0000000..ad62162 --- /dev/null +++ b/client/vserver/api_load_balancer_rest_controller_v2.go @@ -0,0 +1,395 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type LoadBalancerRestControllerV2ApiService service + +/* +LoadBalancerRestControllerV2ApiService Get list headers + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param authorization Access Token + - @param portalUserId portal-user-id + - @param projectId project id + +@return DataResponseListstring +*/ +func (a *LoadBalancerRestControllerV2ApiService) GetHeadersUsingGET1(ctx context.Context, authorization string, portalUserId int32, projectId string) (DataResponseListstring, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseListstring + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/loadBalancers/headers" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseListstring + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +LoadBalancerRestControllerV2ApiService List LoadBalancers Paging + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param authorization Access Token + - @param name name + - @param page page + - @param portalUserId portal-user-id + - @param projectId project id + - @param size size + +@return PagingLoadBalancerDto +*/ +func (a *LoadBalancerRestControllerV2ApiService) GetListLoadBalancerWithPagingUsingGET(ctx context.Context, authorization string, name string, page string, portalUserId int32, projectId string, size string) (PagingLoadBalancerDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue PagingLoadBalancerDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/loadBalancers" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("name", parameterToString(name, "")) + localVarQueryParams.Add("page", parameterToString(page, "")) + localVarQueryParams.Add("size", parameterToString(size, "")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v PagingLoadBalancerDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +LoadBalancerRestControllerV2ApiService Load Balancer By Load Balancer Id + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param authorization Access Token + - @param loadBalancerId The load balancer id + - @param portalUserId portal-user-id + - @param projectId The project id + +@return DataResponseLoadBalancerDto +*/ +func (a *LoadBalancerRestControllerV2ApiService) GetLoadBalancerUsingGET1(ctx context.Context, authorization string, loadBalancerId string, portalUserId int32, projectId string) (DataResponseLoadBalancerDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseLoadBalancerDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/loadBalancers/{loadBalancerId}" + localVarPath = strings.Replace(localVarPath, "{"+"loadBalancerId"+"}", fmt.Sprintf("%v", loadBalancerId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseLoadBalancerDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +LoadBalancerRestControllerV2ApiService Get list packages + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param authorization Access Token + - @param portalUserId portal-user-id + - @param projectId The project id + +@return PagingLoadBalancerPackage +*/ +func (a *LoadBalancerRestControllerV2ApiService) GetPackagesUsingGET1(ctx context.Context, authorization string, portalUserId int32, projectId string) (PagingLoadBalancerPackage, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue PagingLoadBalancerPackage + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/loadBalancers/packages" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v PagingLoadBalancerPackage + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/client/vserver/api_network_acl_rest_controller_v2.go b/client/vserver/api_network_acl_rest_controller_v2.go new file mode 100644 index 0000000..ca1a5a1 --- /dev/null +++ b/client/vserver/api_network_acl_rest_controller_v2.go @@ -0,0 +1,634 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type NetworkAclRestControllerV2ApiService service + +/* +NetworkAclRestControllerV2ApiService Create Network-acl + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createNetworkAclRequest createNetworkAclRequest + - @param projectId The project id + +@return DataResponseNetworkAclDto +*/ +func (a *NetworkAclRestControllerV2ApiService) CreateNetworkAclUsingPOST1(ctx context.Context, createNetworkAclRequest CreateNetworkAclRequest, projectId string) (DataResponseNetworkAclDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseNetworkAclDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/policies" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &createNetworkAclRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v DataResponseNetworkAclDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +NetworkAclRestControllerV2ApiService Delete Network-acl + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param networkAclUuid The network-acl Uuid + - @param projectId The project id +*/ +func (a *NetworkAclRestControllerV2ApiService) DeleteNetworkAclUsingDELETE1(ctx context.Context, networkAclUuid string, projectId string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/policies/{networkAclUuid}" + localVarPath = strings.Replace(localVarPath, "{"+"networkAclUuid"+"}", fmt.Sprintf("%v", networkAclUuid), -1) + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +NetworkAclRestControllerV2ApiService Get Network-Acl Policy rules (inbound/outbound) by uuid + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + - @param uuid The network-acl uuid + +@return DataResponseListNetworkAclPolicyRuleDto +*/ +func (a *NetworkAclRestControllerV2ApiService) GetNetworkAclPolicyRulesUsingGET(ctx context.Context, projectId string, uuid string) (DataResponseListNetworkAclPolicyRuleDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseListNetworkAclPolicyRuleDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/policies/{uuid}/rules" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseListNetworkAclPolicyRuleDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +NetworkAclRestControllerV2ApiService Get Detail Network-Acl by uuid + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + - @param uuid The network-acl uuid + +@return DataResponseNetworkAclDetailDto +*/ +func (a *NetworkAclRestControllerV2ApiService) GetNetworkAclUsingGET1(ctx context.Context, projectId string, uuid string) (DataResponseNetworkAclDetailDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseNetworkAclDetailDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/policies/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseNetworkAclDetailDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +NetworkAclRestControllerV2ApiService List network-acl by project id and network acl uuid + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param name name + - @param page page + - @param projectId The project id + - @param size size + +@return PagingNetworkAclDto +*/ +func (a *NetworkAclRestControllerV2ApiService) GetNetworkAclsUsingGET(ctx context.Context, name string, page string, projectId string, size string) (PagingNetworkAclDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue PagingNetworkAclDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/policies/list" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("name", parameterToString(name, "")) + localVarQueryParams.Add("page", parameterToString(page, "")) + localVarQueryParams.Add("size", parameterToString(size, "")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v PagingNetworkAclDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +NetworkAclRestControllerV2ApiService Update associated Subnets ACL of Network-Acl + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + - @param updateSubnetsRequest updateSubnetsRequest + - @param uuid The network-acl uuid + +@return DataResponseNetworkAclDto +*/ +func (a *NetworkAclRestControllerV2ApiService) UpdateAssociatedSubnetsUsingPUT1(ctx context.Context, projectId string, updateSubnetsRequest UpdateNetworkAclSubnetsRequest, uuid string) (DataResponseNetworkAclDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseNetworkAclDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/policies/{uuid}/subnets" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &updateSubnetsRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseNetworkAclDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +NetworkAclRestControllerV2ApiService Update Inbound/Outbound Rules of Network-acl + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + - @param updateAclRulesRequest updateAclRulesRequest + - @param uuid The network-acl uuid + +@return DataResponseNetworkAclModel +*/ +func (a *NetworkAclRestControllerV2ApiService) UpdateRulesUsingPUT1(ctx context.Context, projectId string, updateAclRulesRequest UpdateNetworkAclRulesRequest, uuid string) (DataResponseNetworkAclModel, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseNetworkAclModel + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/policies/{uuid}/rules" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &updateAclRulesRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseNetworkAclModel + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/client/vserver/api_persistent_volume_rest_controller_v2.go b/client/vserver/api_persistent_volume_rest_controller_v2.go new file mode 100644 index 0000000..9b0a67d --- /dev/null +++ b/client/vserver/api_persistent_volume_rest_controller_v2.go @@ -0,0 +1,230 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "bytes" + "context" + "fmt" + "github.com/antihax/optional" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type PersistentVolumeRestControllerV2ApiService service + +/* +PersistentVolumeRestControllerV2ApiService Delete Persistent Volume + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param authorization Access Token + - @param portalUserId portal-user-id + - @param projectId The project id + - @param pvId The persistent volume id + +@return DataResponse +*/ +func (a *PersistentVolumeRestControllerV2ApiService) DeletePersistentVolumeUsingDELETE(ctx context.Context, authorization string, portalUserId int32, projectId string, pvId string) (DataResponse, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponse + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/persistent-volumes/{pvId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"pvId"+"}", fmt.Sprintf("%v", pvId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponse + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +PersistentVolumeRestControllerV2ApiService List Persistent Volume + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param authorization Access Token + * @param portalUserId portal-user-id + * @param projectId The project id + * @param optional nil or *PersistentVolumeRestControllerV2ApiListPersistentVolumeUsingGETOpts - Optional Parameters: + * @param "Name" (optional.String) - name + * @param "Page" (optional.Int32) - page + * @param "Size" (optional.Int32) - size + +@return PagingPersistentVolumeDto +*/ + +type PersistentVolumeRestControllerV2ApiListPersistentVolumeUsingGETOpts struct { + Name optional.String + Page optional.Int32 + Size optional.Int32 +} + +func (a *PersistentVolumeRestControllerV2ApiService) ListPersistentVolumeUsingGET(ctx context.Context, authorization string, portalUserId int32, projectId string, localVarOptionals *PersistentVolumeRestControllerV2ApiListPersistentVolumeUsingGETOpts) (PagingPersistentVolumeDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue PagingPersistentVolumeDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/persistent-volumes" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.Name.IsSet() { + localVarQueryParams.Add("name", parameterToString(localVarOptionals.Name.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Page.IsSet() { + localVarQueryParams.Add("page", parameterToString(localVarOptionals.Page.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.Size.IsSet() { + localVarQueryParams.Add("size", parameterToString(localVarOptionals.Size.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Authorization"] = parameterToString(authorization, "") + localVarHeaderParams["portal-user-id"] = parameterToString(portalUserId, "") + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v PagingPersistentVolumeDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/client/vserver/api_region_controller_v2.go b/client/vserver/api_region_controller_v2.go new file mode 100644 index 0000000..23f1f9d --- /dev/null +++ b/client/vserver/api_region_controller_v2.go @@ -0,0 +1,201 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type RegionControllerV2ApiService service + +/* +RegionControllerV2ApiService Get All Region + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId projectId + +@return DataResponseListRegionDto +*/ +func (a *RegionControllerV2ApiService) GetALlRegionUsingGET(ctx context.Context, projectId string) (DataResponseListRegionDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseListRegionDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/region" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseListRegionDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +RegionControllerV2ApiService Check userId belong to Region + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId projectId + - @param regionId regionId + +@return DataResponseboolean +*/ +func (a *RegionControllerV2ApiService) ListQuotaUsedUsingGET2(ctx context.Context, projectId string, regionId string) (DataResponseboolean, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseboolean + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/region/{regionId}/users/validation" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"regionId"+"}", fmt.Sprintf("%v", regionId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseboolean + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/client/vserver/api_route_table_rest_controller_v2.go b/client/vserver/api_route_table_rest_controller_v2.go new file mode 100644 index 0000000..cbe0aeb --- /dev/null +++ b/client/vserver/api_route_table_rest_controller_v2.go @@ -0,0 +1,543 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "bytes" + "context" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +// Linger please +var ( + _ context.Context +) + +type RouteTableRestControllerV2ApiService service + +/* +RouteTableRestControllerV2ApiService Create Route-table + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param createRouteTableRequest createRouteTableRequest + - @param projectId The project id + +@return DataResponseRouteTableDto +*/ +func (a *RouteTableRestControllerV2ApiService) CreateRouteTableUsingPOST1(ctx context.Context, createRouteTableRequest CreateRouteTableRequest, projectId string) (DataResponseRouteTableDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseRouteTableDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/route-table" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &createRouteTableRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 201 { + var v DataResponseRouteTableDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +RouteTableRestControllerV2ApiService Delete Route Table + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId projectId + - @param routeId routeId +*/ +func (a *RouteTableRestControllerV2ApiService) DeleteRouteTableUsingDELETE1(ctx context.Context, projectId string, routeId string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/route-table/{routeId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"routeId"+"}", fmt.Sprintf("%v", routeId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} + +/* +RouteTableRestControllerV2ApiService Get Route table by uuid + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId project id + - @param uuid The route-table uuid + +@return DataResponseRouteTableDto +*/ +func (a *RouteTableRestControllerV2ApiService) GetRouteTableUsingGET1(ctx context.Context, projectId string, uuid string) (DataResponseRouteTableDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseRouteTableDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/route-table/{uuid}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseRouteTableDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +RouteTableRestControllerV2ApiService List Route from Route-Table + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId projectId + - @param routeTableId routeTableId + +@return DataResponseListRoutesDto +*/ +func (a *RouteTableRestControllerV2ApiService) ListRouteTablesWithPagingUsingGET(ctx context.Context, projectId string, routeTableId string) (DataResponseListRoutesDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseListRoutesDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/route-table/route/{routeTableId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"routeTableId"+"}", fmt.Sprintf("%v", routeTableId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v DataResponseListRoutesDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +RouteTableRestControllerV2ApiService List Route Table V2 + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param name name + - @param page page + - @param projectId project id + - @param size size + +@return PagingRouteTableDto +*/ +func (a *RouteTableRestControllerV2ApiService) ListRouteTablesWithPagingUsingGET1(ctx context.Context, name string, page string, projectId string, size string) (PagingRouteTableDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue PagingRouteTableDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/route-table" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + localVarQueryParams.Add("name", parameterToString(name, "")) + localVarQueryParams.Add("page", parameterToString(page, "")) + localVarQueryParams.Add("size", parameterToString(size, "")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 200 { + var v PagingRouteTableDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} + +/* +RouteTableRestControllerV2ApiService Add or remove Route to Route-Table + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId The project id + - @param updateRouteRequest updateRouteRequest + - @param uuid The route-table uuid + +@return DataResponseRouteTableDto +*/ +func (a *RouteTableRestControllerV2ApiService) UpdateRouteTableDetailUsingPUT(ctx context.Context, projectId string, updateRouteRequest RouteTableUpdateRouteRequest, uuid string) (DataResponseRouteTableDto, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue DataResponseRouteTableDto + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/v2/{projectId}/route-table/{uuid}/routes" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", fmt.Sprintf("%v", projectId), -1) + localVarPath = strings.Replace(localVarPath, "{"+"uuid"+"}", fmt.Sprintf("%v", uuid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"*/*"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &updateRouteRequest + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + + if localVarHttpResponse.StatusCode == 202 { + var v DataResponseRouteTableDto + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} diff --git a/client/vserver/api_volume_type_rest_controller.go b/client/vserver/api_volume_type_rest_controller.go index 4f5bccc..14691bc 100644 --- a/client/vserver/api_volume_type_rest_controller.go +++ b/client/vserver/api_volume_type_rest_controller.go @@ -10,6 +10,7 @@ package vserver import ( + "bytes" "context" "fmt" "io/ioutil" @@ -27,9 +28,9 @@ type VolumeTypeRestControllerApiService service /* VolumeTypeRestControllerApiService getVolumeType - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param projectId project_id - * @param volumeTypeId volume_type_id + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId project_id + - @param volumeTypeId volume_type_id @return VolumeTypeResponse */ @@ -78,8 +79,8 @@ func (a *VolumeTypeRestControllerApiService) GetVolumeTypeUsingGET(ctx context.C return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHttpResponse, err } @@ -115,9 +116,9 @@ func (a *VolumeTypeRestControllerApiService) GetVolumeTypeUsingGET(ctx context.C /* VolumeTypeRestControllerApiService listVolumeType - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param projectId project_id - * @param volumeTypeZoneId volume_type_zone_id + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId project_id + - @param volumeTypeZoneId volume_type_zone_id @return VolumeTypeResponse */ @@ -166,8 +167,8 @@ func (a *VolumeTypeRestControllerApiService) ListVolumeTypeUsingGET(ctx context. return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHttpResponse, err } diff --git a/client/vserver/api_volume_type_zone_rest_controller.go b/client/vserver/api_volume_type_zone_rest_controller.go index ad7a226..17ce034 100644 --- a/client/vserver/api_volume_type_zone_rest_controller.go +++ b/client/vserver/api_volume_type_zone_rest_controller.go @@ -10,6 +10,7 @@ package vserver import ( + "bytes" "context" "fmt" "io/ioutil" @@ -27,9 +28,9 @@ type VolumeTypeZoneRestControllerApiService service /* VolumeTypeZoneRestControllerApiService getVolumeTypeZone - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param projectId project_id - * @param volumeTypeZoneId volume_type_zone_id + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId project_id + - @param volumeTypeZoneId volume_type_zone_id @return VolumeTypeZoneResponse */ @@ -78,8 +79,8 @@ func (a *VolumeTypeZoneRestControllerApiService) GetVolumeTypeZoneUsingGET(ctx c return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHttpResponse, err } @@ -115,8 +116,8 @@ func (a *VolumeTypeZoneRestControllerApiService) GetVolumeTypeZoneUsingGET(ctx c /* VolumeTypeZoneRestControllerApiService listVolumeTypeZone - * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - * @param projectId project_id + - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param projectId project_id @return VolumeTypeZoneResponse */ @@ -164,8 +165,8 @@ func (a *VolumeTypeZoneRestControllerApiService) ListVolumeTypeZoneUsingGET(ctx return localVarReturnValue, localVarHttpResponse, err } - localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) - localVarHttpResponse.Body.Close() + localVarBody, _ := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { return localVarReturnValue, localVarHttpResponse, err } diff --git a/client/vserver/client.go b/client/vserver/client.go index 7773caa..1adef60 100644 --- a/client/vserver/client.go +++ b/client/vserver/client.go @@ -3,7 +3,7 @@ * * Api Documentation * - * API version: 1.0 + * API version: 1.0.5 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ @@ -37,7 +37,7 @@ var ( xmlCheck = regexp.MustCompile("(?i:(?:application|text)/xml)") ) -// APIClient manages communication with the Api Documentation API v1.0 +// APIClient manages communication with the Api Documentation API v1.0.5 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration @@ -45,21 +45,41 @@ type APIClient struct { // API Services + AttachmentControllerApi *AttachmentControllerApiService + + BandwidthControllerApi *BandwidthControllerApiService + + CaRestControllerV2Api *CaRestControllerV2ApiService + + ElasticIpRestControllerV2Api *ElasticIpRestControllerV2ApiService + FlavorRestControllerApi *FlavorRestControllerApiService FlavorZoneRestControllerApi *FlavorZoneRestControllerApiService ImageRestControllerApi *ImageRestControllerApiService + K8SClusterRestControllerApi *K8SClusterRestControllerV2ApiService + + LoadBalancerListenerRestControllerApi *LoadBalancerListenerRestControllerV2ApiService + + LoadBalancerPoolRestControllerApi *LoadBalancerPoolRestControllerV2ApiService + LoadBalancerRestControllerApi *LoadBalancerRestControllerApiService - NetworkAclRestControllerApi *NetworkAclRestControllerApiService + NetworkAclRestControllerApi *NetworkAclRestControllerV2ApiService + + NetworkInterfaceElasticRestControllerApi *NetworkInterfaceElasticRestControllerV2ApiService NetworkRestControllerApi *NetworkRestControllerV2ApiService + PersistentVolumeRestControllerApi *PersistentVolumeRestControllerV2ApiService + ProjectRestControllerApi *ProjectRestControllerApiService - QuotaRestControllerApi *QuotaRestControllerApiService + ProtocolRestControllerApi *ProtocolRestControllerV2ApiService + + QuotaRestControllerApi *QuotaRestControllerV2ApiService RouteTableControllerApi *RouteTableControllerApiService @@ -75,11 +95,19 @@ type APIClient struct { SubnetRestControllerApi *SubnetRestControllerV2ApiService + UserImageRestControllerV2Api *UserImageRestControllerV2ApiService + + VirtualIpAddressRestControllerV2Api *VirtualIpAddressRestControllerV2ApiService + VolumeRestControllerApi *VolumeRestControllerV2ApiService VolumeTypeRestControllerApi *VolumeTypeRestControllerApiService VolumeTypeZoneRestControllerApi *VolumeTypeZoneRestControllerApiService + + VpcExternalCallbackControllerApi *VpcExternalCallbackControllerApiService + + WanIpRestControllerApi *WanIpRestControllerV2ApiService } type service struct { @@ -98,14 +126,25 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services + c.AttachmentControllerApi = (*AttachmentControllerApiService)(&c.common) + c.BandwidthControllerApi = (*BandwidthControllerApiService)(&c.common) + c.CaRestControllerV2Api = (*CaRestControllerV2ApiService)(&c.common) + c.ElasticIpRestControllerV2Api = (*ElasticIpRestControllerV2ApiService)(&c.common) c.FlavorRestControllerApi = (*FlavorRestControllerApiService)(&c.common) c.FlavorZoneRestControllerApi = (*FlavorZoneRestControllerApiService)(&c.common) c.ImageRestControllerApi = (*ImageRestControllerApiService)(&c.common) + c.K8SClusterRestControllerApi = (*K8SClusterRestControllerV2ApiService)(&c.common) + c.LoadBalancerListenerRestControllerApi = (*LoadBalancerListenerRestControllerV2ApiService)(&c.common) + c.LoadBalancerPoolRestControllerApi = (*LoadBalancerPoolRestControllerV2ApiService)(&c.common) c.LoadBalancerRestControllerApi = (*LoadBalancerRestControllerApiService)(&c.common) - c.NetworkAclRestControllerApi = (*NetworkAclRestControllerApiService)(&c.common) + c.NetworkAclRestControllerApi = (*NetworkAclRestControllerV2ApiService)(&c.common) + c.NetworkInterfaceElasticRestControllerApi = (*NetworkInterfaceElasticRestControllerV2ApiService)(&c.common) c.NetworkRestControllerApi = (*NetworkRestControllerV2ApiService)(&c.common) + c.PersistentVolumeRestControllerApi = (*PersistentVolumeRestControllerV2ApiService)(&c.common) c.ProjectRestControllerApi = (*ProjectRestControllerApiService)(&c.common) - c.QuotaRestControllerApi = (*QuotaRestControllerApiService)(&c.common) + c.ProtocolRestControllerApi = (*ProtocolRestControllerV2ApiService)(&c.common) + c.QuotaRestControllerApi = (*QuotaRestControllerV2ApiService)(&c.common) + c.QuotaRestControllerApi = (*QuotaRestControllerV2ApiService)(&c.common) c.RouteTableControllerApi = (*RouteTableControllerApiService)(&c.common) c.SecgroupRestControllerApi = (*SecgroupRestControllerV2ApiService)(&c.common) c.SecgroupRuleRestControllerApi = (*SecgroupRuleRestControllerV2ApiService)(&c.common) @@ -116,6 +155,8 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.VolumeRestControllerApi = (*VolumeRestControllerV2ApiService)(&c.common) c.VolumeTypeRestControllerApi = (*VolumeTypeRestControllerApiService)(&c.common) c.VolumeTypeZoneRestControllerApi = (*VolumeTypeZoneRestControllerApiService)(&c.common) + c.VpcExternalCallbackControllerApi = (*VpcExternalCallbackControllerApiService)(&c.common) + c.WanIpRestControllerApi = (*WanIpRestControllerV2ApiService)(&c.common) return c } diff --git a/client/vserver/configuration.go b/client/vserver/configuration.go index 57e54e5..4c49757 100644 --- a/client/vserver/configuration.go +++ b/client/vserver/configuration.go @@ -67,6 +67,16 @@ func NewConfiguration(BasePath string, HTTPClient *http.Client) *Configuration { } return cfg } + +// func NewConfiguration(BasePath string, HTTPClient *http.Client) *Configuration { +// cfg := &Configuration{ +// BasePath: BasePath, +// DefaultHeader: map[string]string{"portal-user-id": "11212"}, +// HTTPClient: HTTPClient, +// UserAgent: "terraform", +// } +// return cfg +// } func (c *Configuration) AddDefaultHeader(key string, value string) { c.DefaultHeader[key] = value } diff --git a/client/vserver/docs/AttachToLoadBalancerBackendRequest.md b/client/vserver/docs/AttachToLoadBalancerBackendRequest.md new file mode 100644 index 0000000..4e827ab --- /dev/null +++ b/client/vserver/docs/AttachToLoadBalancerBackendRequest.md @@ -0,0 +1,12 @@ +# AttachToLoadBalancerBackendRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterId** | **string** | Id of cluster | [optional] [default to null] +**LoadBalancers** | [**[]LoadBalancerItem**](LoadBalancerItem.md) | | [optional] [default to null] +**RemovePoolWithAnotherMonitorPort** | **bool** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/CaDto.md b/client/vserver/docs/CaDto.md new file mode 100644 index 0000000..a79b1ac --- /dev/null +++ b/client/vserver/docs/CaDto.md @@ -0,0 +1,14 @@ +# CaDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CertificateType** | **string** | | [optional] [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**ExpiredAt** | **string** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/CaRestControllerV2Api.md b/client/vserver/docs/CaRestControllerV2Api.md new file mode 100644 index 0000000..29a71a3 --- /dev/null +++ b/client/vserver/docs/CaRestControllerV2Api.md @@ -0,0 +1,100 @@ +# \CaRestControllerV2Api + +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteCertificateAuthorityUsingDELETE**](CaRestControllerV2Api.md#DeleteCertificateAuthorityUsingDELETE) | **Delete** /v2/{projectId}/cas/{caId} | Delete Certificate Authority +[**GetAllListCertificateAuthorityUsingGET**](CaRestControllerV2Api.md#GetAllListCertificateAuthorityUsingGET) | **Get** /v2/{projectId}/cas | List All Certificate Authority +[**ImportCAUsingPOST**](CaRestControllerV2Api.md#ImportCAUsingPOST) | **Post** /v2/{projectId}/cas | Import Certificate Authority + + +# **DeleteCertificateAuthorityUsingDELETE** +> DeleteCertificateAuthorityUsingDELETE(ctx, caId, projectId) +Delete Certificate Authority + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **caId** | **string**| The ca id | + **projectId** | **string**| The project id | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetAllListCertificateAuthorityUsingGET** +> PagingCaDto GetAllListCertificateAuthorityUsingGET(ctx, projectId, optional) +List All Certificate Authority + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| project id | + **optional** | ***CaRestControllerV2ApiGetAllListCertificateAuthorityUsingGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a CaRestControllerV2ApiGetAllListCertificateAuthorityUsingGETOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **name** | **optional.String**| name | + +### Return type + +[**PagingCaDto**](Paging«CADto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ImportCAUsingPOST** +> DataResponseCaDto ImportCAUsingPOST(ctx, importCARequest, projectId) +Import Certificate Authority + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **importCARequest** | [**ImportCaRequest**](ImportCaRequest.md)| importCARequest | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseCaDto**](DataResponse«CADto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/client/vserver/docs/ClusterConfigResultDto.md b/client/vserver/docs/ClusterConfigResultDto.md new file mode 100644 index 0000000..13d0dba --- /dev/null +++ b/client/vserver/docs/ClusterConfigResultDto.md @@ -0,0 +1,10 @@ +# ClusterConfigResultDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Configuration** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ClusterDto.md b/client/vserver/docs/ClusterDto.md new file mode 100644 index 0000000..d1ac3c5 --- /dev/null +++ b/client/vserver/docs/ClusterDto.md @@ -0,0 +1,51 @@ +# ClusterDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AclId** | **string** | | [optional] [default to null] +**AutoHealingEnabled** | **bool** | | [optional] [default to null] +**AutoMonitoringEnabled** | **bool** | | [optional] [default to null] +**AutoScalingEnabled** | **bool** | | [optional] [default to null] +**BootVolumeSize** | **int32** | | [optional] [default to null] +**BootVolumeTypeId** | **string** | | [optional] [default to null] +**CalicoCidr** | **string** | | [optional] [default to null] +**ClusterId** | **int32** | | [optional] [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**Description** | **string** | | [optional] [default to null] +**DockerVolumeSize** | **int32** | | [optional] [default to null] +**DockerVolumeTypeId** | **string** | | [optional] [default to null] +**EnabledLb** | **bool** | | [optional] [default to null] +**Endpoint** | **string** | | [optional] [default to null] +**EtcdVolumeSize** | **int32** | | [optional] [default to null] +**EtcdVolumeTypeId** | **string** | | [optional] [default to null] +**IngressControllerEnabled** | **bool** | | [optional] [default to null] +**K8sNetworkType** | **string** | | [optional] [default to null] +**K8sNetworkTypeId** | **string** | | [optional] [default to null] +**K8sVersion** | **string** | | [optional] [default to null] +**K8sVersionId** | **string** | | [optional] [default to null] +**MasterClusterSecGroupIdList** | **[]string** | | [optional] [default to null] +**MasterCount** | **int32** | | [optional] [default to null] +**MasterFlavorId** | **string** | | [optional] [default to null] +**MasterFlavorName** | **string** | | [optional] [default to null] +**MasterInstanceTypeId** | **string** | | [optional] [default to null] +**MaxNodeCount** | **int32** | | [optional] [default to null] +**MinNodeCount** | **int32** | | [optional] [default to null] +**MinionClusterSecGroupIdList** | **[]string** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**NetworkId** | **string** | | [optional] [default to null] +**NodeCount** | **int32** | | [optional] [default to null] +**NodeFlavorId** | **string** | | [optional] [default to null] +**NodeFlavorName** | **string** | | [optional] [default to null] +**NodeInstanceTypeId** | **string** | | [optional] [default to null] +**NodegroupDefaultId** | **string** | | [optional] [default to null] +**ProjectId** | **string** | | [optional] [default to null] +**SshKeyId** | **string** | | [optional] [default to null] +**SshKeyName** | **string** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**SubnetId** | **string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ClusterNodeDto.md b/client/vserver/docs/ClusterNodeDto.md new file mode 100644 index 0000000..418249f --- /dev/null +++ b/client/vserver/docs/ClusterNodeDto.md @@ -0,0 +1,21 @@ +# ClusterNodeDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterId** | **int64** | | [optional] [default to null] +**DateCreated** | **string** | | [optional] [default to null] +**DateDeleted** | **string** | | [optional] [default to null] +**FixedIp** | **string** | | [optional] [default to null] +**FloatingIp** | **string** | | [optional] [default to null] +**IsMaster** | **int64** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**NodeGroupId** | **int32** | | [optional] [default to null] +**ProjectId** | **int64** | | [optional] [default to null] +**Secgroup** | **interface{}** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**VmUuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ClusterNodeGroupDto.md b/client/vserver/docs/ClusterNodeGroupDto.md new file mode 100644 index 0000000..971882e --- /dev/null +++ b/client/vserver/docs/ClusterNodeGroupDto.md @@ -0,0 +1,20 @@ +# ClusterNodeGroupDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterId** | **string** | | [optional] [default to null] +**ClusterNodeGroupId** | **int32** | | [optional] [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**FlavorId** | **string** | | [optional] [default to null] +**FlavorName** | **string** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**NodeCount** | **int32** | | [optional] [default to null] +**NodeGroupDefault** | **bool** | | [optional] [default to null] +**ProjectId** | **string** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ClusterPoolDto.md b/client/vserver/docs/ClusterPoolDto.md new file mode 100644 index 0000000..5172d72 --- /dev/null +++ b/client/vserver/docs/ClusterPoolDto.md @@ -0,0 +1,20 @@ +# ClusterPoolDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterId** | **string** | | [optional] [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**Id** | **int32** | | [optional] [default to null] +**LoadBalancerId** | **string** | | [optional] [default to null] +**MonitorPort** | **int32** | | [optional] [default to null] +**PoolId** | **string** | | [optional] [default to null] +**PoolName** | **string** | | [optional] [default to null] +**Port** | **int32** | | [optional] [default to null] +**ProjectId** | **string** | | [optional] [default to null] +**UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ClusterSecGroupDefault.md b/client/vserver/docs/ClusterSecGroupDefault.md new file mode 100644 index 0000000..9497ea9 --- /dev/null +++ b/client/vserver/docs/ClusterSecGroupDefault.md @@ -0,0 +1,11 @@ +# ClusterSecGroupDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Master** | [***SecGroupDefault**](SecGroupDefault.md) | | [optional] [default to null] +**Minion** | [***SecGroupDefault**](SecGroupDefault.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ClusterSecGroupDefaultDto.md b/client/vserver/docs/ClusterSecGroupDefaultDto.md new file mode 100644 index 0000000..46e2321 --- /dev/null +++ b/client/vserver/docs/ClusterSecGroupDefaultDto.md @@ -0,0 +1,11 @@ +# ClusterSecGroupDefaultDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Master** | [***SecGroupDefault**](SecGroupDefault.md) | | [optional] [default to null] +**Minion** | [***SecGroupDefault**](SecGroupDefault.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ClusterSecGroupDto.md b/client/vserver/docs/ClusterSecGroupDto.md new file mode 100644 index 0000000..0462689 --- /dev/null +++ b/client/vserver/docs/ClusterSecGroupDto.md @@ -0,0 +1,17 @@ +# ClusterSecGroupDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterId** | **string** | | [optional] [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**Master** | **bool** | | [optional] [default to null] +**ProjectId** | **string** | | [optional] [default to null] +**SecGroupId** | **string** | | [optional] [default to null] +**SecGroupName** | **string** | | [optional] [default to null] +**UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ClusterSecgroupDefault.md b/client/vserver/docs/ClusterSecgroupDefault.md new file mode 100644 index 0000000..da10609 --- /dev/null +++ b/client/vserver/docs/ClusterSecgroupDefault.md @@ -0,0 +1,11 @@ +# ClusterSecgroupDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Master** | [***SecGroupDefault**](SecGroupDefault.md) | | [optional] [default to null] +**Minion** | [***SecGroupDefault**](SecGroupDefault.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ClusterVolumeDto.md b/client/vserver/docs/ClusterVolumeDto.md new file mode 100644 index 0000000..cbc979a --- /dev/null +++ b/client/vserver/docs/ClusterVolumeDto.md @@ -0,0 +1,20 @@ +# ClusterVolumeDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterId** | **int64** | | [optional] [default to null] +**DateCreated** | **string** | | [optional] [default to null] +**Iops** | **int32** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**ProjectId** | **int64** | | [optional] [default to null] +**Size** | **int64** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**VmUuid** | **string** | | [optional] [default to null] +**VolumeTypeId** | **string** | | [optional] [default to null] +**VolumeTypeZoneName** | **string** | | [optional] [default to null] +**VolumeUuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/CreateClusterRequest.md b/client/vserver/docs/CreateClusterRequest.md new file mode 100644 index 0000000..c50d1b1 --- /dev/null +++ b/client/vserver/docs/CreateClusterRequest.md @@ -0,0 +1,39 @@ +# CreateClusterRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AutoHealingEnabled** | **bool** | Auto-healing feature is enable | [optional] [default to null] +**AutoMonitoringEnabled** | **bool** | Auto monitoring feature is enable | [optional] [default to null] +**AutoScalingEnabled** | **bool** | Auto scaling feature is enable | [optional] [default to null] +**BootVolumeSize** | **int32** | Size of boot volume | [default to null] +**BootVolumeTypeId** | **string** | Id of boot volume type | [default to null] +**CalicoCidr** | **string** | Cidr of Calico | [default to null] +**Description** | **string** | | [optional] [default to null] +**DockerVolumeSize** | **int32** | Size of docker volume | [default to null] +**DockerVolumeTypeId** | **string** | Id of docker volume type | [default to null] +**EnabledLb** | **bool** | Enable Load Balancer or Not | [optional] [default to null] +**EtcdVolumeSize** | **int32** | Size of etcd volume | [default to null] +**EtcdVolumeTypeId** | **string** | Id of etcd volume type | [default to null] +**IngressControllerEnabled** | **bool** | Ingress Controller feature is enable | [optional] [default to null] +**IpipMode** | **string** | IpIp Mode | [default to null] +**K8sVersion** | **string** | Id of K8s Version of the Cluster | [default to null] +**MasterCount** | **int32** | Number of Master Node | [default to null] +**MasterFlavorId** | **string** | Id of the flavor of master | [default to null] +**MasterInstanceTypeId** | **string** | Id of the master family zone | [default to null] +**MaxNodeCount** | **int32** | Maximum number of node count | [default to null] +**MinNodeCount** | **int32** | Minimum number of node Count | [default to null] +**Name** | **string** | Name of the Cluster | [default to null] +**NetworkId** | **string** | Id of the network | [default to null] +**NetworkType** | **string** | Type of the network | [default to null] +**NodeCount** | **int32** | Number of Minion node | [default to null] +**NodeFlavorId** | **string** | Id of the flavor of minion | [default to null] +**NodeGroupRequestModelList** | [**[]NodeGroupRequestModel**](NodeGroupRequestModel.md) | List of Node Group want to create | [optional] [default to null] +**NodeInstanceTypeId** | **string** | Id of the minion family zone | [default to null] +**SecGroupIds** | **[]string** | List of Id of the secGroup | [optional] [default to null] +**SshKeyId** | **string** | Id of the sshKey | [optional] [default to null] +**SubnetId** | **string** | Id of the subnet | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/CreateL7PolicyRequestV2.md b/client/vserver/docs/CreateL7PolicyRequestV2.md new file mode 100644 index 0000000..d520352 --- /dev/null +++ b/client/vserver/docs/CreateL7PolicyRequestV2.md @@ -0,0 +1,18 @@ +# CreateL7PolicyRequestV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Action** | **string** | Action. This indicates how the listener will route traffic. The value can be REDIRECT_TO_POOL or REDIRECT_TO_URL. | [default to null] +**CompareType** | **string** | Compare operation. The value can be CONTAINS or EQUAL_TO | [default to null] +**KeepQueryString** | **bool** | Keep the query string or not. | [optional] [default to null] +**Name** | **string** | Policy name. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [default to null] +**RedirectHttpCode** | **int32** | Redirect HTTP code for redirecting to other URL. | [optional] [default to null] +**RedirectPoolId** | **string** | Pool for forwarding. | [optional] [default to null] +**RedirectUrl** | **string** | URL for forwarding. | [optional] [default to null] +**Type_** | **string** | Which attribute to compare. The value can be PATH or HOST_NAME | [default to null] +**Value** | **string** | The value to compare with attribute. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/CreateListenerRequest.md b/client/vserver/docs/CreateListenerRequest.md index 48536a9..e08ef51 100644 --- a/client/vserver/docs/CreateListenerRequest.md +++ b/client/vserver/docs/CreateListenerRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **AllowedCidrs** | **string** | Allowed cidr. | [default to null] **CertificateAuthorities** | **[]string** | List of certificate authority | [optional] [default to null] **DefaultCertificateAuthority** | **string** | Default certificate authority that the listener will use | [optional] [default to null] -**DefaultPoolId** | **string** | Id of the pool that this listener will forward to. | [optional] [default to null] +**DefaultPoolId** | **string** | Id of the pool that this listener will forward to. | [default to null] **ListenerName** | **string** | Name of the listener. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [default to null] **ListenerProtocol** | **string** | Protocol of the listener. | [default to null] **ListenerProtocolPort** | **int32** | Port of the listener. | [default to null] diff --git a/client/vserver/docs/CreateListenerRequestV2.md b/client/vserver/docs/CreateListenerRequestV2.md new file mode 100644 index 0000000..8b7b3da --- /dev/null +++ b/client/vserver/docs/CreateListenerRequestV2.md @@ -0,0 +1,19 @@ +# CreateListenerRequestV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllowedCidrs** | **string** | Allowed cidr. | [default to null] +**CertificateAuthorities** | **[]string** | List of certificate authority | [optional] [default to null] +**DefaultCertificateAuthority** | **string** | Default certificate authority that the listener will use | [optional] [default to null] +**DefaultPoolId** | **string** | Id of the pool that this listener will forward to. | [default to null] +**ListenerName** | **string** | Name of the listener. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [default to null] +**ListenerProtocol** | **string** | Protocol of the listener. | [default to null] +**ListenerProtocolPort** | **int32** | Port of the listener. | [default to null] +**TimeoutClient** | **int32** | Idle timeout of client. The value can be in range from 1 to 3600 seconds | [default to null] +**TimeoutConnection** | **int32** | Idle timeout of connection. The value can be in range from 1 to 3600 seconds | [default to null] +**TimeoutMember** | **int32** | Idle timeout of member. The value can be in range from 1 to 3600 seconds | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/CreateLoadBalancerRequest.md b/client/vserver/docs/CreateLoadBalancerRequest.md index 14cbdbc..ba4105c 100644 --- a/client/vserver/docs/CreateLoadBalancerRequest.md +++ b/client/vserver/docs/CreateLoadBalancerRequest.md @@ -3,32 +3,32 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Algorithm** | **string** | Algorithm of the pool. The algorithm can be \"ROUND_ROBIN\" or \"LEAST_CONNECTIONS\" or \"SOURCE_IP\" | [optional] [default to null] +**Algorithm** | **string** | Algorithm of the pool. The algorithm can be \"ROUND_ROBIN\" or \"LEAST_CONNECTIONS\" or \"SOURCE_IP\" | [default to null] **AllowedCidrs** | **string** | Allowed cidr. | [optional] [default to null] **CertificateAuthorities** | **[]string** | List of certificate authority | [optional] [default to null] **DefaultCertificateAuthority** | **string** | Default certificate authority that the listener will use | [optional] [default to null] **HealthCheckMethod** | **string** | Health check method for the HTTP protocol. | [optional] [default to null] **HealthCheckPath** | **string** | Health check path for the HTTP protocol. | [optional] [default to null] -**HealthCheckProtocol** | **string** | Protocol for performing health check. The protocol can be TCP or HTTP. | [optional] [default to null] +**HealthCheckProtocol** | **string** | Protocol for performing health check. | [default to null] **HealthyThreshold** | **int64** | Healthy threshold. The value must be in range from 2 to 10. | [optional] [default to null] **Interval** | **int64** | Health check interval. The value must be from 5 to 3600 seconds. | [optional] [default to null] -**ListenerName** | **string** | Name of the listener. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [optional] [default to null] -**ListenerProtocol** | **string** | Protocol of the listener. | [optional] [default to null] -**ListenerProtocolPort** | **int32** | Port of the listener. | [optional] [default to null] +**ListenerName** | **string** | Name of the listener. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [default to null] +**ListenerProtocol** | **string** | Protocol of the listener.The value can be HTTP or HTTPS or TCP. | [default to null] +**ListenerProtocolPort** | **int32** | Port of the listener. From 1 to 65535 | [optional] [default to null] **Members** | [**[]CreateMemberRequest**](CreateMemberRequest.md) | List of members of the pool. | [optional] [default to null] **Name** | **string** | Load balancer's name. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [default to null] -**PackageId** | **string** | Package ID of the load balancer. | [optional] [default to null] -**PoolName** | **string** | Name of the pool. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [optional] [default to null] -**PoolProtocol** | **string** | Protocol of the pool. | [optional] [default to null] +**PackageId** | **string** | Package ID of the load balancer. | [default to null] +**PoolName** | **string** | Name of the pool. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [default to null] +**PoolProtocol** | **string** | Protocol of the pool. | [default to null] **Scheme** | **string** | Schema of the load balancer, it may be Internet or Internal. | [default to null] **Stickiness** | **bool** | Enable sticky sessions. | [optional] [default to null] -**SubnetId** | **string** | Subnet ID for the load balancer. | [optional] [default to null] +**SubnetId** | **string** | Subnet ID for the load balancer. | [default to null] **SuccessCode** | **string** | Health check success code for HTTP health check protocol. | [optional] [default to null] **Timeout** | **int64** | Timeout of health check. The value must be from 2 to 120 seconds | [optional] [default to null] **TimeoutClient** | **int32** | Idle timeout of client. The value can be in range from 1 to 3600 seconds | [optional] [default to null] **TimeoutConnection** | **int32** | Idle timeout of connection. The value can be in range from 1 to 3600 seconds | [optional] [default to null] **TimeoutMember** | **int32** | Idle timeout of member. The value can be in range from 1 to 3600 seconds | [optional] [default to null] -**Type_** | **string** | Type of the load balancer. It may be Layer 4 or Layer 7 | [optional] [default to null] +**Type_** | **string** | Type of the load balancer. It may be Layer 4 or Layer 7 | [default to null] **UnhealthyThreshold** | **int64** | Unhealthy threshold. The value must be in range from 2 to 10. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/client/vserver/docs/CreateLoadBalancerRequestV2.md b/client/vserver/docs/CreateLoadBalancerRequestV2.md new file mode 100644 index 0000000..989f67f --- /dev/null +++ b/client/vserver/docs/CreateLoadBalancerRequestV2.md @@ -0,0 +1,16 @@ +# CreateLoadBalancerRequestV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Listener** | [***LbListener**](LbListener.md) | Listener of the load balancer. | [optional] [default to null] +**Name** | **string** | Load balancer's name. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [default to null] +**PackageId** | **string** | Package ID of the load balancer. | [default to null] +**Pool** | [***LbPool**](LbPool.md) | Pool of the load balancer. | [optional] [default to null] +**Scheme** | **string** | Schema of the load balancer, it may be Internet or Internal. | [default to null] +**SubnetId** | **string** | Subnet ID for the load balancer. | [default to null] +**Type_** | **string** | Type of the load balancer. It may be Layer 4 or Layer 7 | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/CreateMemberRequest.md b/client/vserver/docs/CreateMemberRequest.md index 9255702..5000908 100644 --- a/client/vserver/docs/CreateMemberRequest.md +++ b/client/vserver/docs/CreateMemberRequest.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **MonitorPort** | **int32** | Port for monitoring the member. | [optional] [default to null] **Name** | **string** | Friendly name for the member to be recognizable. | [optional] [default to null] **Port** | **int32** | Port of the server to handle request. | [default to null] -**SubnetId** | **string** | Subnet ID of the server. | [default to null] +**SubnetId** | **string** | Subnet ID of the server. Must be in the subnet of the load balancer. | [default to null] **Weight** | **int32** | Weight for the member. Higher weight will make that member receive more requests. | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/client/vserver/docs/CreateNodeGroupBackendRequest.md b/client/vserver/docs/CreateNodeGroupBackendRequest.md new file mode 100644 index 0000000..e19d80b --- /dev/null +++ b/client/vserver/docs/CreateNodeGroupBackendRequest.md @@ -0,0 +1,13 @@ +# CreateNodeGroupBackendRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterId** | **string** | Id of cluster | [default to null] +**FlavorId** | **string** | Id of the flavor | [default to null] +**Name** | **string** | Name of the node group | [default to null] +**NodeCount** | **int32** | number of the node in node group | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/CreatePoolRequestV2.md b/client/vserver/docs/CreatePoolRequestV2.md new file mode 100644 index 0000000..c553b6e --- /dev/null +++ b/client/vserver/docs/CreatePoolRequestV2.md @@ -0,0 +1,15 @@ +# CreatePoolRequestV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Algorithm** | **string** | Algorithm of the pool. The algorithm can be \"ROUND_ROBIN\" or \"LEAST_CONNECTIONS\" or \"SOURCE_IP\" | [default to null] +**HealthMonitor** | [***CreateHealthMonitorRequest**](CreateHealthMonitorRequest.md) | Request for creating health check monitor. | [optional] [default to null] +**Members** | [**[]CreateMemberRequest**](CreateMemberRequest.md) | List of members of the pool. | [optional] [default to null] +**PoolName** | **string** | Name of the pool. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [default to null] +**PoolProtocol** | **string** | Protocol of the pool. | [default to null] +**Stickiness** | **bool** | Enable sticky sessions. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseCaDto.md b/client/vserver/docs/DataResponseCaDto.md new file mode 100644 index 0000000..76b8363 --- /dev/null +++ b/client/vserver/docs/DataResponseCaDto.md @@ -0,0 +1,10 @@ +# DataResponseCaDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***CaDto**](CADto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseClusterDto.md b/client/vserver/docs/DataResponseClusterDto.md new file mode 100644 index 0000000..6de307c --- /dev/null +++ b/client/vserver/docs/DataResponseClusterDto.md @@ -0,0 +1,10 @@ +# DataResponseClusterDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ClusterDto**](ClusterDto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseClusterNodeGroupDto.md b/client/vserver/docs/DataResponseClusterNodeGroupDto.md new file mode 100644 index 0000000..3781846 --- /dev/null +++ b/client/vserver/docs/DataResponseClusterNodeGroupDto.md @@ -0,0 +1,10 @@ +# DataResponseClusterNodeGroupDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***ClusterNodeGroupDto**](ClusterNodeGroupDto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseListClusterSecGroupDto.md b/client/vserver/docs/DataResponseListClusterSecGroupDto.md new file mode 100644 index 0000000..3dcfe6d --- /dev/null +++ b/client/vserver/docs/DataResponseListClusterSecGroupDto.md @@ -0,0 +1,10 @@ +# DataResponseListClusterSecGroupDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]ClusterSecGroupDto**](ClusterSecGroupDto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseListL7Policy.md b/client/vserver/docs/DataResponseListL7Policy.md new file mode 100644 index 0000000..474870b --- /dev/null +++ b/client/vserver/docs/DataResponseListL7Policy.md @@ -0,0 +1,10 @@ +# DataResponseListL7Policy + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]L7Policy**](L7Policy.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseListListener.md b/client/vserver/docs/DataResponseListListener.md new file mode 100644 index 0000000..7175d94 --- /dev/null +++ b/client/vserver/docs/DataResponseListListener.md @@ -0,0 +1,10 @@ +# DataResponseListListener + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]Listener**](Listener.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseListMember.md b/client/vserver/docs/DataResponseListMember.md new file mode 100644 index 0000000..1ddedd1 --- /dev/null +++ b/client/vserver/docs/DataResponseListMember.md @@ -0,0 +1,10 @@ +# DataResponseListMember + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]Member**](Member.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseListNetworkAclPolicyRuleDto.md b/client/vserver/docs/DataResponseListNetworkAclPolicyRuleDto.md new file mode 100644 index 0000000..51663a3 --- /dev/null +++ b/client/vserver/docs/DataResponseListNetworkAclPolicyRuleDto.md @@ -0,0 +1,10 @@ +# DataResponseListNetworkAclPolicyRuleDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]NetworkAclPolicyRuleDto**](NetworkAclPolicyRuleDto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseListPool.md b/client/vserver/docs/DataResponseListPool.md new file mode 100644 index 0000000..74200f8 --- /dev/null +++ b/client/vserver/docs/DataResponseListPool.md @@ -0,0 +1,10 @@ +# DataResponseListPool + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]Pool**](Pool.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseListRegionDto.md b/client/vserver/docs/DataResponseListRegionDto.md new file mode 100644 index 0000000..8a53488 --- /dev/null +++ b/client/vserver/docs/DataResponseListRegionDto.md @@ -0,0 +1,10 @@ +# DataResponseListRegionDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]RegionDto**](RegionDto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseListRoutesDto.md b/client/vserver/docs/DataResponseListRoutesDto.md new file mode 100644 index 0000000..003f894 --- /dev/null +++ b/client/vserver/docs/DataResponseListRoutesDto.md @@ -0,0 +1,10 @@ +# DataResponseListRoutesDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**[]RoutesDto**](RoutesDto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseLoadBalancerDto.md b/client/vserver/docs/DataResponseLoadBalancerDto.md new file mode 100644 index 0000000..0f351d6 --- /dev/null +++ b/client/vserver/docs/DataResponseLoadBalancerDto.md @@ -0,0 +1,10 @@ +# DataResponseLoadBalancerDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***LoadBalancerDto**](LoadBalancerDto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseNetworkAclDetailDto.md b/client/vserver/docs/DataResponseNetworkAclDetailDto.md new file mode 100644 index 0000000..82a6279 --- /dev/null +++ b/client/vserver/docs/DataResponseNetworkAclDetailDto.md @@ -0,0 +1,10 @@ +# DataResponseNetworkAclDetailDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***NetworkAclDetailDto**](NetworkAclDetailDto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseNetworkAclDto.md b/client/vserver/docs/DataResponseNetworkAclDto.md new file mode 100644 index 0000000..36edc24 --- /dev/null +++ b/client/vserver/docs/DataResponseNetworkAclDto.md @@ -0,0 +1,10 @@ +# DataResponseNetworkAclDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***NetworkAclDto**](NetworkAclDto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseNetworkAclModel.md b/client/vserver/docs/DataResponseNetworkAclModel.md new file mode 100644 index 0000000..1783e56 --- /dev/null +++ b/client/vserver/docs/DataResponseNetworkAclModel.md @@ -0,0 +1,10 @@ +# DataResponseNetworkAclModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***NetworkAclModel**](NetworkAclModel.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseRouteTableDto.md b/client/vserver/docs/DataResponseRouteTableDto.md new file mode 100644 index 0000000..b50b0ff --- /dev/null +++ b/client/vserver/docs/DataResponseRouteTableDto.md @@ -0,0 +1,10 @@ +# DataResponseRouteTableDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***RouteTableDto**](RouteTableDto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseSimpleServerTaskDto.md b/client/vserver/docs/DataResponseSimpleServerTaskDto.md new file mode 100644 index 0000000..95caadd --- /dev/null +++ b/client/vserver/docs/DataResponseSimpleServerTaskDto.md @@ -0,0 +1,10 @@ +# DataResponseSimpleServerTaskDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [***SimpleServerTaskDto**](SimpleServerTaskDto.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DataResponseboolean.md b/client/vserver/docs/DataResponseboolean.md new file mode 100644 index 0000000..3153964 --- /dev/null +++ b/client/vserver/docs/DataResponseboolean.md @@ -0,0 +1,10 @@ +# DataResponseboolean + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | **bool** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/DeleteNodeGroupBackendRequest.md b/client/vserver/docs/DeleteNodeGroupBackendRequest.md new file mode 100644 index 0000000..d872cc4 --- /dev/null +++ b/client/vserver/docs/DeleteNodeGroupBackendRequest.md @@ -0,0 +1,11 @@ +# DeleteNodeGroupBackendRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterId** | **string** | Id of cluster | [default to null] +**NodeGroupId** | **string** | Id of nodegroup | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/Flavor.md b/client/vserver/docs/Flavor.md index 905e1f5..38c525a 100644 --- a/client/vserver/docs/Flavor.md +++ b/client/vserver/docs/Flavor.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **Gpu** | **int32** | | [optional] [default to null] **Group** | **string** | | [optional] [default to null] **Memory** | **int32** | | [optional] [default to null] +**MetaData** | **string** | | [optional] [default to null] **Name** | **string** | | [optional] [default to null] **RemainingVms** | **int32** | | [optional] [default to null] **ZoneId** | **string** | | [optional] [default to null] diff --git a/client/vserver/docs/ImportCaRequest.md b/client/vserver/docs/ImportCaRequest.md new file mode 100644 index 0000000..c85bda4 --- /dev/null +++ b/client/vserver/docs/ImportCaRequest.md @@ -0,0 +1,16 @@ +# ImportCaRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Certificate** | **string** | Certificate of the CA | [optional] [default to null] +**CertificateChain** | **string** | A certificate chain is an ordered list of certificates, containing an SSL/TLS Certificate and Certificate Authority (CA) Certificates, that enable the receiver to verify that the sender and all CA's are trustworthy. | [optional] [default to null] +**Expiration** | [**time.Time**](time.Time.md) | Expiration of CA | [optional] [default to null] +**Name** | **string** | Name of the CA | [default to null] +**Passphrase** | **string** | The password of the private key. | [optional] [default to null] +**PrivateKey** | **string** | Private key of the CA | [optional] [default to null] +**Type_** | **string** | Type of the certificate ( CA or TLS/SSL ) | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/K8SClusterRestControllerV2Api.md b/client/vserver/docs/K8SClusterRestControllerV2Api.md index 983ca14..a9a4d05 100644 --- a/client/vserver/docs/K8SClusterRestControllerV2Api.md +++ b/client/vserver/docs/K8SClusterRestControllerV2Api.md @@ -1,14 +1,552 @@ # \K8SClusterRestControllerV2Api -All URIs are relative to *https://virtserver.swaggerhub.com/manhtu1997/vserver/1.0.2* +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* Method | HTTP request | Description ------------- | ------------- | ------------- +[**AttachToLbUsingPOST**](K8SClusterRestControllerV2Api.md#AttachToLbUsingPOST) | **Post** /v2/{projectId}/clusters/{clusterId}/attach-load-balancer | Attach Load Balancer +[**CreateClusterNodeGroupUsingPOST**](K8SClusterRestControllerV2Api.md#CreateClusterNodeGroupUsingPOST) | **Post** /v2/{projectId}/clusters/{clusterId}/cluster-node-groups | Create Cluster Node Group +[**CreateClusterUsingPOST**](K8SClusterRestControllerV2Api.md#CreateClusterUsingPOST) | **Post** /v2/{projectId}/clusters | Create cluster +[**DeleteClusterNodeGroupUsingDELETE**](K8SClusterRestControllerV2Api.md#DeleteClusterNodeGroupUsingDELETE) | **Delete** /v2/{projectId}/clusters/cluster-node-groups/{nodeGroupId} | Delete Cluster Node Group +[**DeleteClusterUsingDELETE**](K8SClusterRestControllerV2Api.md#DeleteClusterUsingDELETE) | **Delete** /v2/{projectId}/clusters/{clusterId} | Delete Cluster +[**GetClusterNodeGroupUsingGET**](K8SClusterRestControllerV2Api.md#GetClusterNodeGroupUsingGET) | **Get** /v2/{projectId}/clusters/cluster-node-groups/{nodegroupId} | Get Cluster Node Group +[**GetClusterUsingGET**](K8SClusterRestControllerV2Api.md#GetClusterUsingGET) | **Get** /v2/{projectId}/clusters/{clusterId} | Get cluster +[**GetConfigUsingGET**](K8SClusterRestControllerV2Api.md#GetConfigUsingGET) | **Get** /v2/{projectId}/clusters/{clusterId}/config | Get Config +[**GetConsoleUsingGET**](K8SClusterRestControllerV2Api.md#GetConsoleUsingGET) | **Get** /v2/{projectId}/clusters/nodes/{serverId}/console | Get Console +[**GetEtcdPackageUsingGET**](K8SClusterRestControllerV2Api.md#GetEtcdPackageUsingGET) | **Get** /v2/{projectId}/clusters/etcd-package | List K8s ETCD Package +[**GetFlavorLimitUsingGET**](K8SClusterRestControllerV2Api.md#GetFlavorLimitUsingGET) | **Get** /v2/{projectId}/clusters/flavor-limit | Get Flavor Limit +[**GetK8sConfigUsingGET**](K8SClusterRestControllerV2Api.md#GetK8sConfigUsingGET) | **Get** /v2/{projectId}/clusters/k8s-config | Get K8s Config +[**GetK8sDefaultFlavorIdUsingGET**](K8SClusterRestControllerV2Api.md#GetK8sDefaultFlavorIdUsingGET) | **Get** /v2/{projectId}/clusters/k8s-default-flavor | Get K8s Default Flavor Id +[**GetK8sVolumeConfigUsingGET**](K8SClusterRestControllerV2Api.md#GetK8sVolumeConfigUsingGET) | **Get** /v2/{projectId}/clusters/k8s-volume-config | Get K8s Volume Config +[**GetMaxNodeCountUsingGET**](K8SClusterRestControllerV2Api.md#GetMaxNodeCountUsingGET) | **Get** /v2/{projectId}/clusters/max-node-count | Get max node count +[**GetNodeByIdUsingGET**](K8SClusterRestControllerV2Api.md#GetNodeByIdUsingGET) | **Get** /v2/{projectId}/clusters/{clusterId}/nodes/{nodeGroupId} | List node +[**GetServerTaskStatusUsingGET**](K8SClusterRestControllerV2Api.md#GetServerTaskStatusUsingGET) | **Get** /v2/{projectId}/clusters/{clusterId}/server-task/{serverTaskId} | Get Server Task Status +[**ListClusterNodeGroupUsingGET**](K8SClusterRestControllerV2Api.md#ListClusterNodeGroupUsingGET) | **Get** /v2/{projectId}/clusters/{clusterId}/cluster-node-groups | List Cluster Node Group +[**ListClusterPoolByClusterUsingGET**](K8SClusterRestControllerV2Api.md#ListClusterPoolByClusterUsingGET) | **Get** /v2/{projectId}/clusters/{clusterId}/pools | List cluster pools [**ListClusterUsingGET**](K8SClusterRestControllerV2Api.md#ListClusterUsingGET) | **Get** /v2/{projectId}/clusters | List cluster +[**ListK8sNetworkTypeUsingGET**](K8SClusterRestControllerV2Api.md#ListK8sNetworkTypeUsingGET) | **Get** /v2/{projectId}/clusters/network-types | List K8s Networks Type +[**ListK8sVersionUsingGET**](K8SClusterRestControllerV2Api.md#ListK8sVersionUsingGET) | **Get** /v2/{projectId}/clusters/versions | List K8s Version +[**ListNodeUsingGET**](K8SClusterRestControllerV2Api.md#ListNodeUsingGET) | **Get** /v2/{projectId}/clusters/{clusterId}/nodes | List node +[**ListSecGroupUsingGET**](K8SClusterRestControllerV2Api.md#ListSecGroupUsingGET) | **Get** /v2/{projectId}/clusters/{clusterId}/sec-group/{type} | Get Cluster Sec Group Detail +[**ListSecgroupDefaultUsingGET**](K8SClusterRestControllerV2Api.md#ListSecgroupDefaultUsingGET) | **Get** /v2/{projectId}/clusters/{clusterId}/secgroups-default | List Secgroup Default +[**ListVolumeUsingGET3**](K8SClusterRestControllerV2Api.md#ListVolumeUsingGET3) | **Get** /v2/{projectId}/clusters/{clusterId}/volumes | List volume +[**ScaleMinionUsingPOST**](K8SClusterRestControllerV2Api.md#ScaleMinionUsingPOST) | **Post** /v2/{projectId}/clusters/{clusterId}/scale-minion | Scale Minion +[**UpdateSecGroupUsingPUT**](K8SClusterRestControllerV2Api.md#UpdateSecGroupUsingPUT) | **Put** /v2/{projectId}/clusters/sec-group | Update sec group +# **AttachToLbUsingPOST** +> DataResponseSimpleServerTaskDto AttachToLbUsingPOST(ctx, attachToLoadBalancerBackendRequest, clusterId, projectId) +Attach Load Balancer + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **attachToLoadBalancerBackendRequest** | [**AttachToLoadBalancerBackendRequest**](AttachToLoadBalancerBackendRequest.md)| attachToLoadBalancerBackendRequest | + **clusterId** | **string**| The cluster id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseSimpleServerTaskDto**](DataResponse«SimpleServerTaskDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CreateClusterNodeGroupUsingPOST** +> DataResponseClusterNodeGroupDto CreateClusterNodeGroupUsingPOST(ctx, clusterId, createNodeGroupBackendRequest, projectId) +Create Cluster Node Group + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **createNodeGroupBackendRequest** | [**CreateNodeGroupBackendRequest**](CreateNodeGroupBackendRequest.md)| createNodeGroupBackendRequest | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseClusterNodeGroupDto**](DataResponse«ClusterNodeGroupDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CreateClusterUsingPOST** +> DataResponseClusterDto CreateClusterUsingPOST(ctx, createClusterRequest, projectId) +Create cluster + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **createClusterRequest** | [**CreateClusterRequest**](CreateClusterRequest.md)| createClusterRequest | + **projectId** | **string**| The project Id | + +### Return type + +[**DataResponseClusterDto**](DataResponse«ClusterDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DeleteClusterNodeGroupUsingDELETE** +> DataResponseClusterNodeGroupDto DeleteClusterNodeGroupUsingDELETE(ctx, nodeGroupId, projectId) +Delete Cluster Node Group + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **nodeGroupId** | **string**| The cluster node group id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseClusterNodeGroupDto**](DataResponse«ClusterNodeGroupDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DeleteClusterUsingDELETE** +> DataResponseClusterDto DeleteClusterUsingDELETE(ctx, clusterId, projectId) +Delete Cluster + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseClusterDto**](DataResponse«ClusterDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetClusterNodeGroupUsingGET** +> ClusterNodeGroupDto GetClusterNodeGroupUsingGET(ctx, nodegroupId, projectId) +Get Cluster Node Group + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **nodegroupId** | **string**| The node group id | + **projectId** | **string**| The project id | + +### Return type + +[**ClusterNodeGroupDto**](ClusterNodeGroupDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetClusterUsingGET** +> DataResponseClusterDto GetClusterUsingGET(ctx, clusterId, projectId) +Get cluster + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **projectId** | **string**| The project Id | + +### Return type + +[**DataResponseClusterDto**](DataResponse«ClusterDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetConfigUsingGET** +> ClusterConfigResultDto GetConfigUsingGET(ctx, clusterId, projectId) +Get Config + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **projectId** | **string**| The project id | + +### Return type + +[**ClusterConfigResultDto**](ClusterConfigResultDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetConsoleUsingGET** +> NodeConsoleResultDto GetConsoleUsingGET(ctx, projectId, serverId) +Get Console + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + **serverId** | **string**| The server id | + +### Return type + +[**NodeConsoleResultDto**](NodeConsoleResultDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetEtcdPackageUsingGET** +> []K8SEtcdPackageEntity GetEtcdPackageUsingGET(ctx, projectId) +List K8s ETCD Package + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + +### Return type + +[**[]K8SEtcdPackageEntity**](K8SEtcdPackageEntity.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetFlavorLimitUsingGET** +> string GetFlavorLimitUsingGET(ctx, projectId) +Get Flavor Limit + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetK8sConfigUsingGET** +> string GetK8sConfigUsingGET(ctx, projectId) +Get K8s Config + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| the project id | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetK8sDefaultFlavorIdUsingGET** +> string GetK8sDefaultFlavorIdUsingGET(ctx, projectId) +Get K8s Default Flavor Id + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| the project id | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetK8sVolumeConfigUsingGET** +> string GetK8sVolumeConfigUsingGET(ctx, projectId) +Get K8s Volume Config + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| the project id | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetMaxNodeCountUsingGET** +> int32 GetMaxNodeCountUsingGET(ctx, projectId) +Get max node count + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project Id | + +### Return type + +**int32** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetNodeByIdUsingGET** +> []ClusterNodeDto GetNodeByIdUsingGET(ctx, clusterId, nodeGroupId, projectId) +List node + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **nodeGroupId** | **string**| The node group id | + **projectId** | **string**| The project Ii | + +### Return type + +[**[]ClusterNodeDto**](ClusterNodeDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetServerTaskStatusUsingGET** +> string GetServerTaskStatusUsingGET(ctx, clusterId, projectId, serverTaskId) +Get Server Task Status + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| the cluster id | + **projectId** | **string**| the project id | + **serverTaskId** | **string**| the server task id | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListClusterNodeGroupUsingGET** +> []SimpleClusterNodeGroupDto ListClusterNodeGroupUsingGET(ctx, clusterId, projectId) +List Cluster Node Group + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **projectId** | **string**| The project id | + +### Return type + +[**[]SimpleClusterNodeGroupDto**](SimpleClusterNodeGroupDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListClusterPoolByClusterUsingGET** +> []ClusterPoolDto ListClusterPoolByClusterUsingGET(ctx, clusterId, projectId) +List cluster pools + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **projectId** | **string**| The project id | + +### Return type + +[**[]ClusterPoolDto**](ClusterPoolDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **ListClusterUsingGET** -> PagingInterfaceK8SClusterDetail ListClusterUsingGET(ctx, projectId, optional) +> PagingClusterDto ListClusterUsingGET(ctx, projectId, optional) List cluster ### Required Parameters @@ -31,7 +569,141 @@ Name | Type | Description | Notes ### Return type -[**PagingInterfaceK8SClusterDetail**](Paging«InterfaceK8SClusterDetail».md) +[**PagingClusterDto**](Paging«ClusterDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListK8sNetworkTypeUsingGET** +> []K8sNetworkTypeDto ListK8sNetworkTypeUsingGET(ctx, projectId) +List K8s Networks Type + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project Id | + +### Return type + +[**[]K8sNetworkTypeDto**](K8sNetworkTypeDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListK8sVersionUsingGET** +> []K8sVersionDto ListK8sVersionUsingGET(ctx, projectId) +List K8s Version + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project Id | + +### Return type + +[**[]K8sVersionDto**](K8sVersionDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListNodeUsingGET** +> []ClusterNodeDto ListNodeUsingGET(ctx, clusterId, projectId) +List node + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **projectId** | **string**| The project Id | + +### Return type + +[**[]ClusterNodeDto**](ClusterNodeDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListSecGroupUsingGET** +> []ClusterSecGroupDto ListSecGroupUsingGET(ctx, clusterId, projectId, type_) +Get Cluster Sec Group Detail + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **projectId** | **string**| The project id | + **type_** | **bool**| The type | + +### Return type + +[**[]ClusterSecGroupDto**](ClusterSecGroupDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListSecgroupDefaultUsingGET** +> []ClusterSecgroupDefault ListSecgroupDefaultUsingGET(ctx, clusterId, projectId) +List Secgroup Default + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **projectId** | **string**| The project id | + +### Return type + +[**[]ClusterSecgroupDefault**](ClusterSecgroupDefault.md) ### Authorization @@ -44,3 +716,85 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **ListVolumeUsingGET3** +> []ClusterVolumeDto ListVolumeUsingGET3(ctx, clusterId, projectId) +List volume + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **projectId** | **string**| The project id | + +### Return type + +[**[]ClusterVolumeDto**](ClusterVolumeDto.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ScaleMinionUsingPOST** +> DataResponseClusterDto ScaleMinionUsingPOST(ctx, clusterId, projectId, scaleMinionBackendRequest) +Scale Minion + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **clusterId** | **string**| The cluster id | + **projectId** | **string**| The project id | + **scaleMinionBackendRequest** | [**ScaleMinionBackendRequest**](ScaleMinionBackendRequest.md)| scaleMinionBackendRequest | + +### Return type + +[**DataResponseClusterDto**](DataResponse«ClusterDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UpdateSecGroupUsingPUT** +> DataResponseListClusterSecGroupDto UpdateSecGroupUsingPUT(ctx, projectId, updateClusterSecGroupRequest) +Update sec group + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + **updateClusterSecGroupRequest** | [**UpdateClusterSecGroupRequest**](UpdateClusterSecGroupRequest.md)| updateClusterSecGroupRequest | + +### Return type + +[**DataResponseListClusterSecGroupDto**](DataResponse«List«ClusterSecGroupDto»».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/client/vserver/docs/K8SEtcdPackageEntity.md b/client/vserver/docs/K8SEtcdPackageEntity.md new file mode 100644 index 0000000..43e6bef --- /dev/null +++ b/client/vserver/docs/K8SEtcdPackageEntity.md @@ -0,0 +1,16 @@ +# K8SEtcdPackageEntity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | | [optional] [default to null] +**DescriptionVi** | **string** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**Size** | **int32** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] +**VolumeTypeId** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/K8sNetworkTypeDto.md b/client/vserver/docs/K8sNetworkTypeDto.md new file mode 100644 index 0000000..f832692 --- /dev/null +++ b/client/vserver/docs/K8sNetworkTypeDto.md @@ -0,0 +1,12 @@ +# K8sNetworkTypeDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/K8sVersionDto.md b/client/vserver/docs/K8sVersionDto.md new file mode 100644 index 0000000..4dc133f --- /dev/null +++ b/client/vserver/docs/K8sVersionDto.md @@ -0,0 +1,13 @@ +# K8sVersionDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] +**Weight** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/L7Policy.md b/client/vserver/docs/L7Policy.md index 6dc9d89..2a7f94e 100644 --- a/client/vserver/docs/L7Policy.md +++ b/client/vserver/docs/L7Policy.md @@ -18,6 +18,7 @@ Name | Type | Description | Notes **RedirectHttpCode** | **int32** | | [optional] [default to null] **RedirectPoolId** | **string** | | [optional] [default to null] **RedirectUrl** | **string** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] **UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] **Uuid** | **string** | | [optional] [default to null] diff --git a/client/vserver/docs/LbListener.md b/client/vserver/docs/LbListener.md new file mode 100644 index 0000000..7031bfa --- /dev/null +++ b/client/vserver/docs/LbListener.md @@ -0,0 +1,18 @@ +# LbListener + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllowedCidrs** | **string** | Allowed cidr. | [optional] [default to null] +**CertificateAuthorities** | **[]string** | List of certificate authority | [optional] [default to null] +**DefaultCertificateAuthority** | **string** | Default certificate authority that the listener will use | [optional] [default to null] +**ListenerName** | **string** | Name of the listener. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [default to null] +**ListenerProtocol** | **string** | Protocol of the listener.The value can be HTTP or HTTPS or TCP. | [default to null] +**ListenerProtocolPort** | **int32** | Port of the listener. From 1 to 65535 | [optional] [default to null] +**TimeoutClient** | **int32** | Idle timeout of client. The value can be in range from 1 to 3600 seconds | [optional] [default to null] +**TimeoutConnection** | **int32** | Idle timeout of connection. The value can be in range from 1 to 3600 seconds | [optional] [default to null] +**TimeoutMember** | **int32** | Idle timeout of member. The value can be in range from 1 to 3600 seconds | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/LbPool.md b/client/vserver/docs/LbPool.md new file mode 100644 index 0000000..a8413e1 --- /dev/null +++ b/client/vserver/docs/LbPool.md @@ -0,0 +1,22 @@ +# LbPool + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Algorithm** | **string** | Algorithm of the pool. The algorithm can be \"ROUND_ROBIN\" or \"LEAST_CONNECTIONS\" or \"SOURCE_IP\" | [default to null] +**HealthCheckMethod** | **string** | Health check method for the HTTP protocol. | [optional] [default to null] +**HealthCheckPath** | **string** | Health check path for the HTTP protocol. | [optional] [default to null] +**HealthCheckProtocol** | **string** | Protocol for performing health check. | [default to null] +**HealthyThreshold** | **int64** | Healthy threshold. The value must be in range from 2 to 10. | [optional] [default to null] +**Interval** | **int64** | Health check interval. The value must be from 5 to 3600 seconds. | [optional] [default to null] +**Members** | [**[]CreateMemberRequest**](CreateMemberRequest.md) | List of members of the pool. | [optional] [default to null] +**PoolName** | **string** | Name of the pool. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. | [default to null] +**PoolProtocol** | **string** | Protocol of the pool. | [default to null] +**Stickiness** | **bool** | Enable sticky sessions. | [optional] [default to null] +**SuccessCode** | **string** | Health check success code for HTTP health check protocol. | [optional] [default to null] +**Timeout** | **int64** | Timeout of health check. The value must be from 2 to 120 seconds | [optional] [default to null] +**UnhealthyThreshold** | **int64** | Unhealthy threshold. The value must be in range from 2 to 10. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/Listener.md b/client/vserver/docs/Listener.md index 367a6e1..79b1704 100644 --- a/client/vserver/docs/Listener.md +++ b/client/vserver/docs/Listener.md @@ -19,6 +19,7 @@ Name | Type | Description | Notes **Protocol** | **string** | | [optional] [default to null] **ProtocolPort** | **int32** | | [optional] [default to null] **ProvisioningStatus** | **string** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] **TimeoutClient** | **int32** | | [optional] [default to null] **TimeoutConnection** | **int32** | | [optional] [default to null] **TimeoutMember** | **int32** | | [optional] [default to null] diff --git a/client/vserver/docs/LoadBalancerDto.md b/client/vserver/docs/LoadBalancerDto.md new file mode 100644 index 0000000..6918596 --- /dev/null +++ b/client/vserver/docs/LoadBalancerDto.md @@ -0,0 +1,23 @@ +# LoadBalancerDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | | [optional] [default to null] +**AdminStateUp** | **bool** | | [optional] [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**Description** | **string** | | [optional] [default to null] +**LoadBalancerSchema** | **string** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**OperatingStatus** | **string** | | [optional] [default to null] +**PackageId** | **string** | | [optional] [default to null] +**PrivateSubnetCidr** | **string** | | [optional] [default to null] +**PrivateSubnetId** | **string** | | [optional] [default to null] +**ProvisioningStatus** | **string** | | [optional] [default to null] +**SubnetId** | **string** | | [optional] [default to null] +**Type_** | **string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/LoadBalancerItem.md b/client/vserver/docs/LoadBalancerItem.md new file mode 100644 index 0000000..1af5fc2 --- /dev/null +++ b/client/vserver/docs/LoadBalancerItem.md @@ -0,0 +1,11 @@ +# LoadBalancerItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LoadBalancerId** | **string** | | [optional] [default to null] +**Pools** | [**[]PoolItem**](PoolItem.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/LoadBalancerListenerRestControllerV2Api.md b/client/vserver/docs/LoadBalancerListenerRestControllerV2Api.md new file mode 100644 index 0000000..8fdb95e --- /dev/null +++ b/client/vserver/docs/LoadBalancerListenerRestControllerV2Api.md @@ -0,0 +1,331 @@ +# \LoadBalancerListenerRestControllerV2Api + +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateListenerUsingPOST**](LoadBalancerListenerRestControllerV2Api.md#CreateListenerUsingPOST) | **Post** /v2/{projectId}/loadBalancers/{loadBalancerId}/listeners | Create a listener +[**CreatePolicyUsingPOST**](LoadBalancerListenerRestControllerV2Api.md#CreatePolicyUsingPOST) | **Post** /v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}/l7policies | Create a l7 policy +[**DeleteListenerUsingDELETE**](LoadBalancerListenerRestControllerV2Api.md#DeleteListenerUsingDELETE) | **Delete** /v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId} | Delete a listener +[**DeletePolicyUsingDELETE**](LoadBalancerListenerRestControllerV2Api.md#DeletePolicyUsingDELETE) | **Delete** /v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}/l7policies/{l7PolicyId} | Delete a policy +[**GetL7PolicyUsingGET**](LoadBalancerListenerRestControllerV2Api.md#GetL7PolicyUsingGET) | **Get** /v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}/l7policies/{l7PolicyId} | Get a specific policy of a listener by l7PolicyId +[**GetListL7PoliciesUsingGET**](LoadBalancerListenerRestControllerV2Api.md#GetListL7PoliciesUsingGET) | **Get** /v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}/l7policies | Get list policies of a listener +[**GetListListenersByLoadBalancerUsingGET**](LoadBalancerListenerRestControllerV2Api.md#GetListListenersByLoadBalancerUsingGET) | **Get** /v2/{projectId}/loadBalancers/{loadBalancerId}/listeners | Get list of listeners of a Load Balancer +[**GetListenersUsingGET**](LoadBalancerListenerRestControllerV2Api.md#GetListenersUsingGET) | **Get** /v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId} | Get a specific listener +[**ReorderPoliciesUsingPUT**](LoadBalancerListenerRestControllerV2Api.md#ReorderPoliciesUsingPUT) | **Put** /v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}/reorderL7Policies | Reorder the L7 policies +[**UpdateL7PolicyUsingPUT**](LoadBalancerListenerRestControllerV2Api.md#UpdateL7PolicyUsingPUT) | **Put** /v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId}/l7policies/{policyId} | Update a policy +[**UpdateListenerUsingPUT**](LoadBalancerListenerRestControllerV2Api.md#UpdateListenerUsingPUT) | **Put** /v2/{projectId}/loadBalancers/{loadBalancerId}/listeners/{listenerId} | Update a listener + + +# **CreateListenerUsingPOST** +> DataResponseListener CreateListenerUsingPOST(ctx, createListenerRequestV2, loadBalancerId, projectId) +Create a listener + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **createListenerRequestV2** | [**CreateListenerRequestV2**](CreateListenerRequestV2.md)| createListenerRequestV2 | + **loadBalancerId** | **string**| The Load Balancer id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseListener**](DataResponse«Listener».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **CreatePolicyUsingPOST** +> DataResponseL7Policy CreatePolicyUsingPOST(ctx, createL7PolicyRequestV2, listenerId, loadBalancerId, projectId) +Create a l7 policy + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **createL7PolicyRequestV2** | [**CreateL7PolicyRequestV2**](CreateL7PolicyRequestV2.md)| createL7PolicyRequestV2 | + **listenerId** | **string**| The listener id | + **loadBalancerId** | **string**| The Load Balancer id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseL7Policy**](DataResponse«L7Policy».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DeleteListenerUsingDELETE** +> DeleteListenerUsingDELETE(ctx, listenerId, projectId) +Delete a listener + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **listenerId** | **string**| listener id | + **projectId** | **string**| project id | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DeletePolicyUsingDELETE** +> DeletePolicyUsingDELETE(ctx, listenerId, loadBalancerId, policyId, projectId) +Delete a policy + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **listenerId** | **string**| listener id | + **loadBalancerId** | **string**| The Load Balancer id | + **policyId** | **string**| policy id | + **projectId** | **string**| project id | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetL7PolicyUsingGET** +> DataResponseL7Policy GetL7PolicyUsingGET(ctx, l7PolicyId, listenerId, loadBalancerId, projectId) +Get a specific policy of a listener by l7PolicyId + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **l7PolicyId** | **string**| The l7Policy id | + **listenerId** | **string**| The listener id | + **loadBalancerId** | **string**| The Load Balancer id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseL7Policy**](DataResponse«L7Policy».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetListL7PoliciesUsingGET** +> DataResponseListL7Policy GetListL7PoliciesUsingGET(ctx, listenerId, loadBalancerId, projectId) +Get list policies of a listener + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **listenerId** | **string**| The listener id | + **loadBalancerId** | **string**| The Load Balancer id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseListL7Policy**](DataResponse«List«L7Policy»».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetListListenersByLoadBalancerUsingGET** +> DataResponseListListener GetListListenersByLoadBalancerUsingGET(ctx, loadBalancerId, projectId) +Get list of listeners of a Load Balancer + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **loadBalancerId** | **string**| The Load Balancer id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseListListener**](DataResponse«List«Listener»».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetListenersUsingGET** +> DataResponseListener GetListenersUsingGET(ctx, listenerId, loadBalancerId, projectId) +Get a specific listener + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **listenerId** | **string**| The listener id | + **loadBalancerId** | **string**| The Load Balancer id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseListener**](DataResponse«Listener».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ReorderPoliciesUsingPUT** +> map[string]string ReorderPoliciesUsingPUT(ctx, listenerId, projectId, reorderPoliciesRequestV2) +Reorder the L7 policies + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **listenerId** | **string**| listener id | + **projectId** | **string**| project id | + **reorderPoliciesRequestV2** | [**ReorderPoliciesRequestV2**](ReorderPoliciesRequestV2.md)| reorderPoliciesRequestV2 | + +### Return type + +**map[string]string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UpdateL7PolicyUsingPUT** +> DataResponseL7Policy UpdateL7PolicyUsingPUT(ctx, listenerId, loadBalancerId, policyId, projectId, updateL7PolicyRequestV2) +Update a policy + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **listenerId** | **string**| The listener id | + **loadBalancerId** | **string**| The Load Balancer id | + **policyId** | **string**| policy id | + **projectId** | **string**| project id | + **updateL7PolicyRequestV2** | [**UpdateL7PolicyRequestV2**](UpdateL7PolicyRequestV2.md)| updateL7PolicyRequestV2 | + +### Return type + +[**DataResponseL7Policy**](DataResponse«L7Policy».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UpdateListenerUsingPUT** +> DataResponseListener UpdateListenerUsingPUT(ctx, listenerId, loadBalancerId, projectId, updateListenerRequestV2) +Update a listener + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **listenerId** | **string**| The listener id | + **loadBalancerId** | **string**| The Load Balancer id | + **projectId** | **string**| The project id | + **updateListenerRequestV2** | [**UpdateListenerRequestV2**](UpdateListenerRequestV2.md)| updateListenerRequestV2 | + +### Return type + +[**DataResponseListener**](DataResponse«Listener».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/client/vserver/docs/LoadBalancerPackage.md b/client/vserver/docs/LoadBalancerPackage.md index c1c7ac0..061b5af 100644 --- a/client/vserver/docs/LoadBalancerPackage.md +++ b/client/vserver/docs/LoadBalancerPackage.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ConnectionNumber** | **int32** | | [optional] [default to null] **DataTransfer** | **int32** | | [optional] [default to null] +**LbType** | **string** | | [optional] [default to null] **Mode** | **string** | | [optional] [default to null] **Name** | **string** | | [optional] [default to null] **Type_** | **string** | | [optional] [default to null] diff --git a/client/vserver/docs/LoadBalancerPoolRestControllerV2Api.md b/client/vserver/docs/LoadBalancerPoolRestControllerV2Api.md new file mode 100644 index 0000000..0ac7354 --- /dev/null +++ b/client/vserver/docs/LoadBalancerPoolRestControllerV2Api.md @@ -0,0 +1,236 @@ +# \LoadBalancerPoolRestControllerV2Api + +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreatePoolUsingPOST**](LoadBalancerPoolRestControllerV2Api.md#CreatePoolUsingPOST) | **Post** /v2/{projectId}/loadBalancers/{loadBalancerId}/pools | Create a new pool +[**DeletePoolUsingDELETE**](LoadBalancerPoolRestControllerV2Api.md#DeletePoolUsingDELETE) | **Delete** /v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId} | Delete a pool +[**GetHealthMonitorFromPoolUsingGET**](LoadBalancerPoolRestControllerV2Api.md#GetHealthMonitorFromPoolUsingGET) | **Get** /v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId}/healthMonitor | Get the health monitor associated with a specific pool +[**GetListPoolsUsingGET**](LoadBalancerPoolRestControllerV2Api.md#GetListPoolsUsingGET) | **Get** /v2/{projectId}/loadBalancers/{loadBalancerId}/pools | Get list of pools of a load balancer +[**GetMembersFromPoolUsingGET**](LoadBalancerPoolRestControllerV2Api.md#GetMembersFromPoolUsingGET) | **Get** /v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId}/members | Get members from a pool +[**GetPoolUsingGET**](LoadBalancerPoolRestControllerV2Api.md#GetPoolUsingGET) | **Get** /v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId} | Get a specific pool +[**UpdateMembersUsingPUT**](LoadBalancerPoolRestControllerV2Api.md#UpdateMembersUsingPUT) | **Put** /v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId}/members | Update list members +[**UpdatePoolUsingPUT**](LoadBalancerPoolRestControllerV2Api.md#UpdatePoolUsingPUT) | **Put** /v2/{projectId}/loadBalancers/{loadBalancerId}/pools/{poolId} | Update a pool + + +# **CreatePoolUsingPOST** +> DataResponsePool CreatePoolUsingPOST(ctx, createPoolRequestV2, loadBalancerId, projectId) +Create a new pool + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **createPoolRequestV2** | [**CreatePoolRequestV2**](CreatePoolRequestV2.md)| createPoolRequestV2 | + **loadBalancerId** | **string**| The load balancer id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponsePool**](DataResponse«Pool».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DeletePoolUsingDELETE** +> DeletePoolUsingDELETE(ctx, poolId, projectId) +Delete a pool + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **poolId** | **string**| The pool id | + **projectId** | **string**| The project id | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetHealthMonitorFromPoolUsingGET** +> DataResponseHealthMonitor GetHealthMonitorFromPoolUsingGET(ctx, poolId, projectId) +Get the health monitor associated with a specific pool + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **poolId** | **string**| pool id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseHealthMonitor**](DataResponse«HealthMonitor».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetListPoolsUsingGET** +> DataResponseListPool GetListPoolsUsingGET(ctx, loadBalancerId, projectId) +Get list of pools of a load balancer + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **loadBalancerId** | **string**| The Load Balancer id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseListPool**](DataResponse«List«Pool»».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetMembersFromPoolUsingGET** +> DataResponseListMember GetMembersFromPoolUsingGET(ctx, poolId, projectId) +Get members from a pool + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **poolId** | **string**| pool id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseListMember**](DataResponse«List«Member»».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetPoolUsingGET** +> DataResponsePool GetPoolUsingGET(ctx, loadBalancerId, poolId, projectId) +Get a specific pool + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **loadBalancerId** | **string**| The Load Balancer id | + **poolId** | **string**| The listener id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponsePool**](DataResponse«Pool».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UpdateMembersUsingPUT** +> map[string]string UpdateMembersUsingPUT(ctx, poolId, projectId, updateMembersRequestV2) +Update list members + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **poolId** | **string**| The pool id | + **projectId** | **string**| The project id | + **updateMembersRequestV2** | [**UpdateMembersRequestV2**](UpdateMembersRequestV2.md)| updateMembersRequestV2 | + +### Return type + +**map[string]string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UpdatePoolUsingPUT** +> DataResponsePool UpdatePoolUsingPUT(ctx, poolId, projectId, updatePoolRequestV2) +Update a pool + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **poolId** | **string**| The pool id | + **projectId** | **string**| The project id | + **updatePoolRequestV2** | [**UpdatePoolRequestV2**](UpdatePoolRequestV2.md)| updatePoolRequestV2 | + +### Return type + +[**DataResponsePool**](DataResponse«Pool».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/client/vserver/docs/LoadBalancerRestControllerApi.md b/client/vserver/docs/LoadBalancerRestControllerApi.md index 3d04bc2..2d79c95 100644 --- a/client/vserver/docs/LoadBalancerRestControllerApi.md +++ b/client/vserver/docs/LoadBalancerRestControllerApi.md @@ -1,6 +1,6 @@ # \LoadBalancerRestControllerApi -All URIs are relative to *https://virtserver.swaggerhub.com/manhtu1997/vserver/1.0.2* +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -18,7 +18,7 @@ Method | HTTP request | Description [**GetL7PoliciesUsingGET**](LoadBalancerRestControllerApi.md#GetL7PoliciesUsingGET) | **Get** /v1/{project_id}/listeners/{listener_id}/l7policies | Get list policies of a listener [**GetListListenersUsingGET**](LoadBalancerRestControllerApi.md#GetListListenersUsingGET) | **Get** /v1/{project_id}/load-balancers/{load_balancer_id}/listeners | Get list of listeners of a load balancer [**GetListLoadBalancersUsingGET**](LoadBalancerRestControllerApi.md#GetListLoadBalancersUsingGET) | **Get** /v1/{project_id}/load-balancers | Get list of load balancers -[**GetListPoolsUsingGET**](LoadBalancerRestControllerApi.md#GetListPoolsUsingGET) | **Get** /v1/{project_id}/load-balancers/{load_balancer_id}/pools | Get list of pools of a load balancer +[**GetListPoolsUsingGET1**](LoadBalancerRestControllerApi.md#GetListPoolsUsingGET1) | **Get** /v1/{project_id}/load-balancers/{load_balancer_id}/pools | Get list of pools of a load balancer [**GetListenerUsingGET**](LoadBalancerRestControllerApi.md#GetListenerUsingGET) | **Get** /v1/{project_id}/listeners/{listener_id} | Get a specific listener [**GetLoadBalancerUsingGET**](LoadBalancerRestControllerApi.md#GetLoadBalancerUsingGET) | **Get** /v1/{project_id}/load-balancers/{load_balancer_id} | Get a specific load balancer [**GetMemberFromPoolUsingGET**](LoadBalancerRestControllerApi.md#GetMemberFromPoolUsingGET) | **Get** /v1/{project_id}/pools/{pool_id}/members | Get members from a pool @@ -439,8 +439,8 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **GetListPoolsUsingGET** -> PagingPool GetListPoolsUsingGET(ctx, loadBalancerId, projectId, optional) +# **GetListPoolsUsingGET1** +> PagingPool GetListPoolsUsingGET1(ctx, loadBalancerId, projectId, optional) Get list of pools of a load balancer ### Required Parameters @@ -450,10 +450,10 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **loadBalancerId** | **string**| load balancer id | **projectId** | **string**| project id | - **optional** | ***LoadBalancerRestControllerApiGetListPoolsUsingGETOpts** | optional parameters | nil if no parameters + **optional** | ***LoadBalancerRestControllerApiGetListPoolsUsingGET1Opts** | optional parameters | nil if no parameters ### Optional Parameters -Optional parameters are passed through a pointer to a LoadBalancerRestControllerApiGetListPoolsUsingGETOpts struct +Optional parameters are passed through a pointer to a LoadBalancerRestControllerApiGetListPoolsUsingGET1Opts struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- diff --git a/client/vserver/docs/LoadBalancerRestControllerV2Api.md b/client/vserver/docs/LoadBalancerRestControllerV2Api.md new file mode 100644 index 0000000..d6f5d43 --- /dev/null +++ b/client/vserver/docs/LoadBalancerRestControllerV2Api.md @@ -0,0 +1,176 @@ +# \LoadBalancerRestControllerV2Api + +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateLoadBalancerUsingPOST1**](LoadBalancerRestControllerV2Api.md#CreateLoadBalancerUsingPOST1) | **Post** /v2/{projectId}/loadBalancers | Create a new load balancer +[**DeleteLoadBalancerUsingDELETE1**](LoadBalancerRestControllerV2Api.md#DeleteLoadBalancerUsingDELETE1) | **Delete** /v2/{projectId}/loadBalancers/{loadBalancerId} | Delete a load balancer +[**GetHeadersUsingGET1**](LoadBalancerRestControllerV2Api.md#GetHeadersUsingGET1) | **Get** /v2/{projectId}/loadBalancers/headers | Get list headers +[**GetListLoadBalancerWithPagingUsingGET**](LoadBalancerRestControllerV2Api.md#GetListLoadBalancerWithPagingUsingGET) | **Get** /v2/{projectId}/loadBalancers | List LoadBalancers Paging +[**GetLoadBalancerUsingGET1**](LoadBalancerRestControllerV2Api.md#GetLoadBalancerUsingGET1) | **Get** /v2/{projectId}/loadBalancers/{loadBalancerId} | Load Balancer By Load Balancer Id +[**GetPackagesUsingGET1**](LoadBalancerRestControllerV2Api.md#GetPackagesUsingGET1) | **Get** /v2/{projectId}/loadBalancers/packages | Get list packages + + +# **CreateLoadBalancerUsingPOST1** +> DataResponseLoadBalancer CreateLoadBalancerUsingPOST1(ctx, createLoadBalancerRequestV2, projectId) +Create a new load balancer + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **createLoadBalancerRequestV2** | [**CreateLoadBalancerRequestV2**](CreateLoadBalancerRequestV2.md)| createLoadBalancerRequestV2 | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseLoadBalancer**](DataResponse«LoadBalancer».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DeleteLoadBalancerUsingDELETE1** +> DeleteLoadBalancerUsingDELETE1(ctx, loadBalancerId, projectId) +Delete a load balancer + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **loadBalancerId** | **string**| The load balancer id | + **projectId** | **string**| The project id | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetHeadersUsingGET1** +> DataResponseListstring GetHeadersUsingGET1(ctx, projectId) +Get list headers + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| project id | + +### Return type + +[**DataResponseListstring**](DataResponse«List«string»».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetListLoadBalancerWithPagingUsingGET** +> PagingLoadBalancerDto GetListLoadBalancerWithPagingUsingGET(ctx, name, page, projectId, size) +List LoadBalancers Paging + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **name** | **string**| name | + **page** | **string**| page | [default to 1] + **projectId** | **string**| project id | + **size** | **string**| size | [default to 10] + +### Return type + +[**PagingLoadBalancerDto**](Paging«LoadBalancerDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetLoadBalancerUsingGET1** +> DataResponseLoadBalancerDto GetLoadBalancerUsingGET1(ctx, loadBalancerId, projectId) +Load Balancer By Load Balancer Id + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **loadBalancerId** | **string**| The load balancer id | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseLoadBalancerDto**](DataResponse«LoadBalancerDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetPackagesUsingGET1** +> PagingLoadBalancerPackage GetPackagesUsingGET1(ctx, projectId) +Get list packages + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + +### Return type + +[**PagingLoadBalancerPackage**](Paging«LoadBalancerPackage».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/client/vserver/docs/NetworkAclDetailDto.md b/client/vserver/docs/NetworkAclDetailDto.md new file mode 100644 index 0000000..4965a29 --- /dev/null +++ b/client/vserver/docs/NetworkAclDetailDto.md @@ -0,0 +1,19 @@ +# NetworkAclDetailDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AclPolicyId** | **string** | | [optional] [default to null] +**AclPolicyRules** | [**[]AclPolicyRule**](AclPolicyRule.md) | | [optional] [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**DefaultAcl** | **bool** | | [optional] [default to null] +**InterfaceNetworkUuid** | **string** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**ProjectUuid** | **string** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**SubnetAssociationList** | **[]string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/NetworkAclDto.md b/client/vserver/docs/NetworkAclDto.md new file mode 100644 index 0000000..0ff3088 --- /dev/null +++ b/client/vserver/docs/NetworkAclDto.md @@ -0,0 +1,16 @@ +# NetworkAclDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**DefaultAcl** | **bool** | | [optional] [default to null] +**InterfaceNetworkUuid** | **string** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**ProjectUuid** | **string** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/NetworkAclPolicyRuleDto.md b/client/vserver/docs/NetworkAclPolicyRuleDto.md new file mode 100644 index 0000000..7272479 --- /dev/null +++ b/client/vserver/docs/NetworkAclPolicyRuleDto.md @@ -0,0 +1,18 @@ +# NetworkAclPolicyRuleDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Action** | **string** | | [optional] [default to null] +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**InterfaceAclPolicyUuid** | **string** | | [optional] [default to null] +**Port** | **string** | | [optional] [default to null] +**Protocol** | **string** | | [optional] [default to null] +**SeqNumber** | **int32** | | [optional] [default to null] +**Source** | **string** | | [optional] [default to null] +**Type_** | **string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/NetworkAclRestControllerV2Api.md b/client/vserver/docs/NetworkAclRestControllerV2Api.md new file mode 100644 index 0000000..b3b49ec --- /dev/null +++ b/client/vserver/docs/NetworkAclRestControllerV2Api.md @@ -0,0 +1,208 @@ +# \NetworkAclRestControllerV2Api + +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateNetworkAclUsingPOST1**](NetworkAclRestControllerV2Api.md#CreateNetworkAclUsingPOST1) | **Post** /v2/{projectId}/policies | Create Network-acl +[**DeleteNetworkAclUsingDELETE1**](NetworkAclRestControllerV2Api.md#DeleteNetworkAclUsingDELETE1) | **Delete** /v2/{projectId}/policies/{networkAclUuid} | Delete Network-acl +[**GetNetworkAclPolicyRulesUsingGET**](NetworkAclRestControllerV2Api.md#GetNetworkAclPolicyRulesUsingGET) | **Get** /v2/{projectId}/policies/{uuid}/rules | Get Network-Acl Policy rules (inbound/outbound) by uuid +[**GetNetworkAclUsingGET1**](NetworkAclRestControllerV2Api.md#GetNetworkAclUsingGET1) | **Get** /v2/{projectId}/policies/{uuid} | Get Detail Network-Acl by uuid +[**GetNetworkAclsUsingGET**](NetworkAclRestControllerV2Api.md#GetNetworkAclsUsingGET) | **Get** /v2/{projectId}/policies/list | List network-acl by project id and network acl uuid +[**UpdateAssociatedSubnetsUsingPUT1**](NetworkAclRestControllerV2Api.md#UpdateAssociatedSubnetsUsingPUT1) | **Put** /v2/{projectId}/policies/{uuid}/subnets | Update associated Subnets ACL of Network-Acl +[**UpdateRulesUsingPUT1**](NetworkAclRestControllerV2Api.md#UpdateRulesUsingPUT1) | **Put** /v2/{projectId}/policies/{uuid}/rules | Update Inbound/Outbound Rules of Network-acl + + +# **CreateNetworkAclUsingPOST1** +> DataResponseNetworkAclDto CreateNetworkAclUsingPOST1(ctx, createNetworkAclRequest, projectId) +Create Network-acl + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **createNetworkAclRequest** | [**CreateNetworkAclRequest**](CreateNetworkAclRequest.md)| createNetworkAclRequest | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseNetworkAclDto**](DataResponse«NetworkAclDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DeleteNetworkAclUsingDELETE1** +> DeleteNetworkAclUsingDELETE1(ctx, networkAclUuid, projectId) +Delete Network-acl + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **networkAclUuid** | **string**| The network-acl Uuid | + **projectId** | **string**| The project id | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetNetworkAclPolicyRulesUsingGET** +> DataResponseListNetworkAclPolicyRuleDto GetNetworkAclPolicyRulesUsingGET(ctx, projectId, uuid) +Get Network-Acl Policy rules (inbound/outbound) by uuid + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + **uuid** | **string**| The network-acl uuid | + +### Return type + +[**DataResponseListNetworkAclPolicyRuleDto**](DataResponse«List«NetworkAclPolicyRuleDto»».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetNetworkAclUsingGET1** +> DataResponseNetworkAclDetailDto GetNetworkAclUsingGET1(ctx, projectId, uuid) +Get Detail Network-Acl by uuid + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + **uuid** | **string**| The network-acl uuid | + +### Return type + +[**DataResponseNetworkAclDetailDto**](DataResponse«NetworkAclDetailDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetNetworkAclsUsingGET** +> PagingNetworkAclDto GetNetworkAclsUsingGET(ctx, name, page, projectId, size) +List network-acl by project id and network acl uuid + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **name** | **string**| name | + **page** | **string**| page | [default to 1] + **projectId** | **string**| The project id | + **size** | **string**| size | [default to 10] + +### Return type + +[**PagingNetworkAclDto**](Paging«NetworkAclDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UpdateAssociatedSubnetsUsingPUT1** +> DataResponseNetworkAclDto UpdateAssociatedSubnetsUsingPUT1(ctx, projectId, updateSubnetsRequest, uuid) +Update associated Subnets ACL of Network-Acl + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + **updateSubnetsRequest** | [**UpdateNetworkAclSubnetsRequest**](UpdateNetworkAclSubnetsRequest.md)| updateSubnetsRequest | + **uuid** | **string**| The network-acl uuid | + +### Return type + +[**DataResponseNetworkAclDto**](DataResponse«NetworkAclDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UpdateRulesUsingPUT1** +> DataResponseNetworkAclModel UpdateRulesUsingPUT1(ctx, projectId, updateAclRulesRequest, uuid) +Update Inbound/Outbound Rules of Network-acl + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + **updateAclRulesRequest** | [**UpdateNetworkAclRulesRequest**](UpdateNetworkAclRulesRequest.md)| updateAclRulesRequest | + **uuid** | **string**| The network-acl uuid | + +### Return type + +[**DataResponseNetworkAclModel**](DataResponse«NetworkAclModel».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/client/vserver/docs/NetworkInterfaceElasticRestControllerV2Api.md b/client/vserver/docs/NetworkInterfaceElasticRestControllerV2Api.md index 081b8dd..0de9338 100644 --- a/client/vserver/docs/NetworkInterfaceElasticRestControllerV2Api.md +++ b/client/vserver/docs/NetworkInterfaceElasticRestControllerV2Api.md @@ -1,6 +1,6 @@ # \NetworkInterfaceElasticRestControllerV2Api -All URIs are relative to *https://virtserver.swaggerhub.com/manhtu1997/vserver/1.0.2* +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/vserver/docs/NetworkRestControllerApi.md b/client/vserver/docs/NetworkRestControllerApi.md index ccb9b46..76dc4f9 100644 --- a/client/vserver/docs/NetworkRestControllerApi.md +++ b/client/vserver/docs/NetworkRestControllerApi.md @@ -1,6 +1,6 @@ # \NetworkRestControllerApi -All URIs are relative to *https://virtserver.swaggerhub.com/manhtu1997/vserver/1.0.2* +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/vserver/docs/NetworkRestControllerV2Api.md b/client/vserver/docs/NetworkRestControllerV2Api.md index 40eb5d7..843f30a 100644 --- a/client/vserver/docs/NetworkRestControllerV2Api.md +++ b/client/vserver/docs/NetworkRestControllerV2Api.md @@ -1,6 +1,6 @@ # \NetworkRestControllerV2Api -All URIs are relative to *https://virtserver.swaggerhub.com/manhtu1997/vserver/1.0.2* +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/client/vserver/docs/NodeConsoleResultDto.md b/client/vserver/docs/NodeConsoleResultDto.md new file mode 100644 index 0000000..f399a71 --- /dev/null +++ b/client/vserver/docs/NodeConsoleResultDto.md @@ -0,0 +1,10 @@ +# NodeConsoleResultDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/NodeGroupRequestModel.md b/client/vserver/docs/NodeGroupRequestModel.md new file mode 100644 index 0000000..6ecb715 --- /dev/null +++ b/client/vserver/docs/NodeGroupRequestModel.md @@ -0,0 +1,12 @@ +# NodeGroupRequestModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FlavorId** | **string** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**NodeCount** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/PagingCaDto.md b/client/vserver/docs/PagingCaDto.md new file mode 100644 index 0000000..4565968 --- /dev/null +++ b/client/vserver/docs/PagingCaDto.md @@ -0,0 +1,14 @@ +# PagingCaDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListData** | [**[]CaDto**](CADto.md) | | [optional] [default to null] +**Page** | **int32** | | [optional] [default to null] +**PageSize** | **int32** | | [optional] [default to null] +**TotalItem** | **int64** | | [optional] [default to null] +**TotalPage** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/PagingClusterDto.md b/client/vserver/docs/PagingClusterDto.md new file mode 100644 index 0000000..5f2597c --- /dev/null +++ b/client/vserver/docs/PagingClusterDto.md @@ -0,0 +1,14 @@ +# PagingClusterDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListData** | [**[]ClusterDto**](ClusterDto.md) | | [optional] [default to null] +**Page** | **int32** | | [optional] [default to null] +**PageSize** | **int32** | | [optional] [default to null] +**TotalItem** | **int64** | | [optional] [default to null] +**TotalPage** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/PagingLoadBalancerDto.md b/client/vserver/docs/PagingLoadBalancerDto.md new file mode 100644 index 0000000..54c0b4d --- /dev/null +++ b/client/vserver/docs/PagingLoadBalancerDto.md @@ -0,0 +1,14 @@ +# PagingLoadBalancerDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListData** | [**[]LoadBalancerDto**](LoadBalancerDto.md) | | [optional] [default to null] +**Page** | **int32** | | [optional] [default to null] +**PageSize** | **int32** | | [optional] [default to null] +**TotalItem** | **int64** | | [optional] [default to null] +**TotalPage** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/PagingNetworkAclDto.md b/client/vserver/docs/PagingNetworkAclDto.md new file mode 100644 index 0000000..556c468 --- /dev/null +++ b/client/vserver/docs/PagingNetworkAclDto.md @@ -0,0 +1,14 @@ +# PagingNetworkAclDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListData** | [**[]NetworkAclDto**](NetworkAclDto.md) | | [optional] [default to null] +**Page** | **int32** | | [optional] [default to null] +**PageSize** | **int32** | | [optional] [default to null] +**TotalItem** | **int64** | | [optional] [default to null] +**TotalPage** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/PagingPersistentVolumeDto.md b/client/vserver/docs/PagingPersistentVolumeDto.md new file mode 100644 index 0000000..152934c --- /dev/null +++ b/client/vserver/docs/PagingPersistentVolumeDto.md @@ -0,0 +1,14 @@ +# PagingPersistentVolumeDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListData** | [**[]PersistentVolumeDto**](PersistentVolumeDto.md) | | [optional] [default to null] +**Page** | **int32** | | [optional] [default to null] +**PageSize** | **int32** | | [optional] [default to null] +**TotalItem** | **int64** | | [optional] [default to null] +**TotalPage** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/PagingRouteTableDto.md b/client/vserver/docs/PagingRouteTableDto.md new file mode 100644 index 0000000..6d48386 --- /dev/null +++ b/client/vserver/docs/PagingRouteTableDto.md @@ -0,0 +1,14 @@ +# PagingRouteTableDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListData** | [**[]RouteTableDto**](RouteTableDto.md) | | [optional] [default to null] +**Page** | **int32** | | [optional] [default to null] +**PageSize** | **int32** | | [optional] [default to null] +**TotalItem** | **int64** | | [optional] [default to null] +**TotalPage** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/PersistentVolumeDto.md b/client/vserver/docs/PersistentVolumeDto.md new file mode 100644 index 0000000..49b861e --- /dev/null +++ b/client/vserver/docs/PersistentVolumeDto.md @@ -0,0 +1,19 @@ +# PersistentVolumeDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterId** | **string** | | [optional] [default to null] +**CreatedAt** | **string** | | [optional] [default to null] +**DeletedAt** | **string** | | [optional] [default to null] +**IopsId** | **int64** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**Size** | **int32** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**UpdatedAt** | **string** | | [optional] [default to null] +**VmId** | **string** | | [optional] [default to null] +**VolumeId** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/PersistentVolumeRestControllerV2Api.md b/client/vserver/docs/PersistentVolumeRestControllerV2Api.md new file mode 100644 index 0000000..0a64c1e --- /dev/null +++ b/client/vserver/docs/PersistentVolumeRestControllerV2Api.md @@ -0,0 +1,74 @@ +# \PersistentVolumeRestControllerV2Api + +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeletePersistentVolumeUsingDELETE**](PersistentVolumeRestControllerV2Api.md#DeletePersistentVolumeUsingDELETE) | **Delete** /v2/{projectId}/persistent-volumes/{pvId} | Delete Persistent Volume +[**ListPersistentVolumeUsingGET**](PersistentVolumeRestControllerV2Api.md#ListPersistentVolumeUsingGET) | **Get** /v2/{projectId}/persistent-volumes | List Persistent Volume + + +# **DeletePersistentVolumeUsingDELETE** +> DataResponse DeletePersistentVolumeUsingDELETE(ctx, projectId, pvId) +Delete Persistent Volume + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + **pvId** | **string**| The persistent volume id | + +### Return type + +[**DataResponse**](DataResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListPersistentVolumeUsingGET** +> PagingPersistentVolumeDto ListPersistentVolumeUsingGET(ctx, projectId, optional) +List Persistent Volume + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + **optional** | ***PersistentVolumeRestControllerV2ApiListPersistentVolumeUsingGETOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a PersistentVolumeRestControllerV2ApiListPersistentVolumeUsingGETOpts struct + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **name** | **optional.String**| name | + **page** | **optional.Int32**| page | + **size** | **optional.Int32**| size | + +### Return type + +[**PagingPersistentVolumeDto**](Paging«PersistentVolumeDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/client/vserver/docs/Pool.md b/client/vserver/docs/Pool.md index 383f298..f06069a 100644 --- a/client/vserver/docs/Pool.md +++ b/client/vserver/docs/Pool.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **Protocol** | **string** | | [optional] [default to null] **ProvisioningStatus** | **string** | | [optional] [default to null] **SessionPersistence** | **int32** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] **UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] **Uuid** | **string** | | [optional] [default to null] diff --git a/client/vserver/docs/PoolItem.md b/client/vserver/docs/PoolItem.md new file mode 100644 index 0000000..b5bd470 --- /dev/null +++ b/client/vserver/docs/PoolItem.md @@ -0,0 +1,13 @@ +# PoolItem + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MonitorPort** | **int32** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**PoolId** | **string** | | [optional] [default to null] +**Port** | **int32** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ProjectRestControllerApi.md b/client/vserver/docs/ProjectRestControllerApi.md index 745cc8a..d234ba7 100644 --- a/client/vserver/docs/ProjectRestControllerApi.md +++ b/client/vserver/docs/ProjectRestControllerApi.md @@ -1,11 +1,12 @@ # \ProjectRestControllerApi -All URIs are relative to *https://virtserver.swaggerhub.com/manhtu1997/vserver/1.0.2* +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* Method | HTTP request | Description ------------- | ------------- | ------------- [**CreateProjectUsingPOST**](ProjectRestControllerApi.md#CreateProjectUsingPOST) | **Post** /v1/projects | createProject [**GetProjectUsingGET**](ProjectRestControllerApi.md#GetProjectUsingGET) | **Get** /v1/projects/{project_id} | getProject +[**ListAllProjectUsingGET**](ProjectRestControllerApi.md#ListAllProjectUsingGET) | **Get** /v1/projects/all | listAllProject [**ListProjectUsingGET**](ProjectRestControllerApi.md#ListProjectUsingGET) | **Get** /v1/projects | listProject @@ -57,6 +58,28 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **ListAllProjectUsingGET** +> []ProjectInfo ListAllProjectUsingGET(ctx, ) +listAllProject + +### Required Parameters +This endpoint does not need any parameter. + +### Return type + +[**[]ProjectInfo**](ProjectInfo.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **ListProjectUsingGET** > ProjectResponse ListProjectUsingGET(ctx, ) listProject diff --git a/client/vserver/docs/RegionControllerV2Api.md b/client/vserver/docs/RegionControllerV2Api.md new file mode 100644 index 0000000..11e65d9 --- /dev/null +++ b/client/vserver/docs/RegionControllerV2Api.md @@ -0,0 +1,63 @@ +# \RegionControllerV2Api + +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetALlRegionUsingGET**](RegionControllerV2Api.md#GetALlRegionUsingGET) | **Get** /v2/{projectId}/region | Get All Region +[**ListQuotaUsedUsingGET2**](RegionControllerV2Api.md#ListQuotaUsedUsingGET2) | **Get** /v2/{projectId}/region/{regionId}/users/validation | Check userId belong to Region + + +# **GetALlRegionUsingGET** +> DataResponseListRegionDto GetALlRegionUsingGET(ctx, projectId) +Get All Region + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| projectId | + +### Return type + +[**DataResponseListRegionDto**](DataResponse«List«RegionDto»».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListQuotaUsedUsingGET2** +> DataResponseboolean ListQuotaUsedUsingGET2(ctx, projectId, regionId) +Check userId belong to Region + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| projectId | + **regionId** | **string**| regionId | + +### Return type + +[**DataResponseboolean**](DataResponse«boolean».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/client/vserver/docs/RegionDto.md b/client/vserver/docs/RegionDto.md new file mode 100644 index 0000000..a564fba --- /dev/null +++ b/client/vserver/docs/RegionDto.md @@ -0,0 +1,13 @@ +# RegionDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | | [optional] [default to null] +**Id** | **string** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**UserId** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ReorderPoliciesRequest.md b/client/vserver/docs/ReorderPoliciesRequest.md index c0059c6..9a09a7e 100644 --- a/client/vserver/docs/ReorderPoliciesRequest.md +++ b/client/vserver/docs/ReorderPoliciesRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ListenerId** | **string** | Listener's id of the policies | [optional] [default to null] -**Policies** | [**[]ReorderPolicyRequest**](ReorderPolicyRequest.md) | List of policies to reorder | [optional] [default to null] +**Policies** | [**[]ReorderPolicyRequest**](ReorderPolicyRequest.md) | List of policies to reorder | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/client/vserver/docs/ReorderPoliciesRequestV2.md b/client/vserver/docs/ReorderPoliciesRequestV2.md new file mode 100644 index 0000000..a0b1c35 --- /dev/null +++ b/client/vserver/docs/ReorderPoliciesRequestV2.md @@ -0,0 +1,10 @@ +# ReorderPoliciesRequestV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Policies** | [**[]ReorderPolicyRequest**](ReorderPolicyRequest.md) | List of policies to reorder, start from 1 to .... | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ReorderPolicyRequest.md b/client/vserver/docs/ReorderPolicyRequest.md index 766b928..15c05f9 100644 --- a/client/vserver/docs/ReorderPolicyRequest.md +++ b/client/vserver/docs/ReorderPolicyRequest.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**PolicyId** | **string** | Policy's id to reorder | [optional] [default to null] -**Position** | **int64** | New position of the policy | [optional] [default to null] +**PolicyId** | **string** | Policy's id to reorder | [default to null] +**Position** | **int64** | New position of the policy, start from 1 to ... | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/client/vserver/docs/RouteTableDto.md b/client/vserver/docs/RouteTableDto.md new file mode 100644 index 0000000..9c1a72b --- /dev/null +++ b/client/vserver/docs/RouteTableDto.md @@ -0,0 +1,16 @@ +# RouteTableDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**Routes** | [**[]RoutesDto**](RoutesDto.md) | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**System** | **bool** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] +**VpcUuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/RouteTableRestControllerV2Api.md b/client/vserver/docs/RouteTableRestControllerV2Api.md new file mode 100644 index 0000000..777e0d0 --- /dev/null +++ b/client/vserver/docs/RouteTableRestControllerV2Api.md @@ -0,0 +1,179 @@ +# \RouteTableRestControllerV2Api + +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateRouteTableUsingPOST1**](RouteTableRestControllerV2Api.md#CreateRouteTableUsingPOST1) | **Post** /v2/{projectId}/route-table | Create Route-table +[**DeleteRouteTableUsingDELETE1**](RouteTableRestControllerV2Api.md#DeleteRouteTableUsingDELETE1) | **Delete** /v2/{projectId}/route-table/{routeId} | Delete Route Table +[**GetRouteTableUsingGET1**](RouteTableRestControllerV2Api.md#GetRouteTableUsingGET1) | **Get** /v2/{projectId}/route-table/{uuid} | Get Route table by uuid +[**ListRouteTablesWithPagingUsingGET**](RouteTableRestControllerV2Api.md#ListRouteTablesWithPagingUsingGET) | **Get** /v2/{projectId}/route-table/route/{routeTableId} | List Route from Route-Table +[**ListRouteTablesWithPagingUsingGET1**](RouteTableRestControllerV2Api.md#ListRouteTablesWithPagingUsingGET1) | **Get** /v2/{projectId}/route-table | List Route Table V2 +[**UpdateRouteTableDetailUsingPUT**](RouteTableRestControllerV2Api.md#UpdateRouteTableDetailUsingPUT) | **Put** /v2/{projectId}/route-table/{uuid}/routes | Add or remove Route to Route-Table + + +# **CreateRouteTableUsingPOST1** +> DataResponseRouteTableDto CreateRouteTableUsingPOST1(ctx, createRouteTableRequest, projectId) +Create Route-table + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **createRouteTableRequest** | [**CreateRouteTableRequest**](CreateRouteTableRequest.md)| createRouteTableRequest | + **projectId** | **string**| The project id | + +### Return type + +[**DataResponseRouteTableDto**](DataResponse«RouteTableDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DeleteRouteTableUsingDELETE1** +> DeleteRouteTableUsingDELETE1(ctx, projectId, routeId) +Delete Route Table + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| projectId | + **routeId** | **string**| routeId | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetRouteTableUsingGET1** +> DataResponseRouteTableDto GetRouteTableUsingGET1(ctx, projectId, uuid) +Get Route table by uuid + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| project id | + **uuid** | **string**| The route-table uuid | + +### Return type + +[**DataResponseRouteTableDto**](DataResponse«RouteTableDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListRouteTablesWithPagingUsingGET** +> DataResponseListRoutesDto ListRouteTablesWithPagingUsingGET(ctx, projectId, routeTableId) +List Route from Route-Table + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| projectId | + **routeTableId** | **string**| routeTableId | + +### Return type + +[**DataResponseListRoutesDto**](DataResponse«List«RoutesDto»».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListRouteTablesWithPagingUsingGET1** +> PagingRouteTableDto ListRouteTablesWithPagingUsingGET1(ctx, name, page, projectId, size) +List Route Table V2 + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **name** | **string**| name | + **page** | **string**| page | [default to 1] + **projectId** | **string**| project id | + **size** | **string**| size | [default to 10] + +### Return type + +[**PagingRouteTableDto**](Paging«RouteTableDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **UpdateRouteTableDetailUsingPUT** +> DataResponseRouteTableDto UpdateRouteTableDetailUsingPUT(ctx, projectId, updateRouteRequest, uuid) +Add or remove Route to Route-Table + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **projectId** | **string**| The project id | + **updateRouteRequest** | [**RouteTableUpdateRouteRequest**](RouteTableUpdateRouteRequest.md)| updateRouteRequest | + **uuid** | **string**| The route-table uuid | + +### Return type + +[**DataResponseRouteTableDto**](DataResponse«RouteTableDto».md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/client/vserver/docs/RoutesDto.md b/client/vserver/docs/RoutesDto.md new file mode 100644 index 0000000..fe7381b --- /dev/null +++ b/client/vserver/docs/RoutesDto.md @@ -0,0 +1,15 @@ +# RoutesDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Destination** | **string** | | [optional] [default to null] +**RouteTableUuid** | **string** | | [optional] [default to null] +**RoutingType** | **string** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**TargetUuid** | **string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/ScaleMinionBackendRequest.md b/client/vserver/docs/ScaleMinionBackendRequest.md new file mode 100644 index 0000000..285839b --- /dev/null +++ b/client/vserver/docs/ScaleMinionBackendRequest.md @@ -0,0 +1,12 @@ +# ScaleMinionBackendRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterId** | **string** | Id of Cluster | [optional] [default to null] +**NodeCount** | **int32** | Number of node want to scale up | [optional] [default to null] +**NodeGroupId** | **string** | Id of Node Group | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/SecGroupDefault.md b/client/vserver/docs/SecGroupDefault.md new file mode 100644 index 0000000..eb3af0a --- /dev/null +++ b/client/vserver/docs/SecGroupDefault.md @@ -0,0 +1,11 @@ +# SecGroupDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rules** | [**[]SecGroupRuleDefault**](SecGroupRuleDefault.md) | | [optional] [default to null] +**SecgroupName** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/SecGroupRuleDefault.md b/client/vserver/docs/SecGroupRuleDefault.md new file mode 100644 index 0000000..360b139 --- /dev/null +++ b/client/vserver/docs/SecGroupRuleDefault.md @@ -0,0 +1,16 @@ +# SecGroupRuleDefault + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Direction** | **string** | | [optional] [default to null] +**Ethertype** | **string** | | [optional] [default to null] +**PortRangeMax** | **int64** | | [optional] [default to null] +**PortRangeMin** | **int64** | | [optional] [default to null] +**Protocol** | **string** | | [optional] [default to null] +**RemoteGroupName** | **string** | | [optional] [default to null] +**RemoteIpPrefix** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/Server.md b/client/vserver/docs/Server.md index acc8606..abce6bd 100644 --- a/client/vserver/docs/Server.md +++ b/client/vserver/docs/Server.md @@ -3,6 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**BootVolumeId** | **string** | | [optional] [default to null] **CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] **EncryptionVolume** | **bool** | | [optional] [default to null] **ExternalInterfaces** | [**[]InterfaceNetworkInterface**](InterfaceNetworkInterface.md) | | [optional] [default to null] @@ -10,7 +11,9 @@ Name | Type | Description | Notes **Image** | [***OsImage**](OSImage.md) | | [optional] [default to null] **InternalInterfaces** | [**[]InterfaceNetworkInterface**](InterfaceNetworkInterface.md) | | [optional] [default to null] **Licence** | **bool** | | [optional] [default to null] +**Metadata** | **string** | | [optional] [default to null] **Name** | **string** | | [optional] [default to null] +**Product** | **string** | | [optional] [default to null] **SecGroups** | [**[]ServerSecGroup**](ServerSecGroup.md) | | [optional] [default to null] **ServerGroupId** | **string** | | [optional] [default to null] **ServerGroupName** | **string** | | [optional] [default to null] diff --git a/client/vserver/docs/SimpleClusterNodeGroupDto.md b/client/vserver/docs/SimpleClusterNodeGroupDto.md new file mode 100644 index 0000000..bebb4f7 --- /dev/null +++ b/client/vserver/docs/SimpleClusterNodeGroupDto.md @@ -0,0 +1,14 @@ +# SimpleClusterNodeGroupDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterNodeGroupId** | **int32** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**NodeGroupDefault** | **bool** | | [optional] [default to null] +**Status** | **string** | | [optional] [default to null] +**Uuid** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/SimpleServerTaskDto.md b/client/vserver/docs/SimpleServerTaskDto.md new file mode 100644 index 0000000..6d946a9 --- /dev/null +++ b/client/vserver/docs/SimpleServerTaskDto.md @@ -0,0 +1,10 @@ +# SimpleServerTaskDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/SubnetRestControllerV2Api.md b/client/vserver/docs/SubnetRestControllerV2Api.md index 9832e8f..ec40e6e 100644 --- a/client/vserver/docs/SubnetRestControllerV2Api.md +++ b/client/vserver/docs/SubnetRestControllerV2Api.md @@ -1,13 +1,13 @@ # \SubnetRestControllerV2Api -All URIs are relative to *https://virtserver.swaggerhub.com/manhtu1997/vserver/1.0.2* +All URIs are relative to *https://virtserver.swaggerhub.com/Ev4LiA/vserver/1.0.5* Method | HTTP request | Description ------------- | ------------- | ------------- [**CreateSubnetUsingPOST1**](SubnetRestControllerV2Api.md#CreateSubnetUsingPOST1) | **Post** /v2/{projectId}/networks/{networkId}/subnets | createSubnet [**DeleteNetworkUsingDELETE2**](SubnetRestControllerV2Api.md#DeleteNetworkUsingDELETE2) | **Delete** /v2/{projectId}/networks/{networkId}/subnets/{subnetId} | Delete subnet [**EditSubnetUsingPATCH**](SubnetRestControllerV2Api.md#EditSubnetUsingPATCH) | **Patch** /v2/{projectId}/networks/{networkId}/subnets/{subnetId} | Edit subnet -[**GetSubnetByIdUsingGET**](SubnetRestControllerV2Api.md#GetSubnetByIdUsingGET) | **Get** /v2/{projectId}/networks/{networkId}/subnets/{subnetId} | List subnet by id +[**GetSubnetUsingGET1**](SubnetRestControllerV2Api.md#GetSubnetUsingGET1) | **Get** /v2/{projectId}/networks/{networkId}/subnets/{subnetId} | Get subnet by ID [**ListSubnetOfNetworkUsingGET**](SubnetRestControllerV2Api.md#ListSubnetOfNetworkUsingGET) | **Get** /v2/{projectId}/networks/{networkId}/subnets | List subnet of network @@ -40,7 +40,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **DeleteNetworkUsingDELETE2** -> DeleteNetworkUsingDELETE2(ctx, projectId, subnetId, networkId) +> DeleteNetworkUsingDELETE2(ctx, projectId, subnetId) Delete subnet ### Required Parameters @@ -50,7 +50,6 @@ Name | Type | Description | Notes **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **projectId** | **string**| projectId | **subnetId** | **string**| subnetId | - **networkId** | **string**| networkId | ### Return type @@ -68,7 +67,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **EditSubnetUsingPATCH** -> DataResponseSubnetDto EditSubnetUsingPATCH(ctx, projectId, subnetId, updateSubnetRequest, networkId) +> DataResponseSubnetDto EditSubnetUsingPATCH(ctx, projectId, subnetId, updateSubnetRequest) Edit subnet ### Required Parameters @@ -79,7 +78,6 @@ Name | Type | Description | Notes **projectId** | **string**| projectId | **subnetId** | **string**| subnetId | **updateSubnetRequest** | [**UpdateSubnetRequest**](UpdateSubnetRequest.md)| updateSubnetRequest | - **networkId** | **string**| networkId | ### Return type @@ -96,9 +94,9 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **GetSubnetByIdUsingGET** -> SubnetDto GetSubnetByIdUsingGET(ctx, networkId, projectId, subnetId) -List subnet by id +# **GetSubnetUsingGET1** +> SubnetDto GetSubnetUsingGET1(ctx, networkId, projectId, subnetId) +Get subnet by ID ### Required Parameters diff --git a/client/vserver/docs/UpdateClusterSecGroupRequest.md b/client/vserver/docs/UpdateClusterSecGroupRequest.md new file mode 100644 index 0000000..989f2a5 --- /dev/null +++ b/client/vserver/docs/UpdateClusterSecGroupRequest.md @@ -0,0 +1,12 @@ +# UpdateClusterSecGroupRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClusterId** | **string** | Uuid of K8s Cluster | [default to null] +**Master** | **bool** | Is Master or not | [default to null] +**SecGroupIds** | **[]string** | List of Sec Group Uuid | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/UpdateL7PolicyRequestV2.md b/client/vserver/docs/UpdateL7PolicyRequestV2.md new file mode 100644 index 0000000..33392a4 --- /dev/null +++ b/client/vserver/docs/UpdateL7PolicyRequestV2.md @@ -0,0 +1,18 @@ +# UpdateL7PolicyRequestV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Action** | **string** | Action. This indicates how the listener will route traffic. The value can be REDIRECT_TO_POOL or REDIRECT_TO_URL. | [default to null] +**CompareType** | **string** | Compare operation. The value can be CONTAINS or EQUAL_TO | [default to null] +**KeepQueryString** | **bool** | Keep the query string or not. | [optional] [default to null] +**Position** | **int64** | Position of the policy | [optional] [default to null] +**RedirectHttpCode** | **int32** | Redirect HTTP code for redirecting to other URL. | [optional] [default to null] +**RedirectPoolId** | **string** | Pool for forwarding. | [optional] [default to null] +**RedirectUrl** | **string** | URL for forwarding. | [optional] [default to null] +**Type_** | **string** | Which attribute to compare. The value can be PATH or HOST_NAME | [default to null] +**Value** | **string** | The value to compare with attribute. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/UpdateListenerRequest.md b/client/vserver/docs/UpdateListenerRequest.md index 577fe0a..070f0b0 100644 --- a/client/vserver/docs/UpdateListenerRequest.md +++ b/client/vserver/docs/UpdateListenerRequest.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes **AllowedCidrs** | **string** | Allowed cidr. | [default to null] **ClientCertificate** | **string** | Client certificate | [optional] [default to null] **DefaultCertificateAuthority** | **string** | Default certificate authority. | [optional] [default to null] -**DefaultPoolId** | **string** | Id of the pool that this listener will forward to. | [optional] [default to null] -**Headers** | **[]string** | Headers | [optional] [default to null] +**DefaultPoolId** | **string** | Id of the pool that this listener will forward to. | [default to null] +**Headers** | **[]string** | List Headers | [optional] [default to null] **ListenerId** | **string** | Id of the listener to update | [default to null] **TimeoutClient** | **int32** | Idle timeout of client. The value can be in range from 1 to 3600 seconds | [default to null] **TimeoutConnection** | **int32** | Idle timeout of connection. The value can be in range from 1 to 3600 seconds | [default to null] diff --git a/client/vserver/docs/UpdateListenerRequestV2.md b/client/vserver/docs/UpdateListenerRequestV2.md new file mode 100644 index 0000000..a820491 --- /dev/null +++ b/client/vserver/docs/UpdateListenerRequestV2.md @@ -0,0 +1,17 @@ +# UpdateListenerRequestV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllowedCidrs** | **string** | Allowed cidr. | [default to null] +**ClientCertificate** | **string** | Client certificate | [optional] [default to null] +**DefaultCertificateAuthority** | **string** | Default certificate authority. | [optional] [default to null] +**DefaultPoolId** | **string** | Id of the pool that this listener will forward to. | [default to null] +**Headers** | **[]string** | List Headers | [optional] [default to null] +**TimeoutClient** | **int32** | Idle timeout of client. The value can be in range from 1 to 3600 seconds | [default to null] +**TimeoutConnection** | **int32** | Idle timeout of connection. The value can be in range from 1 to 3600 seconds | [default to null] +**TimeoutMember** | **int32** | Idle timeout of member. The value can be in range from 1 to 3600 seconds | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/UpdateMembersRequestV2.md b/client/vserver/docs/UpdateMembersRequestV2.md new file mode 100644 index 0000000..49b5d71 --- /dev/null +++ b/client/vserver/docs/UpdateMembersRequestV2.md @@ -0,0 +1,10 @@ +# UpdateMembersRequestV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Members** | [**[]CreateMemberRequest**](CreateMemberRequest.md) | List of members of the pool. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/UpdatePoolRequestV2.md b/client/vserver/docs/UpdatePoolRequestV2.md new file mode 100644 index 0000000..93fa424 --- /dev/null +++ b/client/vserver/docs/UpdatePoolRequestV2.md @@ -0,0 +1,12 @@ +# UpdatePoolRequestV2 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Algorithm** | **string** | Algorithm of the pool. The algorithm can be \"ROUND_ROBIN\" or \"LEAST_CONNECTIONS\" or \"SOURCE_IP\" | [default to null] +**HealthMonitor** | [***UpdateHealthMonitorRequest**](UpdateHealthMonitorRequest.md) | Update request for health monitor | [optional] [default to null] +**Stickiness** | **bool** | Enable sticky sessions. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/client/vserver/docs/UserImage.md b/client/vserver/docs/UserImage.md index a96bee6..102cefd 100644 --- a/client/vserver/docs/UserImage.md +++ b/client/vserver/docs/UserImage.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null] **ImageSize** | **float32** | | [optional] [default to null] +**MetaData** | **string** | | [optional] [default to null] **MinDisk** | **int32** | | [optional] [default to null] **Name** | **string** | | [optional] [default to null] **ProjectId** | **string** | | [optional] [default to null] diff --git a/client/vserver/docs/VolumeAction.md b/client/vserver/docs/VolumeAction.md index d714fe4..b2dad2d 100644 --- a/client/vserver/docs/VolumeAction.md +++ b/client/vserver/docs/VolumeAction.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Iops** | **int32** | | [optional] [default to null] +**Iops** | **string** | | [optional] [default to null] **Size** | **int32** | | [optional] [default to null] **Start** | [**time.Time**](time.Time.md) | | [optional] [default to null] **Type_** | **string** | | [optional] [default to null] diff --git a/client/vserver/model_attach_to_load_balancer_backend_request.go b/client/vserver/model_attach_to_load_balancer_backend_request.go new file mode 100644 index 0000000..b83b245 --- /dev/null +++ b/client/vserver/model_attach_to_load_balancer_backend_request.go @@ -0,0 +1,18 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +// Attach To Load Balancer Request +type AttachToLoadBalancerBackendRequest struct { + // Id of cluster + ClusterId string `json:"clusterId,omitempty"` + LoadBalancers []LoadBalancerItem `json:"loadBalancers,omitempty"` + RemovePoolWithAnotherMonitorPort bool `json:"removePoolWithAnotherMonitorPort,omitempty"` +} diff --git a/client/vserver/model_ca_dto.go b/client/vserver/model_ca_dto.go new file mode 100644 index 0000000..d62c1f3 --- /dev/null +++ b/client/vserver/model_ca_dto.go @@ -0,0 +1,22 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type CaDto struct { + CertificateType string `json:"certificateType,omitempty"` + CreatedAt time.Time `json:"createdAt,omitempty"` + ExpiredAt string `json:"expiredAt,omitempty"` + Name string `json:"name,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_cluster_config_result_dto.go b/client/vserver/model_cluster_config_result_dto.go new file mode 100644 index 0000000..fbf3a9e --- /dev/null +++ b/client/vserver/model_cluster_config_result_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type ClusterConfigResultDto struct { + Configuration string `json:"configuration,omitempty"` +} diff --git a/client/vserver/model_cluster_dto.go b/client/vserver/model_cluster_dto.go new file mode 100644 index 0000000..1e8ed9f --- /dev/null +++ b/client/vserver/model_cluster_dto.go @@ -0,0 +1,59 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type ClusterDto struct { + AclId string `json:"aclId,omitempty"` + AutoHealingEnabled bool `json:"autoHealingEnabled,omitempty"` + AutoMonitoringEnabled bool `json:"autoMonitoringEnabled,omitempty"` + AutoScalingEnabled bool `json:"autoScalingEnabled,omitempty"` + BootVolumeSize int32 `json:"bootVolumeSize,omitempty"` + BootVolumeTypeId string `json:"bootVolumeTypeId,omitempty"` + CalicoCidr string `json:"calicoCidr,omitempty"` + ClusterId int32 `json:"clusterId,omitempty"` + CreatedAt time.Time `json:"createdAt,omitempty"` + Description string `json:"description,omitempty"` + DockerVolumeSize int32 `json:"dockerVolumeSize,omitempty"` + DockerVolumeTypeId string `json:"dockerVolumeTypeId,omitempty"` + EnabledLb bool `json:"enabledLb,omitempty"` + Endpoint string `json:"endpoint,omitempty"` + EtcdVolumeSize int32 `json:"etcdVolumeSize,omitempty"` + EtcdVolumeTypeId string `json:"etcdVolumeTypeId,omitempty"` + IngressControllerEnabled bool `json:"ingressControllerEnabled,omitempty"` + K8sNetworkType string `json:"k8sNetworkType,omitempty"` + K8sNetworkTypeId string `json:"k8sNetworkTypeId,omitempty"` + K8sVersion string `json:"k8sVersion,omitempty"` + K8sVersionId string `json:"k8sVersionId,omitempty"` + MasterClusterSecGroupIdList []string `json:"masterClusterSecGroupIdList,omitempty"` + MasterCount int32 `json:"masterCount,omitempty"` + MasterFlavorId string `json:"masterFlavorId,omitempty"` + MasterFlavorName string `json:"masterFlavorName,omitempty"` + MasterInstanceTypeId string `json:"masterInstanceTypeId,omitempty"` + MaxNodeCount int32 `json:"maxNodeCount,omitempty"` + MinNodeCount int32 `json:"minNodeCount,omitempty"` + MinionClusterSecGroupIdList []string `json:"minionClusterSecGroupIdList,omitempty"` + Name string `json:"name,omitempty"` + NetworkId string `json:"networkId,omitempty"` + NodeCount int32 `json:"nodeCount,omitempty"` + NodeFlavorId string `json:"nodeFlavorId,omitempty"` + NodeFlavorName string `json:"nodeFlavorName,omitempty"` + NodeInstanceTypeId string `json:"nodeInstanceTypeId,omitempty"` + NodegroupDefaultId string `json:"nodegroupDefaultId,omitempty"` + ProjectId string `json:"projectId,omitempty"` + SshKeyId string `json:"sshKeyId,omitempty"` + SshKeyName string `json:"sshKeyName,omitempty"` + Status string `json:"status,omitempty"` + SubnetId string `json:"subnetId,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_cluster_node_dto.go b/client/vserver/model_cluster_node_dto.go new file mode 100644 index 0000000..6255c90 --- /dev/null +++ b/client/vserver/model_cluster_node_dto.go @@ -0,0 +1,25 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type ClusterNodeDto struct { + ClusterId int64 `json:"clusterId,omitempty"` + DateCreated string `json:"dateCreated,omitempty"` + DateDeleted string `json:"dateDeleted,omitempty"` + FixedIp string `json:"fixedIp,omitempty"` + FloatingIp string `json:"floatingIp,omitempty"` + IsMaster int64 `json:"isMaster,omitempty"` + Name string `json:"name,omitempty"` + NodeGroupId int32 `json:"nodeGroupId,omitempty"` + ProjectId int64 `json:"projectId,omitempty"` + Secgroup interface{} `json:"secgroup,omitempty"` + Status string `json:"status,omitempty"` + VmUuid string `json:"vmUuid,omitempty"` +} diff --git a/client/vserver/model_cluster_node_group_dto.go b/client/vserver/model_cluster_node_group_dto.go new file mode 100644 index 0000000..cb60bcf --- /dev/null +++ b/client/vserver/model_cluster_node_group_dto.go @@ -0,0 +1,28 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type ClusterNodeGroupDto struct { + ClusterId string `json:"clusterId,omitempty"` + ClusterNodeGroupId int32 `json:"clusterNodeGroupId,omitempty"` + CreatedAt time.Time `json:"createdAt,omitempty"` + FlavorId string `json:"flavorId,omitempty"` + FlavorName string `json:"flavorName,omitempty"` + Name string `json:"name,omitempty"` + NodeCount int32 `json:"nodeCount,omitempty"` + NodeGroupDefault bool `json:"nodeGroupDefault,omitempty"` + ProjectId string `json:"projectId,omitempty"` + Status string `json:"status,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_cluster_pool_dto.go b/client/vserver/model_cluster_pool_dto.go new file mode 100644 index 0000000..cf787d3 --- /dev/null +++ b/client/vserver/model_cluster_pool_dto.go @@ -0,0 +1,28 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type ClusterPoolDto struct { + ClusterId string `json:"clusterId,omitempty"` + CreatedAt time.Time `json:"createdAt,omitempty"` + Id int32 `json:"id,omitempty"` + LoadBalancerId string `json:"loadBalancerId,omitempty"` + MonitorPort int32 `json:"monitorPort,omitempty"` + PoolId string `json:"poolId,omitempty"` + PoolName string `json:"poolName,omitempty"` + Port int32 `json:"port,omitempty"` + ProjectId string `json:"projectId,omitempty"` + UpdatedAt time.Time `json:"updatedAt,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_cluster_sec_group_default.go b/client/vserver/model_cluster_sec_group_default.go new file mode 100644 index 0000000..db5c278 --- /dev/null +++ b/client/vserver/model_cluster_sec_group_default.go @@ -0,0 +1,15 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type ClusterSecgroupDefault struct { + Master *SecGroupDefault `json:"master,omitempty"` + Minion *SecGroupDefault `json:"minion,omitempty"` +} diff --git a/client/vserver/model_cluster_sec_group_default_dto.go b/client/vserver/model_cluster_sec_group_default_dto.go new file mode 100644 index 0000000..ae1e25f --- /dev/null +++ b/client/vserver/model_cluster_sec_group_default_dto.go @@ -0,0 +1,15 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type ClusterSecGroupDefaultDto struct { + Master *SecGroupDefault `json:"master,omitempty"` + Minion *SecGroupDefault `json:"minion,omitempty"` +} diff --git a/client/vserver/model_cluster_sec_group_dto.go b/client/vserver/model_cluster_sec_group_dto.go new file mode 100644 index 0000000..b680440 --- /dev/null +++ b/client/vserver/model_cluster_sec_group_dto.go @@ -0,0 +1,25 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type ClusterSecGroupDto struct { + ClusterId string `json:"clusterId,omitempty"` + CreatedAt time.Time `json:"createdAt,omitempty"` + Master bool `json:"master,omitempty"` + ProjectId string `json:"projectId,omitempty"` + SecGroupId string `json:"secGroupId,omitempty"` + SecGroupName string `json:"secGroupName,omitempty"` + UpdatedAt time.Time `json:"updatedAt,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_cluster_volume_dto.go b/client/vserver/model_cluster_volume_dto.go new file mode 100644 index 0000000..4ac87d4 --- /dev/null +++ b/client/vserver/model_cluster_volume_dto.go @@ -0,0 +1,24 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type ClusterVolumeDto struct { + ClusterId int64 `json:"clusterId,omitempty"` + DateCreated string `json:"dateCreated,omitempty"` + Iops int32 `json:"iops,omitempty"` + Name string `json:"name,omitempty"` + ProjectId int64 `json:"projectId,omitempty"` + Size int64 `json:"size,omitempty"` + Status string `json:"status,omitempty"` + VmUuid string `json:"vmUuid,omitempty"` + VolumeTypeId string `json:"volumeTypeId,omitempty"` + VolumeTypeZoneName string `json:"volumeTypeZoneName,omitempty"` + VolumeUuid string `json:"volumeUuid,omitempty"` +} diff --git a/client/vserver/model_create_cluster_request.go b/client/vserver/model_create_cluster_request.go new file mode 100644 index 0000000..e4591c4 --- /dev/null +++ b/client/vserver/model_create_cluster_request.go @@ -0,0 +1,74 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +// Create K8s Cluster Request +type CreateClusterRequest struct { + // Auto-healing feature is enable + AutoHealingEnabled bool `json:"autoHealingEnabled,omitempty"` + // Auto monitoring feature is enable + AutoMonitoringEnabled bool `json:"autoMonitoringEnabled,omitempty"` + // Auto scaling feature is enable + AutoScalingEnabled bool `json:"autoScalingEnabled,omitempty"` + // Size of boot volume + BootVolumeSize int32 `json:"bootVolumeSize"` + // Id of boot volume type + BootVolumeTypeId string `json:"bootVolumeTypeId"` + // Cidr of Calico + CalicoCidr string `json:"calicoCidr"` + // Description of the Cluster + Description string `json:"description,omitempty"` + // Size of docker volume + DockerVolumeSize int32 `json:"dockerVolumeSize"` + // Id of docker volume type + DockerVolumeTypeId string `json:"dockerVolumeTypeId"` + // Enable Load Balancer or Not + EnabledLb bool `json:"enabledLb"` + // Size of etcd volume + EtcdVolumeSize int32 `json:"etcdVolumeSize"` + // Id of etcd volume type + EtcdVolumeTypeId string `json:"etcdVolumeTypeId"` + // Ingress Controller feature is enable + IngressControllerEnabled bool `json:"ingressControllerEnabled,omitempty"` + // IpIp Mode + IpipMode string `json:"ipipMode"` + // Id of K8s Version of the Cluster + K8sVersion string `json:"k8sVersion"` + // Number of Master Node + MasterCount int32 `json:"masterCount"` + // Id of the flavor of master + MasterFlavorId string `json:"masterFlavorId"` + // Id of the image of master + MasterInstanceTypeId string `json:"masterInstanceTypeId"` + // Maximum number of node count + MaxNodeCount int32 `json:"maxNodeCount"` + // Minimum number of node Count + MinNodeCount int32 `json:"minNodeCount"` + // Name of the Cluster + Name string `json:"name"` + // Id of the network + NetworkId string `json:"networkId"` + // Type of the network + NetworkType string `json:"networkType"` + // Number of Minion node + NodeCount int32 `json:"nodeCount"` + // Id of the flavor of minion + NodeFlavorId string `json:"nodeFlavorId"` + // List of Node Group want to create + NodeGroupRequestModelList []NodeGroupRequestModel `json:"nodeGroupRequestModelList,omitempty"` + // Id of the image of minion + NodeInstanceTypeId string `json:"nodeInstanceTypeId"` + // List of Id of the secGroup + SecGroupIds []string `json:"secGroupIds,omitempty"` + // Id of the sshKey + SshKeyId string `json:"sshKeyId,omitempty"` + // Id of the subnet + SubnetId string `json:"subnetId"` +} diff --git a/client/vserver/model_create_l7_policy_request_v2.go b/client/vserver/model_create_l7_policy_request_v2.go new file mode 100644 index 0000000..fab5a62 --- /dev/null +++ b/client/vserver/model_create_l7_policy_request_v2.go @@ -0,0 +1,31 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type CreateL7PolicyRequestV2 struct { + // Action. This indicates how the listener will route traffic. The value can be REDIRECT_TO_POOL or REDIRECT_TO_URL. + Action string `json:"action"` + // Compare operation. The value can be CONTAINS or EQUAL_TO + CompareType string `json:"compareType"` + // Keep the query string or not. + KeepQueryString bool `json:"keepQueryString,omitempty"` + // Policy name. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. + Name string `json:"name"` + // Redirect HTTP code for redirecting to other URL. + RedirectHttpCode int32 `json:"redirectHttpCode,omitempty"` + // Pool for forwarding. + RedirectPoolId string `json:"redirectPoolId,omitempty"` + // URL for forwarding. + RedirectUrl string `json:"redirectUrl,omitempty"` + // Which attribute to compare. The value can be PATH or HOST_NAME + Type_ string `json:"type"` + // The value to compare with attribute. + Value string `json:"value,omitempty"` +} diff --git a/client/vserver/model_create_listener_request_v2.go b/client/vserver/model_create_listener_request_v2.go new file mode 100644 index 0000000..b9c4607 --- /dev/null +++ b/client/vserver/model_create_listener_request_v2.go @@ -0,0 +1,33 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type CreateListenerRequestV2 struct { + // Allowed cidr. + AllowedCidrs string `json:"allowedCidrs"` + // List of certificate authority + CertificateAuthorities []string `json:"certificateAuthorities,omitempty"` + // Default certificate authority that the listener will use + DefaultCertificateAuthority string `json:"defaultCertificateAuthority,omitempty"` + // Id of the pool that this listener will forward to. + DefaultPoolId string `json:"defaultPoolId"` + // Name of the listener. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. + ListenerName string `json:"listenerName"` + // Protocol of the listener. + ListenerProtocol string `json:"listenerProtocol"` + // Port of the listener. + ListenerProtocolPort int32 `json:"listenerProtocolPort"` + // Idle timeout of client. The value can be in range from 1 to 3600 seconds + TimeoutClient int32 `json:"timeoutClient"` + // Idle timeout of connection. The value can be in range from 1 to 3600 seconds + TimeoutConnection int32 `json:"timeoutConnection"` + // Idle timeout of member. The value can be in range from 1 to 3600 seconds + TimeoutMember int32 `json:"timeoutMember"` +} diff --git a/client/vserver/model_create_load_balancer_request_v2.go b/client/vserver/model_create_load_balancer_request_v2.go new file mode 100644 index 0000000..63afa1f --- /dev/null +++ b/client/vserver/model_create_load_balancer_request_v2.go @@ -0,0 +1,27 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type CreateLoadBalancerRequestV2 struct { + // Listener of the load balancer. + Listener *LbListener `json:"listener,omitempty"` + // Load balancer's name. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. + Name string `json:"name"` + // Package ID of the load balancer. + PackageId string `json:"packageId"` + // Pool of the load balancer. + Pool *LbPool `json:"pool,omitempty"` + // Schema of the load balancer, it may be Internet or Internal. + Scheme string `json:"scheme"` + // Subnet ID for the load balancer. + SubnetId string `json:"subnetId"` + // Type of the load balancer. It may be Layer 4 or Layer 7 + Type_ string `json:"type"` +} diff --git a/client/vserver/model_create_node_group_backend_request.go b/client/vserver/model_create_node_group_backend_request.go new file mode 100644 index 0000000..91b3c5b --- /dev/null +++ b/client/vserver/model_create_node_group_backend_request.go @@ -0,0 +1,21 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type CreateNodeGroupBackendRequest struct { + // Id of cluster + ClusterId string `json:"clusterId"` + // Id of the flavor + FlavorId string `json:"flavorId"` + // Name of the node group + Name string `json:"name"` + // number of the node in node group + NodeCount int32 `json:"nodeCount"` +} diff --git a/client/vserver/model_create_pool_request_v2.go b/client/vserver/model_create_pool_request_v2.go new file mode 100644 index 0000000..848951b --- /dev/null +++ b/client/vserver/model_create_pool_request_v2.go @@ -0,0 +1,25 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type CreatePoolRequestV2 struct { + // Algorithm of the pool. The algorithm can be \"ROUND_ROBIN\" or \"LEAST_CONNECTIONS\" or \"SOURCE_IP\" + Algorithm string `json:"algorithm"` + // Request for creating health check monitor. + HealthMonitor *CreateHealthMonitorRequest `json:"healthMonitor,omitempty"` + // List of members of the pool. + Members []CreateMemberRequest `json:"members,omitempty"` + // Name of the pool. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. + PoolName string `json:"poolName"` + // Protocol of the pool. + PoolProtocol string `json:"poolProtocol"` + // Enable sticky sessions. + Stickiness bool `json:"stickiness,omitempty"` +} diff --git a/client/vserver/model_data_response_ca_dto.go b/client/vserver/model_data_response_ca_dto.go new file mode 100644 index 0000000..c397b43 --- /dev/null +++ b/client/vserver/model_data_response_ca_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseCaDto struct { + Data *CaDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_cluster_dto.go b/client/vserver/model_data_response_cluster_dto.go new file mode 100644 index 0000000..afea4e6 --- /dev/null +++ b/client/vserver/model_data_response_cluster_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseClusterDto struct { + Data *ClusterDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_cluster_node_group_dto.go b/client/vserver/model_data_response_cluster_node_group_dto.go new file mode 100644 index 0000000..c0ca819 --- /dev/null +++ b/client/vserver/model_data_response_cluster_node_group_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseClusterNodeGroupDto struct { + Data *ClusterNodeGroupDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_interface_cluster_node_group_entity.go b/client/vserver/model_data_response_interface_cluster_node_group_entity.go new file mode 100644 index 0000000..bc25ddb --- /dev/null +++ b/client/vserver/model_data_response_interface_cluster_node_group_entity.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseInterfaceClusterNodeGroupEntity struct { + Data *InterfaceClusterNodeGroupEntity `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_interface_k8s_cluster_entity.go b/client/vserver/model_data_response_interface_k8s_cluster_entity.go new file mode 100644 index 0000000..7dbe348 --- /dev/null +++ b/client/vserver/model_data_response_interface_k8s_cluster_entity.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseInterfaceK8sClusterEntity struct { + Data *InterfaceK8sClusterEntity `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_list_cluster_sec_group_dto.go b/client/vserver/model_data_response_list_cluster_sec_group_dto.go new file mode 100644 index 0000000..cf81565 --- /dev/null +++ b/client/vserver/model_data_response_list_cluster_sec_group_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseListClusterSecGroupDto struct { + Data []ClusterSecGroupDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_list_l7_policy.go b/client/vserver/model_data_response_list_l7_policy.go new file mode 100644 index 0000000..c1c9c48 --- /dev/null +++ b/client/vserver/model_data_response_list_l7_policy.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseListL7Policy struct { + Data []L7Policy `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_list_listener.go b/client/vserver/model_data_response_list_listener.go new file mode 100644 index 0000000..2283670 --- /dev/null +++ b/client/vserver/model_data_response_list_listener.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseListListener struct { + Data []Listener `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_list_member.go b/client/vserver/model_data_response_list_member.go new file mode 100644 index 0000000..ee78773 --- /dev/null +++ b/client/vserver/model_data_response_list_member.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseListMember struct { + Data []Member `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_list_network_acl_policy_rule_dto.go b/client/vserver/model_data_response_list_network_acl_policy_rule_dto.go new file mode 100644 index 0000000..7111cdd --- /dev/null +++ b/client/vserver/model_data_response_list_network_acl_policy_rule_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseListNetworkAclPolicyRuleDto struct { + Data []NetworkAclPolicyRuleDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_list_pool.go b/client/vserver/model_data_response_list_pool.go new file mode 100644 index 0000000..8d15829 --- /dev/null +++ b/client/vserver/model_data_response_list_pool.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseListPool struct { + Data []Pool `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_list_region_dto.go b/client/vserver/model_data_response_list_region_dto.go new file mode 100644 index 0000000..9e31b18 --- /dev/null +++ b/client/vserver/model_data_response_list_region_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseListRegionDto struct { + Data []RegionDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_list_routes_dto.go b/client/vserver/model_data_response_list_routes_dto.go new file mode 100644 index 0000000..6d0086a --- /dev/null +++ b/client/vserver/model_data_response_list_routes_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseListRoutesDto struct { + Data []RoutesDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_load_balancer_dto.go b/client/vserver/model_data_response_load_balancer_dto.go new file mode 100644 index 0000000..edc5349 --- /dev/null +++ b/client/vserver/model_data_response_load_balancer_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseLoadBalancerDto struct { + Data *LoadBalancerDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_network_acl_detail_dto.go b/client/vserver/model_data_response_network_acl_detail_dto.go new file mode 100644 index 0000000..f8e00a7 --- /dev/null +++ b/client/vserver/model_data_response_network_acl_detail_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseNetworkAclDetailDto struct { + Data *NetworkAclDetailDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_network_acl_dto.go b/client/vserver/model_data_response_network_acl_dto.go new file mode 100644 index 0000000..88925b9 --- /dev/null +++ b/client/vserver/model_data_response_network_acl_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseNetworkAclDto struct { + Data *NetworkAclDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_network_acl_model.go b/client/vserver/model_data_response_network_acl_model.go new file mode 100644 index 0000000..3e18187 --- /dev/null +++ b/client/vserver/model_data_response_network_acl_model.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseNetworkAclModel struct { + Data *NetworkAclModel `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_route_table_dto.go b/client/vserver/model_data_response_route_table_dto.go new file mode 100644 index 0000000..5df74d2 --- /dev/null +++ b/client/vserver/model_data_response_route_table_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseRouteTableDto struct { + Data *RouteTableDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_response_simple_server_task_dto.go b/client/vserver/model_data_response_simple_server_task_dto.go new file mode 100644 index 0000000..34279d7 --- /dev/null +++ b/client/vserver/model_data_response_simple_server_task_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseSimpleServerTaskDto struct { + Data *SimpleServerTaskDto `json:"data,omitempty"` +} diff --git a/client/vserver/model_data_responseboolean.go b/client/vserver/model_data_responseboolean.go new file mode 100644 index 0000000..6a75438 --- /dev/null +++ b/client/vserver/model_data_responseboolean.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DataResponseboolean struct { + Data bool `json:"data,omitempty"` +} diff --git a/client/vserver/model_delete_node_group_backend_request.go b/client/vserver/model_delete_node_group_backend_request.go new file mode 100644 index 0000000..cf5903b --- /dev/null +++ b/client/vserver/model_delete_node_group_backend_request.go @@ -0,0 +1,17 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type DeleteNodeGroupBackendRequest struct { + // Id of cluster + ClusterId string `json:"clusterId"` + // Id of nodegroup + NodeGroupId string `json:"nodeGroupId"` +} diff --git a/client/vserver/model_import_ca_request.go b/client/vserver/model_import_ca_request.go new file mode 100644 index 0000000..33ba921 --- /dev/null +++ b/client/vserver/model_import_ca_request.go @@ -0,0 +1,32 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +// Import CA Request +type ImportCaRequest struct { + // Certificate of the CA + Certificate string `json:"certificate,omitempty"` + // A certificate chain is an ordered list of certificates, containing an SSL/TLS Certificate and Certificate Authority (CA) Certificates, that enable the receiver to verify that the sender and all CA's are trustworthy. + CertificateChain string `json:"certificateChain,omitempty"` + // Expiration of CA + Expiration time.Time `json:"expiration,omitempty"` + // Name of the CA + Name string `json:"name"` + // The password of the private key. + Passphrase string `json:"passphrase,omitempty"` + // Private key of the CA + PrivateKey string `json:"privateKey,omitempty"` + // Type of the certificate ( CA or TLS/SSL ) + Type_ string `json:"type"` +} diff --git a/client/vserver/model_interface_cluster_node_group_entity.go b/client/vserver/model_interface_cluster_node_group_entity.go new file mode 100644 index 0000000..a04bf76 --- /dev/null +++ b/client/vserver/model_interface_cluster_node_group_entity.go @@ -0,0 +1,31 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type InterfaceClusterNodeGroupEntity struct { + BackendStatus string `json:"backendStatus,omitempty"` + ClusterId string `json:"clusterId,omitempty"` + ClusterNodeGroupId int32 `json:"clusterNodeGroupId,omitempty"` + CreatedAt time.Time `json:"createdAt,omitempty"` + DeletedAt time.Time `json:"deletedAt,omitempty"` + FlavorId string `json:"flavorId,omitempty"` + Id int32 `json:"id,omitempty"` + Name string `json:"name,omitempty"` + NodeCount int32 `json:"nodeCount,omitempty"` + NodeGroupDefault bool `json:"nodeGroupDefault,omitempty"` + ProjectId string `json:"projectId,omitempty"` + Status string `json:"status,omitempty"` + UpdatedAt time.Time `json:"updatedAt,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_interface_k8_s_cluster_dto.go b/client/vserver/model_interface_k8_s_cluster_dto.go new file mode 100644 index 0000000..415583f --- /dev/null +++ b/client/vserver/model_interface_k8_s_cluster_dto.go @@ -0,0 +1,59 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type InterfaceK8SClusterDto struct { + AclId string `json:"aclId,omitempty"` + AutoHealingEnabled bool `json:"autoHealingEnabled,omitempty"` + AutoMonitoringEnabled bool `json:"autoMonitoringEnabled,omitempty"` + AutoScalingEnabled bool `json:"autoScalingEnabled,omitempty"` + BackendStatus string `json:"backendStatus,omitempty"` + BootVolumeSize int32 `json:"bootVolumeSize,omitempty"` + BootVolumeTypeId string `json:"bootVolumeTypeId,omitempty"` + CalicoCidr string `json:"calicoCidr,omitempty"` + ClusterId int32 `json:"clusterId,omitempty"` + CreatedAt time.Time `json:"createdAt,omitempty"` + Description string `json:"description,omitempty"` + DockerVolumeSize int32 `json:"dockerVolumeSize,omitempty"` + DockerVolumeTypeId string `json:"dockerVolumeTypeId,omitempty"` + EnabledLb bool `json:"enabledLb,omitempty"` + Endpoint string `json:"endpoint,omitempty"` + EtcdVolumeSize int32 `json:"etcdVolumeSize,omitempty"` + EtcdVolumeTypeId string `json:"etcdVolumeTypeId,omitempty"` + Id int32 `json:"id,omitempty"` + IngressControllerEnabled bool `json:"ingressControllerEnabled,omitempty"` + K8sNetworkType string `json:"k8sNetworkType,omitempty"` + K8sNetworkTypeId string `json:"k8sNetworkTypeId,omitempty"` + K8sVersion string `json:"k8sVersion,omitempty"` + K8sVersionId string `json:"k8sVersionId,omitempty"` + MasterCount int32 `json:"masterCount,omitempty"` + MasterFlavorId string `json:"masterFlavorId,omitempty"` + MasterFlavorName string `json:"masterFlavorName,omitempty"` + MasterInstanceTypeId string `json:"masterInstanceTypeId,omitempty"` + MaxNodeCount int32 `json:"maxNodeCount,omitempty"` + MinNodeCount int32 `json:"minNodeCount,omitempty"` + Name string `json:"name,omitempty"` + NetworkId string `json:"networkId,omitempty"` + NodeCount int32 `json:"nodeCount,omitempty"` + NodeFlavorId string `json:"nodeFlavorId,omitempty"` + NodeFlavorName string `json:"nodeFlavorName,omitempty"` + NodeInstanceTypeId string `json:"nodeInstanceTypeId,omitempty"` + ProjectId string `json:"projectId,omitempty"` + SshKeyId string `json:"sshKeyId,omitempty"` + SshKeyName string `json:"sshKeyName,omitempty"` + Status string `json:"status,omitempty"` + SubnetId string `json:"subnetId,omitempty"` + UpdatedAt time.Time `json:"updatedAt,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_interface_k8s_cluster_entity.go b/client/vserver/model_interface_k8s_cluster_entity.go new file mode 100644 index 0000000..bacdad5 --- /dev/null +++ b/client/vserver/model_interface_k8s_cluster_entity.go @@ -0,0 +1,55 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type InterfaceK8sClusterEntity struct { + AclId string `json:"aclId,omitempty"` + AutoHealingEnabled bool `json:"autoHealingEnabled,omitempty"` + AutoMonitoringEnabled bool `json:"autoMonitoringEnabled,omitempty"` + AutoScalingEnabled bool `json:"autoScalingEnabled,omitempty"` + BackendStatus string `json:"backendStatus,omitempty"` + BootVolumeSize int32 `json:"bootVolumeSize,omitempty"` + BootVolumeTypeId string `json:"bootVolumeTypeId,omitempty"` + CalicoCidr string `json:"calicoCidr,omitempty"` + ClusterId int32 `json:"clusterId,omitempty"` + CreatedAt time.Time `json:"createdAt,omitempty"` + DeletedAt time.Time `json:"deletedAt,omitempty"` + Description string `json:"description,omitempty"` + DockerVolumeSize int32 `json:"dockerVolumeSize,omitempty"` + DockerVolumeTypeId string `json:"dockerVolumeTypeId,omitempty"` + EnabledLb bool `json:"enabledLb,omitempty"` + Endpoint string `json:"endpoint,omitempty"` + EtcdVolumeSize int32 `json:"etcdVolumeSize,omitempty"` + EtcdVolumeTypeId string `json:"etcdVolumeTypeId,omitempty"` + Id int32 `json:"id,omitempty"` + IngressControllerEnabled bool `json:"ingressControllerEnabled,omitempty"` + K8sNetworkTypeId string `json:"k8sNetworkTypeId,omitempty"` + K8sVersionId string `json:"k8sVersionId,omitempty"` + MasterCount int32 `json:"masterCount,omitempty"` + MasterFlavorId string `json:"masterFlavorId,omitempty"` + MasterInstanceTypeId string `json:"masterInstanceTypeId,omitempty"` + MaxNodeCount int32 `json:"maxNodeCount,omitempty"` + MinNodeCount int32 `json:"minNodeCount,omitempty"` + Name string `json:"name,omitempty"` + NetworkId string `json:"networkId,omitempty"` + NodeCount int32 `json:"nodeCount,omitempty"` + NodeFlavorId string `json:"nodeFlavorId,omitempty"` + NodeInstanceTypeId string `json:"nodeInstanceTypeId,omitempty"` + ProjectId string `json:"projectId,omitempty"` + SshKeyId string `json:"sshKeyId,omitempty"` + Status string `json:"status,omitempty"` + SubnetId string `json:"subnetId,omitempty"` + UpdatedAt time.Time `json:"updatedAt,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_k8_s_etcd_package_entity.go b/client/vserver/model_k8_s_etcd_package_entity.go new file mode 100644 index 0000000..bda15d8 --- /dev/null +++ b/client/vserver/model_k8_s_etcd_package_entity.go @@ -0,0 +1,20 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type K8SEtcdPackageEntity struct { + Description string `json:"description,omitempty"` + DescriptionVi string `json:"descriptionVi,omitempty"` + Name string `json:"name,omitempty"` + Size int32 `json:"size,omitempty"` + Status string `json:"status,omitempty"` + Uuid string `json:"uuid,omitempty"` + VolumeTypeId string `json:"volumeTypeId,omitempty"` +} diff --git a/client/vserver/model_k8s_network_type_dto.go b/client/vserver/model_k8s_network_type_dto.go new file mode 100644 index 0000000..11d3147 --- /dev/null +++ b/client/vserver/model_k8s_network_type_dto.go @@ -0,0 +1,16 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type K8sNetworkTypeDto struct { + Name string `json:"name,omitempty"` + Status string `json:"status,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_k8s_version_dto.go b/client/vserver/model_k8s_version_dto.go new file mode 100644 index 0000000..dcc3f49 --- /dev/null +++ b/client/vserver/model_k8s_version_dto.go @@ -0,0 +1,17 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type K8sVersionDto struct { + Name string `json:"name,omitempty"` + Status string `json:"status,omitempty"` + Uuid string `json:"uuid,omitempty"` + Weight string `json:"weight,omitempty"` +} diff --git a/client/vserver/model_lb_listener.go b/client/vserver/model_lb_listener.go new file mode 100644 index 0000000..5b1c7ea --- /dev/null +++ b/client/vserver/model_lb_listener.go @@ -0,0 +1,31 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type LbListener struct { + // Allowed cidr. + AllowedCidrs string `json:"allowedCidrs,omitempty"` + // List of certificate authority + CertificateAuthorities []string `json:"certificateAuthorities,omitempty"` + // Default certificate authority that the listener will use + DefaultCertificateAuthority string `json:"defaultCertificateAuthority,omitempty"` + // Name of the listener. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. + ListenerName string `json:"listenerName"` + // Protocol of the listener.The value can be HTTP or HTTPS or TCP. + ListenerProtocol string `json:"listenerProtocol"` + // Port of the listener. From 1 to 65535 + ListenerProtocolPort int32 `json:"listenerProtocolPort,omitempty"` + // Idle timeout of client. The value can be in range from 1 to 3600 seconds + TimeoutClient int32 `json:"timeoutClient,omitempty"` + // Idle timeout of connection. The value can be in range from 1 to 3600 seconds + TimeoutConnection int32 `json:"timeoutConnection,omitempty"` + // Idle timeout of member. The value can be in range from 1 to 3600 seconds + TimeoutMember int32 `json:"timeoutMember,omitempty"` +} diff --git a/client/vserver/model_lb_pool.go b/client/vserver/model_lb_pool.go new file mode 100644 index 0000000..9c467de --- /dev/null +++ b/client/vserver/model_lb_pool.go @@ -0,0 +1,39 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type LbPool struct { + // Algorithm of the pool. The algorithm can be \"ROUND_ROBIN\" or \"LEAST_CONNECTIONS\" or \"SOURCE_IP\" + Algorithm string `json:"algorithm"` + // Health check method for the HTTP protocol. + HealthCheckMethod string `json:"healthCheckMethod,omitempty"` + // Health check path for the HTTP protocol. + HealthCheckPath string `json:"healthCheckPath,omitempty"` + // Protocol for performing health check. + HealthCheckProtocol string `json:"healthCheckProtocol"` + // Healthy threshold. The value must be in range from 2 to 10. + HealthyThreshold int64 `json:"healthyThreshold,omitempty"` + // Health check interval. The value must be from 5 to 3600 seconds. + Interval int64 `json:"interval,omitempty"` + // List of members of the pool. + Members []CreateMemberRequest `json:"members,omitempty"` + // Name of the pool. Only letters (a-z, A-Z, 0-9, '_', '.') are allowed and your input data must be between 6 and 20 characters. + PoolName string `json:"poolName"` + // Protocol of the pool. + PoolProtocol string `json:"poolProtocol"` + // Enable sticky sessions. + Stickiness bool `json:"stickiness,omitempty"` + // Health check success code for HTTP health check protocol. + SuccessCode string `json:"successCode,omitempty"` + // Timeout of health check. The value must be from 2 to 120 seconds + Timeout int64 `json:"timeout,omitempty"` + // Unhealthy threshold. The value must be in range from 2 to 10. + UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` +} diff --git a/client/vserver/model_load_balancer_dto.go b/client/vserver/model_load_balancer_dto.go new file mode 100644 index 0000000..49202ba --- /dev/null +++ b/client/vserver/model_load_balancer_dto.go @@ -0,0 +1,31 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type LoadBalancerDto struct { + Address string `json:"address,omitempty"` + AdminStateUp bool `json:"adminStateUp,omitempty"` + CreatedAt time.Time `json:"createdAt,omitempty"` + Description string `json:"description,omitempty"` + LoadBalancerSchema string `json:"loadBalancerSchema,omitempty"` + Name string `json:"name,omitempty"` + OperatingStatus string `json:"operatingStatus,omitempty"` + PackageId string `json:"packageId,omitempty"` + PrivateSubnetCidr string `json:"privateSubnetCidr,omitempty"` + PrivateSubnetId string `json:"privateSubnetId,omitempty"` + ProvisioningStatus string `json:"provisioningStatus,omitempty"` + SubnetId string `json:"subnetId,omitempty"` + Type_ string `json:"type,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_load_balancer_item.go b/client/vserver/model_load_balancer_item.go new file mode 100644 index 0000000..e9daa50 --- /dev/null +++ b/client/vserver/model_load_balancer_item.go @@ -0,0 +1,15 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type LoadBalancerItem struct { + LoadBalancerId string `json:"loadBalancerId,omitempty"` + Pools []PoolItem `json:"pools,omitempty"` +} diff --git a/client/vserver/model_network_acl_detail_dto.go b/client/vserver/model_network_acl_detail_dto.go new file mode 100644 index 0000000..4640fb1 --- /dev/null +++ b/client/vserver/model_network_acl_detail_dto.go @@ -0,0 +1,27 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type NetworkAclDetailDto struct { + AclPolicyId string `json:"aclPolicyId,omitempty"` + AclPolicyRules []AclPolicyRule `json:"aclPolicyRules,omitempty"` + CreatedAt time.Time `json:"createdAt,omitempty"` + DefaultAcl bool `json:"defaultAcl,omitempty"` + InterfaceNetworkUuid string `json:"interfaceNetworkUuid,omitempty"` + Name string `json:"name,omitempty"` + ProjectUuid string `json:"projectUuid,omitempty"` + Status string `json:"status,omitempty"` + SubnetAssociationList []string `json:"subnetAssociationList,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_network_acl_dto.go b/client/vserver/model_network_acl_dto.go new file mode 100644 index 0000000..a98b202 --- /dev/null +++ b/client/vserver/model_network_acl_dto.go @@ -0,0 +1,24 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type NetworkAclDto struct { + CreatedAt time.Time `json:"createdAt,omitempty"` + DefaultAcl bool `json:"defaultAcl,omitempty"` + InterfaceNetworkUuid string `json:"interfaceNetworkUuid,omitempty"` + Name string `json:"name,omitempty"` + ProjectUuid string `json:"projectUuid,omitempty"` + Status string `json:"status,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_network_acl_policy_rule_dto.go b/client/vserver/model_network_acl_policy_rule_dto.go new file mode 100644 index 0000000..cca1094 --- /dev/null +++ b/client/vserver/model_network_acl_policy_rule_dto.go @@ -0,0 +1,26 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type NetworkAclPolicyRuleDto struct { + Action string `json:"action,omitempty"` + CreatedAt time.Time `json:"createdAt,omitempty"` + InterfaceAclPolicyUuid string `json:"interfaceAclPolicyUuid,omitempty"` + Port string `json:"port,omitempty"` + Protocol string `json:"protocol,omitempty"` + SeqNumber int32 `json:"seqNumber,omitempty"` + Source string `json:"source,omitempty"` + Type_ string `json:"type,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_node_console_result_dto.go b/client/vserver/model_node_console_result_dto.go new file mode 100644 index 0000000..fede6e8 --- /dev/null +++ b/client/vserver/model_node_console_result_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type NodeConsoleResultDto struct { + Url string `json:"url,omitempty"` +} diff --git a/client/vserver/model_node_group_request_model.go b/client/vserver/model_node_group_request_model.go new file mode 100644 index 0000000..038e0b8 --- /dev/null +++ b/client/vserver/model_node_group_request_model.go @@ -0,0 +1,16 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type NodeGroupRequestModel struct { + FlavorId string `json:"flavorId,omitempty"` + Name string `json:"name,omitempty"` + NodeCount int `json:"nodeCount,omitempty"` +} diff --git a/client/vserver/model_paging_ca_dto.go b/client/vserver/model_paging_ca_dto.go new file mode 100644 index 0000000..30aabcf --- /dev/null +++ b/client/vserver/model_paging_ca_dto.go @@ -0,0 +1,18 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type PagingCaDto struct { + ListData []CaDto `json:"listData,omitempty"` + Page int32 `json:"page,omitempty"` + PageSize int32 `json:"pageSize,omitempty"` + TotalItem int64 `json:"totalItem,omitempty"` + TotalPage int32 `json:"totalPage,omitempty"` +} diff --git a/client/vserver/model_paging_cluster_dto.go b/client/vserver/model_paging_cluster_dto.go new file mode 100644 index 0000000..a73ed24 --- /dev/null +++ b/client/vserver/model_paging_cluster_dto.go @@ -0,0 +1,18 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type PagingClusterDto struct { + ListData []ClusterDto `json:"listData,omitempty"` + Page int32 `json:"page,omitempty"` + PageSize int32 `json:"pageSize,omitempty"` + TotalItem int64 `json:"totalItem,omitempty"` + TotalPage int32 `json:"totalPage,omitempty"` +} diff --git a/client/vserver/model_paging_interface_k8_s_cluster_dto.go b/client/vserver/model_paging_interface_k8_s_cluster_dto.go new file mode 100644 index 0000000..8b47a9d --- /dev/null +++ b/client/vserver/model_paging_interface_k8_s_cluster_dto.go @@ -0,0 +1,18 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.2 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type PagingInterfaceK8SClusterDto struct { + ListData []InterfaceK8SClusterDto `json:"listData,omitempty"` + Page int32 `json:"page,omitempty"` + PageSize int32 `json:"pageSize,omitempty"` + TotalItem int64 `json:"totalItem,omitempty"` + TotalPage int32 `json:"totalPage,omitempty"` +} diff --git a/client/vserver/model_paging_load_balancer_dto.go b/client/vserver/model_paging_load_balancer_dto.go new file mode 100644 index 0000000..176218f --- /dev/null +++ b/client/vserver/model_paging_load_balancer_dto.go @@ -0,0 +1,18 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type PagingLoadBalancerDto struct { + ListData []LoadBalancerDto `json:"listData,omitempty"` + Page int32 `json:"page,omitempty"` + PageSize int32 `json:"pageSize,omitempty"` + TotalItem int64 `json:"totalItem,omitempty"` + TotalPage int32 `json:"totalPage,omitempty"` +} diff --git a/client/vserver/model_paging_network_acl_dto.go b/client/vserver/model_paging_network_acl_dto.go new file mode 100644 index 0000000..765f228 --- /dev/null +++ b/client/vserver/model_paging_network_acl_dto.go @@ -0,0 +1,18 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type PagingNetworkAclDto struct { + ListData []NetworkAclDto `json:"listData,omitempty"` + Page int32 `json:"page,omitempty"` + PageSize int32 `json:"pageSize,omitempty"` + TotalItem int64 `json:"totalItem,omitempty"` + TotalPage int32 `json:"totalPage,omitempty"` +} diff --git a/client/vserver/model_paging_persistent_volume_dto.go b/client/vserver/model_paging_persistent_volume_dto.go new file mode 100644 index 0000000..e7fb646 --- /dev/null +++ b/client/vserver/model_paging_persistent_volume_dto.go @@ -0,0 +1,18 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type PagingPersistentVolumeDto struct { + ListData []PersistentVolumeDto `json:"listData,omitempty"` + Page int32 `json:"page,omitempty"` + PageSize int32 `json:"pageSize,omitempty"` + TotalItem int64 `json:"totalItem,omitempty"` + TotalPage int32 `json:"totalPage,omitempty"` +} diff --git a/client/vserver/model_paging_route_table_dto.go b/client/vserver/model_paging_route_table_dto.go new file mode 100644 index 0000000..fb8ffb5 --- /dev/null +++ b/client/vserver/model_paging_route_table_dto.go @@ -0,0 +1,18 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type PagingRouteTableDto struct { + ListData []RouteTableDto `json:"listData,omitempty"` + Page int32 `json:"page,omitempty"` + PageSize int32 `json:"pageSize,omitempty"` + TotalItem int64 `json:"totalItem,omitempty"` + TotalPage int32 `json:"totalPage,omitempty"` +} diff --git a/client/vserver/model_persistent_volume_dto.go b/client/vserver/model_persistent_volume_dto.go new file mode 100644 index 0000000..eeb491a --- /dev/null +++ b/client/vserver/model_persistent_volume_dto.go @@ -0,0 +1,23 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type PersistentVolumeDto struct { + ClusterId string `json:"clusterId,omitempty"` + CreatedAt string `json:"createdAt,omitempty"` + DeletedAt string `json:"deletedAt,omitempty"` + IopsId int64 `json:"iopsId,omitempty"` + Name string `json:"name,omitempty"` + Size int32 `json:"size,omitempty"` + Status string `json:"status,omitempty"` + UpdatedAt string `json:"updatedAt,omitempty"` + VmId string `json:"vmId,omitempty"` + VolumeId string `json:"volumeId,omitempty"` +} diff --git a/client/vserver/model_pool_item.go b/client/vserver/model_pool_item.go new file mode 100644 index 0000000..823fe6a --- /dev/null +++ b/client/vserver/model_pool_item.go @@ -0,0 +1,17 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type PoolItem struct { + MonitorPort int32 `json:"monitorPort,omitempty"` + Name string `json:"name,omitempty"` + PoolId string `json:"poolId,omitempty"` + Port int32 `json:"port,omitempty"` +} diff --git a/client/vserver/model_region_dto.go b/client/vserver/model_region_dto.go new file mode 100644 index 0000000..743baea --- /dev/null +++ b/client/vserver/model_region_dto.go @@ -0,0 +1,17 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type RegionDto struct { + Description string `json:"description,omitempty"` + Id string `json:"id,omitempty"` + Name string `json:"name,omitempty"` + UserId string `json:"userId,omitempty"` +} diff --git a/client/vserver/model_reorder_policies_request_v2.go b/client/vserver/model_reorder_policies_request_v2.go new file mode 100644 index 0000000..effd1a0 --- /dev/null +++ b/client/vserver/model_reorder_policies_request_v2.go @@ -0,0 +1,15 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type ReorderPoliciesRequestV2 struct { + // List of policies to reorder, start from 1 to .... + Policies []ReorderPolicyRequest `json:"policies"` +} diff --git a/client/vserver/model_route_table_dto.go b/client/vserver/model_route_table_dto.go new file mode 100644 index 0000000..2ce872b --- /dev/null +++ b/client/vserver/model_route_table_dto.go @@ -0,0 +1,24 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +import ( + "time" +) + +type RouteTableDto struct { + CreatedAt time.Time `json:"createdAt,omitempty"` + Name string `json:"name,omitempty"` + Routes []RoutesDto `json:"routes,omitempty"` + Status string `json:"status,omitempty"` + System bool `json:"system,omitempty"` + Uuid string `json:"uuid,omitempty"` + VpcUuid string `json:"vpcUuid,omitempty"` +} diff --git a/client/vserver/model_routes_dto.go b/client/vserver/model_routes_dto.go new file mode 100644 index 0000000..a030c62 --- /dev/null +++ b/client/vserver/model_routes_dto.go @@ -0,0 +1,19 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type RoutesDto struct { + Destination string `json:"destination,omitempty"` + RouteTableUuid string `json:"routeTableUuid,omitempty"` + RoutingType string `json:"routingType,omitempty"` + Status string `json:"status,omitempty"` + TargetUuid string `json:"targetUuid,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_scale_minion_backend_request.go b/client/vserver/model_scale_minion_backend_request.go new file mode 100644 index 0000000..8348d99 --- /dev/null +++ b/client/vserver/model_scale_minion_backend_request.go @@ -0,0 +1,19 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type ScaleMinionBackendRequest struct { + // Id of Cluster + ClusterId string `json:"clusterId,omitempty"` + // Number of node want to scale up + NodeCount int32 `json:"nodeCount,omitempty"` + // Id of Node Group + NodeGroupId string `json:"nodeGroupId,omitempty"` +} diff --git a/client/vserver/model_sec_group_default.go b/client/vserver/model_sec_group_default.go new file mode 100644 index 0000000..16518de --- /dev/null +++ b/client/vserver/model_sec_group_default.go @@ -0,0 +1,15 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type SecGroupDefault struct { + Rules []SecGroupRuleDefault `json:"rules,omitempty"` + SecgroupName string `json:"secgroup_name,omitempty"` +} diff --git a/client/vserver/model_sec_group_rule_default.go b/client/vserver/model_sec_group_rule_default.go new file mode 100644 index 0000000..48a6585 --- /dev/null +++ b/client/vserver/model_sec_group_rule_default.go @@ -0,0 +1,20 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type SecGroupRuleDefault struct { + Direction string `json:"direction,omitempty"` + Ethertype string `json:"ethertype,omitempty"` + PortRangeMax int64 `json:"port_range_max,omitempty"` + PortRangeMin int64 `json:"port_range_min,omitempty"` + Protocol string `json:"protocol,omitempty"` + RemoteGroupName string `json:"remote_group_name,omitempty"` + RemoteIpPrefix string `json:"remote_ip_prefix,omitempty"` +} diff --git a/client/vserver/model_simple_cluster_node_group_dto.go b/client/vserver/model_simple_cluster_node_group_dto.go new file mode 100644 index 0000000..ed82117 --- /dev/null +++ b/client/vserver/model_simple_cluster_node_group_dto.go @@ -0,0 +1,18 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type SimpleClusterNodeGroupDto struct { + ClusterNodeGroupId int32 `json:"clusterNodeGroupId,omitempty"` + Name string `json:"name,omitempty"` + NodeGroupDefault bool `json:"nodeGroupDefault,omitempty"` + Status string `json:"status,omitempty"` + Uuid string `json:"uuid,omitempty"` +} diff --git a/client/vserver/model_simple_server_task_dto.go b/client/vserver/model_simple_server_task_dto.go new file mode 100644 index 0000000..11493a8 --- /dev/null +++ b/client/vserver/model_simple_server_task_dto.go @@ -0,0 +1,14 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type SimpleServerTaskDto struct { + Id string `json:"id,omitempty"` +} diff --git a/client/vserver/model_update_cluster_description_request.go b/client/vserver/model_update_cluster_description_request.go new file mode 100644 index 0000000..ee4081a --- /dev/null +++ b/client/vserver/model_update_cluster_description_request.go @@ -0,0 +1,18 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +// Update Cluster Description Request +type UpdateClusterDescriptionRequest struct { + // Uuid of K8s Cluster + ClusterId string `json:"clusterId"` + // Description K8s Cluster + Description string `json:"description"` +} diff --git a/client/vserver/model_update_cluster_sec_group_request.go b/client/vserver/model_update_cluster_sec_group_request.go new file mode 100644 index 0000000..889b03f --- /dev/null +++ b/client/vserver/model_update_cluster_sec_group_request.go @@ -0,0 +1,20 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +// Update Cluster SecGroup Request +type UpdateClusterSecGroupRequest struct { + // Uuid of K8s Cluster + ClusterId string `json:"clusterId"` + // Is Master or not + Master bool `json:"master"` + // List of Sec Group Uuid + SecGroupIds []string `json:"secGroupIds"` +} diff --git a/client/vserver/model_update_l7_policy_request_v2.go b/client/vserver/model_update_l7_policy_request_v2.go new file mode 100644 index 0000000..1358004 --- /dev/null +++ b/client/vserver/model_update_l7_policy_request_v2.go @@ -0,0 +1,31 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type UpdateL7PolicyRequestV2 struct { + // Action. This indicates how the listener will route traffic. The value can be REDIRECT_TO_POOL or REDIRECT_TO_URL. + Action string `json:"action"` + // Compare operation. The value can be CONTAINS or EQUAL_TO + CompareType string `json:"compareType"` + // Keep the query string or not. + KeepQueryString bool `json:"keepQueryString,omitempty"` + // Position of the policy + Position int64 `json:"position,omitempty"` + // Redirect HTTP code for redirecting to other URL. + RedirectHttpCode int32 `json:"redirectHttpCode,omitempty"` + // Pool for forwarding. + RedirectPoolId string `json:"redirectPoolId,omitempty"` + // URL for forwarding. + RedirectUrl string `json:"redirectUrl,omitempty"` + // Which attribute to compare. The value can be PATH or HOST_NAME + Type_ string `json:"type"` + // The value to compare with attribute. + Value string `json:"value,omitempty"` +} diff --git a/client/vserver/model_update_listener_request_v2.go b/client/vserver/model_update_listener_request_v2.go new file mode 100644 index 0000000..19b3872 --- /dev/null +++ b/client/vserver/model_update_listener_request_v2.go @@ -0,0 +1,29 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type UpdateListenerRequestV2 struct { + // Allowed cidr. + AllowedCidrs string `json:"allowedCidrs"` + // Client certificate + ClientCertificate string `json:"clientCertificate,omitempty"` + // Default certificate authority. + DefaultCertificateAuthority string `json:"defaultCertificateAuthority,omitempty"` + // Id of the pool that this listener will forward to. + DefaultPoolId string `json:"defaultPoolId"` + // List Headers + Headers []string `json:"headers,omitempty"` + // Idle timeout of client. The value can be in range from 1 to 3600 seconds + TimeoutClient int32 `json:"timeoutClient"` + // Idle timeout of connection. The value can be in range from 1 to 3600 seconds + TimeoutConnection int32 `json:"timeoutConnection"` + // Idle timeout of member. The value can be in range from 1 to 3600 seconds + TimeoutMember int32 `json:"timeoutMember"` +} diff --git a/client/vserver/model_update_members_request_v2.go b/client/vserver/model_update_members_request_v2.go new file mode 100644 index 0000000..85dd90a --- /dev/null +++ b/client/vserver/model_update_members_request_v2.go @@ -0,0 +1,15 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type UpdateMembersRequestV2 struct { + // List of members of the pool. + Members []CreateMemberRequest `json:"members,omitempty"` +} diff --git a/client/vserver/model_update_pool_request_v2.go b/client/vserver/model_update_pool_request_v2.go new file mode 100644 index 0000000..7ee93e6 --- /dev/null +++ b/client/vserver/model_update_pool_request_v2.go @@ -0,0 +1,19 @@ +/* + * Api Documentation + * + * Api Documentation + * + * API version: 1.0.5 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package vserver + +type UpdatePoolRequestV2 struct { + // Algorithm of the pool. The algorithm can be \"ROUND_ROBIN\" or \"LEAST_CONNECTIONS\" or \"SOURCE_IP\" + Algorithm string `json:"algorithm"` + // Update request for health monitor + HealthMonitor *UpdateHealthMonitorRequest `json:"healthMonitor,omitempty"` + // Enable sticky sessions. + Stickiness bool `json:"stickiness,omitempty"` +} diff --git a/docs/data-sources/vserver_flavor.md b/docs/data-sources/vserver_flavor.md index 2fd6527..394a94b 100644 --- a/docs/data-sources/vserver_flavor.md +++ b/docs/data-sources/vserver_flavor.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vServer" page_title: "vngcloud_vserver_flavor Data Source - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Flavor zone. diff --git a/docs/data-sources/vserver_flavor_zone.md b/docs/data-sources/vserver_flavor_zone.md index c0f393f..7f8a4c0 100644 --- a/docs/data-sources/vserver_flavor_zone.md +++ b/docs/data-sources/vserver_flavor_zone.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vServer" page_title: "vngcloud_vserver_flavor_zone Data Source - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Flavor zone diff --git a/docs/data-sources/vserver_image.md b/docs/data-sources/vserver_image.md index 6313f49..2a79b1c 100644 --- a/docs/data-sources/vserver_image.md +++ b/docs/data-sources/vserver_image.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vServer" page_title: "vngcloud_vserver_image Data Source - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Image. diff --git a/docs/data-sources/vserver_k8s_network_type.md b/docs/data-sources/vserver_k8s_network_type.md new file mode 100644 index 0000000..403112c --- /dev/null +++ b/docs/data-sources/vserver_k8s_network_type.md @@ -0,0 +1,35 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vContainer" +page_title: "vngcloud_vserver_flavor Data Source - terraform-provider-vngcloud" +description: |- + Provides a VNG Cloud VServer K8s Network Type. +--- + +# vngcloud_vserver_k8s_network_type (Data Source) + + + +## Example Usage + +```terraform +data "vngcloud_vserver_k8s_network_type" "k8sNetworkType" { + name = "Calico" + project_id = var.project_id +} +``` + +## Argument Reference + +The following arguments are supported: + +- **name** (String, Required) Name of K8s Network Type (Calico). +- **project_id** (String, Required) ID of project. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +- **id** (String) The ID of this K8s Network Type. + + diff --git a/docs/data-sources/vserver_k8s_version.md b/docs/data-sources/vserver_k8s_version.md new file mode 100644 index 0000000..9b15d37 --- /dev/null +++ b/docs/data-sources/vserver_k8s_version.md @@ -0,0 +1,35 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vContainer" +page_title: "vngcloud_vserver_flavor Data Source - terraform-provider-vngcloud" +description: |- + Provides a VNG Cloud VServer K8s Version. +--- + +# vngcloud_vserver_k8s_version (Data Source) + + + +## Example Usage + +```terraform +data "vngcloud_vserver_k8s_version" "k8sVersion" { + name = "Version 1.18.7" + project_id = var.project_id +} +``` + +## Argument Reference + +The following arguments are supported: + +- **name** (String, Required) Name of K8s version (Version 1.18.7, Version 1.19.15, Version 1.20.12, Version 1.21.5). +- **project_id** (String, Required) ID of project. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: + +- **id** (String) The ID of this K8s version. + + diff --git a/docs/data-sources/vserver_project.md b/docs/data-sources/vserver_project.md index 83b5231..b79433a 100644 --- a/docs/data-sources/vserver_project.md +++ b/docs/data-sources/vserver_project.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "Common" page_title: "vngcloud_vserver_project Data Source - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Project. diff --git a/docs/data-sources/vserver_server_group_policy.md b/docs/data-sources/vserver_server_group_policy.md index d1eaf06..cb9e679 100644 --- a/docs/data-sources/vserver_server_group_policy.md +++ b/docs/data-sources/vserver_server_group_policy.md @@ -1,7 +1,7 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs - +subcategory: "vServer" page_title: "vngcloud_vserver_server_group_policy Data Source - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Server Group Policy. diff --git a/docs/data-sources/vserver_volume_type.md b/docs/data-sources/vserver_volume_type.md index 187f6bd..6372ff8 100644 --- a/docs/data-sources/vserver_volume_type.md +++ b/docs/data-sources/vserver_volume_type.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "Block Store" page_title: "vngcloud_vserver_volume_type Data Source - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Volume type. diff --git a/docs/data-sources/vserver_volume_type_zone.md b/docs/data-sources/vserver_volume_type_zone.md index d734198..9165efa 100644 --- a/docs/data-sources/vserver_volume_type_zone.md +++ b/docs/data-sources/vserver_volume_type_zone.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "Block Store" page_title: "vngcloud_vserver_volume_type_zone Data Source - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Volume type zone. diff --git a/docs/index.md b/docs/index.md index 0f74a58..a402094 100644 --- a/docs/index.md +++ b/docs/index.md @@ -15,7 +15,7 @@ terraform { required_providers { vngcloud = { source = "vngcloud/vngcloud" - version ="= 0.0.19" + version ="= 1.0.0" } } } diff --git a/docs/resources/vserver_attach_lb.md b/docs/resources/vserver_attach_lb.md new file mode 100644 index 0000000..efe7396 --- /dev/null +++ b/docs/resources/vserver_attach_lb.md @@ -0,0 +1,76 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vContainer" +page_title: "vngcloud_vserver_attach_lb_to_cluster Resource - terraform-provider-vngcloud" +description: |- + Provides a VNG Cloud VServer Attach Load Balancer To Cluster resource. This can be used to import, create, modify, and delete. + +--- + +# vngcloud_vserver_attach_lb_to_cluster (Resource) + +## Example Usage + +```terraform +resource "vngcloud_vserver_attach_lb_to_cluster" "attach_lb_to_cluster" { + project_id = "pro-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + cluster_id = "cluster-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + load_balancers { + load_balancer_id = ""lb-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"" + pools { + monitor_port = 79 + pool_id = "pool-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + port = 80 + } + pools { + monitor_port = 99 + pool_id = "pool-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + port = 81 + } + } + + load_balancers { + load_balancer_id = ""lb-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"" + pools { + monitor_port = 79 + pool_id = "pool-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + port = 80 + } + pools { + monitor_port = 99 + pool_id = "pool-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + port = 81 + } + } +} +``` + +## Argument Reference + +The following arguments are supported: + +- **project_id** (String, Required) ID of the Project. +- **cluster_id** (String, Required) ID of the Cluster. +- **load_balancers** (List of Map of String, Required) List of load balancer attaching to Cluster. It includes: + - **load_balancer_id** (String, Required) ID of the Load Balancer. + - **pools** (List of Map of String) List of Pools in Load Balancer. It includes: + - **monitor_port** (Number, Required) Monitor Port of Minion. + - **name** (String, Optional) Name of Pool. + - **pool_id** (String, Required) ID of Pool. + - **port** (Number, Required) port of Minion. + + +## IAM Policy +### Create: +In order to **attach Load Balancer for K8s**, user must have been granted permissions below: +- AttachLoadBalancerToCluster (specify by **cluster Id**) +- ListClusterPools (specify by **cluster Id**) + +### Delete +In order to **Detach Load Balancer out of K8s**, user must have been granted permissions below: +- AttachLoadBalancerToCluster (specify by **cluster Id**) +- ListClusterPools (specify by **cluster Id**) + + + + diff --git a/docs/resources/vserver_change_cluster_sec_group.md b/docs/resources/vserver_change_cluster_sec_group.md new file mode 100644 index 0000000..9288e38 --- /dev/null +++ b/docs/resources/vserver_change_cluster_sec_group.md @@ -0,0 +1,56 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vContainer" +page_title: "vngcloud_vserver_change_cluster_sec_group Resource - terraform-provider-vngcloud" +description: |- + Provides a VNG Cloud VServer Change Cluster Sec Group resource. This can be used to import, create, modify, and delete. + +--- + +# vngcloud_vserver_change_cluster_sec_group (Resource) + + + +## Example Usage + +```terraform + +resource "vngcloud_vserver_change_cluster_sec_group" "change_cluster_sec_group_minion" { + project_id = "pro-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + cluster_id = "cluster-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + master = false + sec_group_id_list = ["secg-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] +} +``` + +## Argument Reference + +The following arguments are supported: + +- **project_id** (String, Required) ID of the Project. +- **cluster_id** (String, Required) ID of the Cluster. +- **master** (Boolean, Required) Is a Master Node or not. +- **sec_group_id_list** (List of String, Required) ID of the SecGroups. + + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: +- **id** (String) The ID of this Cluster. +- **sec_group_list** (List of Map of String) The list of sec group. It includes: + - **id** (String) Id of Sec Group. + - **name** (String) Name of Sec Group. + + +## IAM Policy +### Update: +In order to **update Security Group for K8s**, user must have been granted permissions below: +- UpdateClusterSecGroup (specify by **cluster Id**) +- ListClusterSecGroup (specify by **cluster Id**) + +### Delete +In order to **remove Security Group for K8s**, user must have been granted permissions below: +- UpdateClusterSecGroup (specify by **cluster Id**) +- ListClusterSecGroup (specify by **cluster Id**) + + diff --git a/docs/resources/vserver_cluster_node_group.md b/docs/resources/vserver_cluster_node_group.md new file mode 100644 index 0000000..e177432 --- /dev/null +++ b/docs/resources/vserver_cluster_node_group.md @@ -0,0 +1,59 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vContainer" +page_title: "vngcloud_vserver_cluster_node_group Resource - terraform-provider-vngcloud" +description: |- + Provides a VNG Cloud VServer Cluster Node Group resource. This can be used to import, create, modify, and delete. + +--- + +# vngcloud_vserver_cluster_node_group (Resource) + + + +## Example Usage + +```terraform + +resource "vngcloud_vserver_cluster_node_group" "node_group_1" { + project_id = "pro-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + name = "example-node-group" + cluster_id = "cluster-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + flavor_id = "flav-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + node_count = 1 +} +``` + +## Argument Reference + +The following arguments are supported: + +- **project_id** (String, Required) ID of the Project. +- **name** (String, Required) Name of Node Group. +- **cluster_id** (String, Required) ID of the Cluster. +- **flavor_id** (String, Required) ID of the flavor. +- **node_count** (Number, Required) Number of Node in Node Group. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: +- **id** (String) The ID of this Node Group. +- **flavor_name** (String) Name of the flavor. +- **status** (String) Status of the Node Group + + +## IAM Policy +### Create: +In order to **create Cluster Node Group**, user must have been granted permissions below: +- CreateClusterNodeGroups +- GetClusterNodeGroups (specify by **all resources**) + +### Delete +In order to **delete Cluster Node Group**, user must have been granted permissions below: +- DeleteClusterNodeGroups (specify by **node group Id**) + +### Update +In order to **update Cluster Node Group** (scaling Minion for Node Group), user must have been granted permissions below: +- ScaleMinionCluster (specify by **cluster Id**, **node group Id**) + + diff --git a/docs/resources/vserver_k8s.md b/docs/resources/vserver_k8s.md new file mode 100644 index 0000000..9580efa --- /dev/null +++ b/docs/resources/vserver_k8s.md @@ -0,0 +1,121 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vContainer" +page_title: "vngcloud_vserver_k8s Resource - terraform-provider-vngcloud" +description: |- + Provides a VNG Cloud VServer Kubernetes resource. This can be used to import, create, modify, and delete. + +--- + +# vngcloud_vserver_k8s (Resource) + + + +## Example Usage + +```terraform +resource "vngcloud_vserver_k8s" "k8s" { + project_id = "pro-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + ipip_mode = "Always" + name = "example-cluster" + k8s_version = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + master_count = 1 + node_count = 1 + network_type = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + calico_cidr = "xx.xx.xx.xx/16" + network_id = "net-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + subnet_id = "sub-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + ssh_key = "ssh-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + master_flavor_id = "flav-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + node_flavor_id = "flav-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + etcd_volume_size = 20 + etcd_volume_type_id = "vtype-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + boot_volume_size = 20 + boot_volume_type_id = "vtype-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + docker_volume_size = 20 + docker_volume_type_id = "vtype-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} + +``` + +## Argument Reference + +The following arguments are supported: + +- **project_id** (String, Required) ID of the Project. +- **ipip_mode** (String, Required) IPIP Encapsulation Mode. It can be `Always`. +- **name** (String, Required) Name of Cluster. +- **description** (String, Optional) Description of Cluster. +- **k8s_version** (String, Required) Version of Cluster. +- **master_count** (Number, Required) Number of master node. It can be `1`, `3` or `5`. +- **node_count** (Number, Required) Number of minion node. +- **master_flavor_id** (String, Required) ID of the flavor of the Master Node. +- **node_flavor_id** (String, Required) ID of the flavor of the Minion Node. +- **etcd_volume_size** (Number, Required) Size of ETCD volume. +- **etcd_volume_type_id** (String, Required) ID of ETCD volume type. +- **boot_volume_size** (Number, Required) Size of boot volume. +- **boot_volume_type_id** (String, Required) ID of boot volume type. +- **docker_volume_size** (Number, Required) Size of docker volume. +- **docker_volume_type_id** (String, Required) ID of docker volume type. +- **network_type** (String, Required) ID of the network type. It can be gotten by Data Source vserver_k8s_network_type. +- **calico_cidr** (String, Required) Calico CIDR. It can not be overlapped with Vpc CIDR. +- **network_id** (String, Required) ID of the network. +- **subnet_id** (String, Required) ID of the subnet. +- **ssh_key** (String, Optional) ID of SSH key +- **enable_lb** (Boolean, Optional) Enable HA (allow to have 3 or 5 master nodes). Default value is `false`. +- **auto_scaling** (Boolean, Optional) Enable Auto Scaling. Default value is `false`. +- **auto_healing** (Boolean, Optional) Enable Auto Healing. Default value is `false`. +- **ingress_controller** (Boolean, Optional) Enable Ingress Controller. Default value is `false`. +- **auto_monitoring** (Boolean, Optional) Enable Auto Monitoring. Default value is `false`. +- **min_node_count** (Number, Optional) Minimum number of minion node. It is required when auto_scaling value is `true`. +- **max_node_count** (Number, Optional) Maximum number of minion node. It is required when auto_scaling value is `true`. + +## Attributes Reference + +In addition to all arguments above, the following attributes are exported: +- **id** (String) The ID of this Cluster. +- **node_group_default_id** (String) The ID of default Node Group. +- **config** (String) The config file of Cluster +- **secgroup_default_master** (List of Map of String) List of Sec Group Default for Master Node. It included: + - **sec_group_name** (String) + - **rules** (List of Map of String) List of rules. It included: + - **direction** (String) + - **ethertype** (String) + - **port_range_max** (Number) + - **port_range_min** (Number) + - **protocol** (String) + - **remote_group_name** (String) + - **remote_ip_prefix** (String) +- **secgroup_default_minion** (List of Map of String) List of Sec Group Default for Minion Node. It included: + - **sec_group_name** (String) + - **rules** (List of Map of String) List of rules. It included: + - **direction** (String) + - **ethertype** (String) + - **port_range_max** (Number) + - **port_range_min** (Number) + - **protocol** (String) + - **remote_group_name** (String) + - **remote_ip_prefix** (String) +- **end_point** (String) End Point of Cluster. +- **k8s_network_type** (String) Name of K8s Network Type +- **node_flavor_name** (String) Name of Minion Node Flavor. +- **master_flavor_name** (String) Name of Master Node Flavor. +- **ssh_key_name** (String) Name of SSH Key. + +## IAM Policy +### Create: +In order to **create K8s**, user must have been granted permissions below: + - CreateCluster + - GetCluster (specify by **all resources**) + - ListClusterSecGroupDefault (specify by **all resources**) + - GetClusterConfig (specify by **all resources**) + +### Delete +In order to **delete K8s**, user must have been granted permissions below: +- DeleteCluster (specify by **cluster Id**) + +### Update +In order to **update K8s** (scaling Minion for Default Node Group), user must have been granted permissions below: + - ScaleMinionCluster + - ListClusterSecGroupDefault + - GetClusterConfig \ No newline at end of file diff --git a/docs/resources/vserver_network.md b/docs/resources/vserver_network.md index 7c5f6e2..d27ed43 100644 --- a/docs/resources/vserver_network.md +++ b/docs/resources/vserver_network.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "VPC (Virtual Private Cloud)" page_title: "vngcloud_vserver_network Resource - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Network resource. This can be used to import, create, modify, and delete. diff --git a/docs/resources/vserver_secgroup.md b/docs/resources/vserver_secgroup.md index c63c39d..f96bc72 100644 --- a/docs/resources/vserver_secgroup.md +++ b/docs/resources/vserver_secgroup.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "VPC (Virtual Private Cloud)" page_title: "vngcloud_vserver_secgroup Resource - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Security Group resource. This can be used to import, create, modify, and delete. diff --git a/docs/resources/vserver_secgrouprule.md b/docs/resources/vserver_secgrouprule.md index e067c2c..4db3764 100644 --- a/docs/resources/vserver_secgrouprule.md +++ b/docs/resources/vserver_secgrouprule.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "VPC (Virtual Private Cloud)" page_title: "vngcloud_vserver_secgrouprule Resource - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Security Group Rule resource. This can be used to import, create, and delete. diff --git a/docs/resources/vserver_server.md b/docs/resources/vserver_server.md index a41f074..0882c29 100644 --- a/docs/resources/vserver_server.md +++ b/docs/resources/vserver_server.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vServer" page_title: "vngcloud_vserver_server Resource - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Server resource. This can be used to import, create, modify, and delete. diff --git a/docs/resources/vserver_server_group.md b/docs/resources/vserver_server_group.md index 8886219..9144676 100644 --- a/docs/resources/vserver_server_group.md +++ b/docs/resources/vserver_server_group.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vServer" page_title: "vngcloud_vserver_server_group Resource - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Server Group resource. This can be used to import create, modify, and delete. diff --git a/docs/resources/vserver_sshkey.md b/docs/resources/vserver_sshkey.md index c020a88..4769cc0 100644 --- a/docs/resources/vserver_sshkey.md +++ b/docs/resources/vserver_sshkey.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vServer" page_title: "vngcloud_vserver_sshkey Resource - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer SSH Key resource. This can be used to import, create, and delete. diff --git a/docs/resources/vserver_subnet.md b/docs/resources/vserver_subnet.md index 5f95944..e96d302 100644 --- a/docs/resources/vserver_subnet.md +++ b/docs/resources/vserver_subnet.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "VPC (Virtual Private Cloud)" page_title: "vngcloud_vserver_subnet Resource - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Subnet resource. This can be used to import, create, and delete. diff --git a/docs/resources/vserver_volume.md b/docs/resources/vserver_volume.md index 2a46954..a217909 100644 --- a/docs/resources/vserver_volume.md +++ b/docs/resources/vserver_volume.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "Block Store" page_title: "vngcloud_vserver_volume Resource - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Volume resource. This can be used to import, create, modify, and delete. diff --git a/docs/resources/vserver_volume_attach.md b/docs/resources/vserver_volume_attach.md index d59772d..ffd1614 100644 --- a/docs/resources/vserver_volume_attach.md +++ b/docs/resources/vserver_volume_attach.md @@ -1,5 +1,6 @@ --- # generated by https://github.com/hashicorp/terraform-plugin-docs +subcategory: "vServer" page_title: "vngcloud_vserver_volume_attach Resource - terraform-provider-vngcloud" description: |- Provides a VNG Cloud VServer Acttach volume to server. This can be used to create and delete. diff --git a/examples/main.tf b/examples/main.tf index 94aadd6..99ce5dc 100644 --- a/examples/main.tf +++ b/examples/main.tf @@ -2,20 +2,20 @@ terraform { required_providers { vngcloud = { source = "vngcloud/vngcloud" - version = "0.0.17" + version = "1.0.0" } } -# backend "s3" { -# skip_credentials_validation = true -# skip_metadata_api_check = true -# skip_region_validation = true -# bucket = "bucket-name" -# endpoint = "https://hcm01.vstorage.vngcloud.vn/" -# key = "terraform.tfstate" -# region = "HCM01" -# access_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -# secret_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -# } + # backend "s3" { + # skip_credentials_validation = true + # skip_metadata_api_check = true + # skip_region_validation = true + # bucket = "bucket-name" + # endpoint = "https://hcm01.vstorage.vngcloud.vn/" + # key = "terraform.tfstate" + # region = "HCM01" + # access_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + # secret_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + # } } provider "vngcloud" { @@ -25,99 +25,10 @@ provider "vngcloud" { vserver_base_url = "https://hcm-3.api.vngcloud.vn/vserver/vserver-gateway" } -data "vngcloud_vserver_volume_type_zone" "volume_type_zone" { - name = "SSD" - project_id = var.project_id +module "vserver" { + source = "./modules/vng-cloud-vserver" } -data "vngcloud_vserver_volume_type" "volume_type" { - name = var.ssd_3000 - project_id = var.project_id - volume_type_zone_id = data.vngcloud_vserver_volume_type_zone.volume_type_zone.id -} - -data "vngcloud_vserver_server_group_policy" "soft_affinity_policy" { - name = var.soft_affinity - project_id = var.project_id -} - -data "vngcloud_vserver_server_group_policy" "soft_anti_affinity_policy" { - name = var.soft_anti_affinity - project_id = var.project_id -} - -resource "vngcloud_vserver_server_group" "soft_affinity_server_group" { - description = "soft-affinity" - name = "soft-affinity" - policy_id = data.vngcloud_vserver_server_group_policy.soft_affinity_policy.id - project_id = var.project_id -} - -resource "vngcloud_vserver_server_group" "soft_anti_affinity_server_group" { - description = "soft-anti-affinity" - name = "soft-anti-affinity" - policy_id = data.vngcloud_vserver_server_group_policy.soft_anti_affinity_policy.id - project_id = var.project_id -} - -data "template_file" "cloud-config-bastard" { - template = "${file("init/cloud-config.tpl")}" -} - -data "template_cloudinit_config" "user_data" { - gzip = var.user_data_base64_encode - base64_encode = var.user_data_base64_encode - part { - content_type = "text/cloud-config" - content = "${data.template_file.cloud-config-bastard.rendered}" - } - - part { - content_type = "text/x-shellscript" - content = "${file("init/install-apache.sh")}" - } -} - -resource "vngcloud_vserver_server" "server" { - count = var.server_count - project_id = var.project_id - name = "vngcloud-server-${count.index}" - encryption_volume = false - attach_floating = true - flavor_id = var.s_general_4x8 - image_id = var.ubuntu_20_04 - network_id = var.network_id - root_disk_size = var.root_disk_size - root_disk_type_id = data.vngcloud_vserver_volume_type.volume_type.id - security_group = var.security_group_id_list - subnet_id = var.subnet_id - action = "start" - # user_name = "stackops" - # user_password = "Vng@Cloud3030" - # expire_password = false - # ssh_key = var.ssh_key_id - server_group_id = vngcloud_vserver_server_group.soft_anti_affinity_server_group.id - user_data_base64_encode = var.user_data_base64_encode - user_data = "${data.template_cloudinit_config.user_data.rendered}" - lifecycle { - create_before_destroy = true - } -} - -resource "vngcloud_vserver_volume" "volume" { - count = var.server_count - name = "vngcloud-volume-${count.index}" - size = var.data_disk_size - volume_type_id = data.vngcloud_vserver_volume_type.volume_type.id - project_id = var.project_id - lifecycle { - create_before_destroy = true - } -} - -resource "vngcloud_vserver_volume_attach" "attach_volume" { - count = var.server_count - project_id = var.project_id - volume_id = vngcloud_vserver_volume.volume[count.index].id - server_id = vngcloud_vserver_server.server[count.index].id -} +module "k8s" { + source = "./modules/vng-cloud-k8s" +} \ No newline at end of file diff --git a/examples/modules/vng-cloud-k8s/main.tf b/examples/modules/vng-cloud-k8s/main.tf new file mode 100644 index 0000000..055a325 --- /dev/null +++ b/examples/modules/vng-cloud-k8s/main.tf @@ -0,0 +1,107 @@ +data "vngcloud_vserver_volume_type_zone" "volume_type_zone" { + name = "SSD" + project_id = var.project_id +} + +data "vngcloud_vserver_volume_type" "volume_type" { + name = var.volume_type_name + project_id = var.project_id + volume_type_zone_id = data.vngcloud_vserver_volume_type_zone.volume_type_zone.id +} + +data "vngcloud_vserver_k8s_version" "k8sVersion1" { + name = "Version 1.18.7" + project_id = var.project_id +} + +data "vngcloud_vserver_k8s_network_type" "k8sNetworkType" { + name = "Calico" + project_id = var.project_id +} + +resource "vngcloud_vserver_k8s" "k8s" { + project_id = var.project_id + ipip_mode = "Always" + name = "vng-cloud-k8s-example" + k8s_version = data.vngcloud_vserver_k8s_version.k8sVersion1.id + master_count = 1 + node_count = 1 + network_type = data.vngcloud_vserver_k8s_network_type.k8sNetworkType.id + calico_cidr = "10.46.0.0/16" + network_id = var.network_id + subnet_id = var.subnet_id + ssh_key_id = var.ssh_key_id + master_flavor_id = var.s_general_4x8 + node_flavor_id = var.s_general_4x8 + etcd_volume_size = 20 + etcd_volume_type_id = data.vngcloud_vserver_volume_type.volume_type.id + boot_volume_size = 20 + boot_volume_type_id = data.vngcloud_vserver_volume_type.volume_type.id + docker_volume_size = 20 + docker_volume_type_id = data.vngcloud_vserver_volume_type.volume_type.id + description = "K8S example" + auto_scaling = true + min_node_count = 1 + max_node_count = 3 + enable_lb = false + auto_healing = true + ingress_controller = true +} + +resource "vngcloud_vserver_cluster_node_group" "node_group" { + project_id = var.project_id + name = "node-group-example" + cluster_id = vngcloud_vserver_k8s.k8s.id + flavor_id = var.s_general_4x8 + node_count = 1 +} + + +resource "vngcloud_vserver_change_cluster_sec_group" "change_cluster_sec_group_minion" { + project_id = var.project_id + cluster_id = vngcloud_vserver_k8s.k8s.id + master = false + sec_group_id_list = var.security_group_id_list + depends_on = [vngcloud_vserver_cluster_node_group.node_group] + +} + +resource "vngcloud_vserver_change_cluster_sec_group" "change_cluster_sec_group_master" { + project_id = var.project_id + cluster_id = vngcloud_vserver_k8s.k8s.id + master = true + sec_group_id_list = var.security_group_id_list + depends_on = [vngcloud_vserver_change_cluster_sec_group.change_cluster_sec_group_minion] +} + +resource "local_file" "config" { + content = vngcloud_vserver_k8s.k8s.config + filename = "config" +} + + +#resource "vngcloud_vserver_attach_lb_to_cluster" "attach_lb_to_cluster2" { +# project_id = var.project_id +# cluster_id = vngcloud_vserver_k8s.k8s.id +# depends_on = [vngcloud_vserver_change_cluster_sec_group.change_cluster_sec_group_master] +# load_balancers { +# load_balancer_id = "lb-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +# pools { +# monitor_port = 80 +# pool_id = "pool-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +# port = 80 +# } +# pools { +# monitor_port = 443 +# pool_id = "pool-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +# port = 443 +# } +# } +# load_balancers { +# load_balancer_id = "lb-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +# pools { +# monitor_port = 80 +# pool_id = "pool-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +# port = 80 +# } +#} \ No newline at end of file diff --git a/examples/modules/vng-cloud-k8s/outputs.tf b/examples/modules/vng-cloud-k8s/outputs.tf new file mode 100644 index 0000000..e69de29 diff --git a/examples/modules/vng-cloud-k8s/provider.tf b/examples/modules/vng-cloud-k8s/provider.tf new file mode 100644 index 0000000..a76fa85 --- /dev/null +++ b/examples/modules/vng-cloud-k8s/provider.tf @@ -0,0 +1,8 @@ +terraform { + required_providers { + vngcloud = { + source = "vngcloud/vngcloud" + version = "1.0.0" + } + } +} \ No newline at end of file diff --git a/examples/modules/vng-cloud-k8s/variable.tf b/examples/modules/vng-cloud-k8s/variable.tf new file mode 100644 index 0000000..7f39128 --- /dev/null +++ b/examples/modules/vng-cloud-k8s/variable.tf @@ -0,0 +1,42 @@ +variable "project_id" { + type = string + default = "pro-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} +variable "s_general_4x8" { + type = string + default = "flav-05f97524-0410-46a4-87a8-af92aa759231" +} +variable "image_id" { + type = string + default = "img-1c29f7df-fa23-4dd2-bcfb-9de14dee72e7" +} +variable "volume_type_name" { + type = string + default = "3000" +} +variable "root_disk_size" { + type = number + default = 20 +} +variable "data_disk_size" { + type = number + default = 20 +} +variable "network_id" { + type = string + default = "net--xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} +variable "subnet_id" { + type = string + default = "sub--xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} +variable "ssh_key_id" { + type = string + default = "ssh--xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} +variable "security_group_id_list" { + type = list(string) + default = [ + "secg-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + ] +} \ No newline at end of file diff --git a/examples/init/cloud-config.tpl b/examples/modules/vng-cloud-vserver/init/cloud-config.tpl similarity index 100% rename from examples/init/cloud-config.tpl rename to examples/modules/vng-cloud-vserver/init/cloud-config.tpl diff --git a/examples/init/install-apache.sh b/examples/modules/vng-cloud-vserver/init/install-apache.sh similarity index 100% rename from examples/init/install-apache.sh rename to examples/modules/vng-cloud-vserver/init/install-apache.sh diff --git a/examples/modules/vng-cloud-vserver/main.tf b/examples/modules/vng-cloud-vserver/main.tf new file mode 100644 index 0000000..897873d --- /dev/null +++ b/examples/modules/vng-cloud-vserver/main.tf @@ -0,0 +1,96 @@ +data "vngcloud_vserver_volume_type_zone" "volume_type_zone" { + name = "SSD" + project_id = var.project_id +} +data "vngcloud_vserver_volume_type" "volume_type" { + name = var.ssd_3000 + project_id = var.project_id + volume_type_zone_id = data.vngcloud_vserver_volume_type_zone.volume_type_zone.id +} + +data "vngcloud_vserver_server_group_policy" "soft_affinity_policy" { + name = var.soft_affinity + project_id = var.project_id +} + +data "vngcloud_vserver_server_group_policy" "soft_anti_affinity_policy" { + name = var.soft_anti_affinity + project_id = var.project_id +} + +resource "vngcloud_vserver_server_group" "soft_affinity_server_group" { + description = "soft-affinity" + name = "soft-affinity" + policy_id = data.vngcloud_vserver_server_group_policy.soft_affinity_policy.id + project_id = var.project_id +} + +resource "vngcloud_vserver_server_group" "soft_anti_affinity_server_group" { + description = "soft-anti-affinity" + name = "soft-anti-affinity" + policy_id = data.vngcloud_vserver_server_group_policy.soft_anti_affinity_policy.id + project_id = var.project_id +} + +data "template_file" "cloud-config-bastard" { + template = "${file("modules/vng-cloud-vserver/init/cloud-config.tpl")}" +} + +data "template_cloudinit_config" "user_data" { + gzip = var.user_data_base64_encode + base64_encode = var.user_data_base64_encode + + part { + content_type = "text/cloud-config" + content = "${data.template_file.cloud-config-bastard.rendered}" + } + + part { + content_type = "text/x-shellscript" + content = "${file("modules/vng-cloud-vserver/init/install-apache.sh")}" + } +} + +resource "vngcloud_vserver_server" "server" { + count = var.server_count + project_id = var.project_id + name = "vngcloud-server-${count.index}" + encryption_volume = false + attach_floating = true + flavor_id = var.s_general_4x8 + image_id = var.ubuntu_20_04 + network_id = var.network_id + root_disk_size = var.root_disk_size + root_disk_type_id = data.vngcloud_vserver_volume_type.volume_type.id + security_group = var.security_group_id_list + subnet_id = var.subnet_id + action = "start" + # user_name = "stackops" + # user_password = "Vng@Cloud3030" + # expire_password = false + # ssh_key = var.ssh_key_id + server_group_id = vngcloud_vserver_server_group.soft_anti_affinity_server_group.id + user_data_base64_encode = var.user_data_base64_encode + user_data = "${data.template_cloudinit_config.user_data.rendered}" + lifecycle { + create_before_destroy = true + } +} + +resource "vngcloud_vserver_volume" "volume" { + count = var.server_count + name = "vngcloud-volume-${count.index}" + size = var.data_disk_size + volume_type_id = data.vngcloud_vserver_volume_type.volume_type.id + project_id = var.project_id + lifecycle { + create_before_destroy = true + } +} + +resource "vngcloud_vserver_volume_attach" "attach_volume" { + count = var.server_count + project_id = var.project_id + volume_id = vngcloud_vserver_volume.volume[count.index].id + server_id = vngcloud_vserver_server.server[count.index].id +} \ No newline at end of file diff --git a/examples/modules/vng-cloud-vserver/outputs.tf b/examples/modules/vng-cloud-vserver/outputs.tf new file mode 100644 index 0000000..e69de29 diff --git a/examples/modules/vng-cloud-vserver/provider.tf b/examples/modules/vng-cloud-vserver/provider.tf new file mode 100644 index 0000000..a76fa85 --- /dev/null +++ b/examples/modules/vng-cloud-vserver/provider.tf @@ -0,0 +1,8 @@ +terraform { + required_providers { + vngcloud = { + source = "vngcloud/vngcloud" + version = "1.0.0" + } + } +} \ No newline at end of file diff --git a/examples/modules/vng-cloud-vserver/variable.tf b/examples/modules/vng-cloud-vserver/variable.tf new file mode 100644 index 0000000..cc6df08 --- /dev/null +++ b/examples/modules/vng-cloud-vserver/variable.tf @@ -0,0 +1,62 @@ +variable "project_id" { + type = string + default = "pro-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} +variable "s_general_4x8" { + type = string + default = "flav-05f97524-0410-46a4-87a8-af92aa759231" +} +variable "ubuntu_20_04" { + type = string + default = "img-a34d639b-e070-46ff-8b91-addf4fac45b4" +} +variable "ssd_3000" { + type = string + default = "3000" +} +variable "root_disk_size" { + type = number + default = 20 +} +variable "data_disk_size" { + type = number + default = 50 +} +variable "network_id" { + type = string + default = "net-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} +variable "subnet_id" { + type = string + default = "sub-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} +variable "ssh_key_id" { + type = string + default = "ssh-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" +} +variable "security_group_id_list" { + type = list(string) + default = [ + "secg-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + ] +} + +variable "server_count" { + type = number + default = 1 +} + +variable "soft_affinity" { + type = string + default = "SOFT AFFINITY" +} + +variable "soft_anti_affinity" { + type = string + default = "SOFT ANTI AFFINITY" +} + +variable "user_data_base64_encode" { + type = bool + default = false +} diff --git a/examples/variable.tf b/examples/variable.tf index d4a4704..3d33eba 100644 --- a/examples/variable.tf +++ b/examples/variable.tf @@ -1,68 +1,8 @@ variable "client_id" { - type = string - default = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + type = string + default = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } variable "client_secret" { - type = string - default = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -} -variable "project_id" { - type = string - default = "pro-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -} -variable "s_general_4x8" { - type = string - default = "flav-05f97524-0410-46a4-87a8-af92aa759231" -} -variable "ubuntu_20_04" { - type = string - default = "img-a34d639b-e070-46ff-8b91-addf4fac45b4" -} -variable "ssd_3000" { - type = string - default = "3000" -} -variable "root_disk_size" { - type = number - default = 20 -} -variable "data_disk_size" { - type = number - default = 50 -} -variable "network_id" { - type = string - default = "net-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -} -variable "subnet_id" { - type = string - default = "sub-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -} -variable "ssh_key_id" { - type = string - default = "ssh-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -} -variable "security_group_id_list" { - type = list(string) - default = ["secg-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] -} - -variable "server_count" { - type = number - default = 0 -} - -variable "soft_affinity" { - type = string - default = "SOFT AFFINITY" -} - -variable "soft_anti_affinity" { - type = string - default = "SOFT ANTI AFFINITY" -} - -variable "user_data_base64_encode" { - type = bool - default = false + type = string + default = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } \ No newline at end of file diff --git a/go.mod b/go.mod index 0a8a27d..cb1cf4e 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,14 @@ module github.com/vngcloud/terraform-provider-vngcloud go 1.16 require ( - github.com/hashicorp/terraform-plugin-docs v0.4.0 // indirect - github.com/hashicorp/terraform-plugin-sdk v1.17.2 // indirect + github.com/antihax/optional v1.0.0 + github.com/aws/aws-sdk-go v1.37.0 // indirect + github.com/hashicorp/hcl/v2 v2.8.2 // indirect github.com/hashicorp/terraform-plugin-sdk/v2 v2.6.1 github.com/mattn/go-colorable v0.1.8 // indirect + golang.org/x/net v0.0.0-20210326060303-6b1517762897 golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78 golang.org/x/sys v0.0.0-20210421221651-33663a62ff08 // indirect + google.golang.org/api v0.34.0 // indirect google.golang.org/genproto v0.0.0-20210421164718-3947dc264843 // indirect ) diff --git a/go.sum b/go.sum index f3ea0a7..6a6d7b8 100644 --- a/go.sum +++ b/go.sum @@ -37,22 +37,11 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig/v3 v3.2.0/go.mod h1:tWhwTbUTndesPNeF0C900vKoq283u6zp4APT9vaF3SI= -github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= -github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= @@ -73,8 +62,6 @@ github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJE github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= @@ -82,7 +69,6 @@ github.com/aws/aws-sdk-go v1.37.0 h1:GzFnhOIsrGyQ69s7VgqtrG2BG8v7X7vwB3Xpbd/DBBk github.com/aws/aws-sdk-go v1.37.0/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= @@ -105,23 +91,16 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-billy/v5 v5.1.0 h1:4pl5BV4o7ZG/lterP4S6WzJ6xr49Ba5ET9ygheTYahk= github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= -github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc= github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw= -github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -169,8 +148,6 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0 h1:pMen7vLs8nvgEYhywH3KDWJIJTeEr2ULsVWHWYHQyBs= @@ -183,17 +160,12 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -209,8 +181,6 @@ github.com/hashicorp/go-hclog v0.15.0 h1:qMuK0wxsoW4D0ddCCYwPSTm4KQv1X1ke3WmPWZ0 github.com/hashicorp/go-hclog v0.15.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.3.0/go.mod h1:F9eH4LrE/ZsRdbwhfjs9k9HoDUwAHnYtXdgmf1AVNs0= github.com/hashicorp/go-plugin v1.4.0 h1:b0O7rs5uiJ99Iu9HugEzsM67afboErkHUWddUSpUO3A= github.com/hashicorp/go-plugin v1.4.0/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= @@ -219,18 +189,11 @@ github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoD github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= -github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.3.0 h1:McDWVJIU/y+u1BRV06dPaLfLCaT7fUTJLp5r04x7iNw= github.com/hashicorp/go-version v1.3.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hc-install v0.4.0 h1:cZkRFr1WVa0Ty6x5fTvL1TuO1flul231rWkGH92oYYk= -github.com/hashicorp/hc-install v0.4.0/go.mod h1:5d155H8EC5ewegao9A4PUTMNPZaq+TbOzkJJZ4vrXeI= github.com/hashicorp/hcl/v2 v2.3.0/go.mod h1:d+FwDBbOLvpAM3Z6J7gPj/VoAGkNe/gm352ZhjJ/Zv8= github.com/hashicorp/hcl/v2 v2.8.2 h1:wmFle3D1vu0okesm8BTLVDyJ6/OL9DCLUwn0b2OptiY= github.com/hashicorp/hcl/v2 v2.8.2/go.mod h1:bQTN5mpo+jewjJgh8jr0JUguIi7qPHUF6yIfAEN3jqY= @@ -238,14 +201,8 @@ github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.13.3 h1:R6L2mNpDGSEqtLrSONN8Xth0xYwNrnEVzDz6LF/oJPk= github.com/hashicorp/terraform-exec v0.13.3/go.mod h1:SSg6lbUsVB3DmFyCPjBPklqf6EYGX0TlQ6QTxOlikDU= -github.com/hashicorp/terraform-exec v0.17.2 h1:EU7i3Fh7vDUI9nNRdMATCEfnm9axzTnad8zszYZ73Go= -github.com/hashicorp/terraform-exec v0.17.2/go.mod h1:tuIbsL2l4MlwwIZx9HPM+LOV9vVyEfBYu2GsO1uH3/8= github.com/hashicorp/terraform-json v0.10.0 h1:9syPD/Y5t+3uFjG8AiWVPu1bklJD8QB8iTCaJASc8oQ= github.com/hashicorp/terraform-json v0.10.0/go.mod h1:3defM4kkMfttwiE7VakJDwCd4R+umhSQnvJwORXbprE= -github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= -github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM= -github.com/hashicorp/terraform-plugin-docs v0.13.0 h1:6e+VIWsVGb6jYJewfzq2ok2smPzZrt1Wlm9koLeKazY= -github.com/hashicorp/terraform-plugin-docs v0.13.0/go.mod h1:W0oCmHAjIlTHBbvtppWHe8fLfZ2BznQbuv8+UD8OucQ= github.com/hashicorp/terraform-plugin-go v0.3.0 h1:AJqYzP52JFYl9NABRI7smXI1pNjgR5Q/y2WyVJ/BOZA= github.com/hashicorp/terraform-plugin-go v0.3.0/go.mod h1:dFHsQMaTLpON2gWhVWT96fvtlc/MF1vSy3OdMhWBzdM= github.com/hashicorp/terraform-plugin-sdk/v2 v2.6.1 h1:OZ+Q7irJBDhb71XzMSPGJvTIW101sOmbDg5i5qV1odY= @@ -253,15 +210,11 @@ github.com/hashicorp/terraform-plugin-sdk/v2 v2.6.1/go.mod h1:72j8cKfs9IirGhPMXJ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= @@ -286,7 +239,6 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -294,30 +246,20 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mitchellh/cli v1.1.2/go.mod h1:6iaV0fGdElS6dPBx0EApTxHrcWvmJphyh2n8YBLPPZ4= -github.com/mitchellh/cli v1.1.4 h1:qj8czE26AU4PbiaPXK5uVmMSM+V5BYsFBiM9HhGRLUA= -github.com/mitchellh/cli v1.1.4/go.mod h1:vTLESy5mRhKOs9KDp0/RATawxP1UqBmdrpVRMnpcvKQ= github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= -github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -333,8 +275,6 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1 h1:FVzMWA5RllMAKIdUSC8mdWo3XtwoecrH79BY70sEEpE= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758= github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce/go.mod h1:uFMI8w+ref4v2r9jz+c9i1IfIttS/OkmLfrk1jne5hs= @@ -346,25 +286,13 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= -github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= -github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= -github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -392,8 +320,6 @@ github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.8.2 h1:u+xZfBKgpycDnTNjPhGiTEYZS5qS/Sb5MqSfm7vzcjg= github.com/zclconf/go-cty v1.8.2/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.10.0 h1:mp9ZXQeIcN8kAwuqorjH+Q+njbJKjLrvB2yIh4q7U+0= -github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -407,15 +333,10 @@ golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -483,7 +404,6 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210326060303-6b1517762897 h1:KrsHThm5nFk34YtATK1LsThyGhGbGe1olrte/HInHvs= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -541,13 +461,6 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210421221651-33663a62ff08 h1:qyN5bV+96OX8pL78eXDuz6YlDPzCYgdW74H5yE9BoSU= golang.org/x/sys v0.0.0-20210421221651-33663a62ff08/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b h1:2n253B2r0pYSmEV+UNCQoPfU/FiaizQEK5Gu4Bq4JE8= -golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -556,9 +469,6 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -717,7 +627,6 @@ gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/provider/provider.go b/provider/provider.go index 0a280f4..f856fd6 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -21,6 +21,8 @@ func Provider() *schema.Provider { "vngcloud_vserver_volume_type_zone": vserver.DataSourceVolumeTypeZone(), "vngcloud_vserver_volume_type": vserver.DataSourceVolumeType(), "vngcloud_vserver_server_group_policy": vserver.DataSourceServerGroupPolicy(), + "vngcloud_vserver_k8s_version": vserver.DataSourceK8sVersion(), + "vngcloud_vserver_k8s_network_type": vserver.DataSourceK8sNetworkType(), "vngcloud_vdb_network": vdb.DataSourceNetwork(), "vngcloud_vdb_package": vdb.DataSourcePackage(), "vngcloud_vdb_subnet": vdb.DataSourceSubnet(), @@ -28,22 +30,26 @@ func Provider() *schema.Provider { "vngcloud_vdb_backup_storage_package": vdb.DataSourceBackupStoragePackage(), }, ResourcesMap: map[string]*schema.Resource{ - "vngcloud_vserver_volume": vserver.ResourceVolume(), - "vngcloud_vserver_server": vserver.ResourceServer(), - "vngcloud_vserver_sshkey": vserver.ResourceSSHKey(), - "vngcloud_vserver_network": vserver.ResourceNetwork(), - "vngcloud_vserver_secgroup": vserver.ResourceSecgroup(), - "vngcloud_vserver_subnet": vserver.ResourceSubnet(), - "vngcloud_vserver_secgrouprule": vserver.ResourceSecgroupRule(), - "vngcloud_vserver_volume_attach": vserver.ResourceAttachVolume(), - "vngcloud_vserver_server_group": vserver.ResourceServerGroup(), - "vngcloud_vserver_load_balancer": vserver.ResourceLoadBalancer(), - "vngcloud_vserver_listener": vserver.ResourceListener(), - "vngcloud_vserver_pool": vserver.ResourcePool(), - "vngcloud_vdb_database": vdb.ResourceDatabase(), - "vngcloud_vdb_backup": vdb.ResourceBackup(), - "vngcloud_vdb_configuration_group": vdb.ResourceConfigurationGroup(), - "vngcloud_vdb_backup_storage": vdb.ResourceBackupStorage(), + "vngcloud_vserver_volume": vserver.ResourceVolume(), + "vngcloud_vserver_server": vserver.ResourceServer(), + "vngcloud_vserver_sshkey": vserver.ResourceSSHKey(), + "vngcloud_vserver_network": vserver.ResourceNetwork(), + "vngcloud_vserver_secgroup": vserver.ResourceSecgroup(), + "vngcloud_vserver_subnet": vserver.ResourceSubnet(), + "vngcloud_vserver_secgrouprule": vserver.ResourceSecgroupRule(), + "vngcloud_vserver_volume_attach": vserver.ResourceAttachVolume(), + "vngcloud_vserver_server_group": vserver.ResourceServerGroup(), + "vngcloud_vserver_load_balancer": vserver.ResourceLoadBalancer(), + "vngcloud_vserver_listener": vserver.ResourceListener(), + "vngcloud_vserver_pool": vserver.ResourcePool(), + "vngcloud_vserver_k8s": vserver.ResourceK8s(), + "vngcloud_vserver_cluster_node_group": vserver.ResourceClusterNodeGroup(), + "vngcloud_vserver_attach_lb_to_cluster": vserver.ResourceAttachLb(), + "vngcloud_vserver_change_cluster_sec_group": vserver.ResourceChangeClusterSecGroup(), + "vngcloud_vdb_database": vdb.ResourceDatabase(), + "vngcloud_vdb_backup": vdb.ResourceBackup(), + "vngcloud_vdb_configuration_group": vdb.ResourceConfigurationGroup(), + "vngcloud_vdb_backup_storage": vdb.ResourceBackupStorage(), }, Schema: map[string]*schema.Schema{ //"user_id": { diff --git a/resource/vserver/config.go b/resource/vserver/config.go index 3ac0968..efece6a 100644 --- a/resource/vserver/config.go +++ b/resource/vserver/config.go @@ -1,48 +1,60 @@ package vserver var ( - loadBalancerCreating = []string{"CREATING"} - loadBalancerCreated = []string{"CREATED"} - listenerCreating = []string{"CREATING"} - listenerUpdating = []string{"UPDATING"} - listenerCreated = []string{"CREATED"} - poolCreating = []string{"CREATING"} - poolUpdating = []string{"UPDATING"} - poolCreated = []string{"CREATED"} - networkCreating = []string{"CREATING"} - networkCreated = []string{"ACTIVE"} - networkDeleting = []string{"DELETING"} - networkDeleted = []string{"DELETED"} - secgroupRuleCreating = []string{"CREATING"} - secgroupRuleCreated = []string{"ACTIVE"} - secgroupCreating = []string{"CREATING"} - secgroupCreated = []string{"ACTIVE"} - serverCreating = []string{"CREATING", "CREATING-BILLING"} - serverCreated = []string{"ACTIVE"} - serverRebooting = []string{"REBOOTING"} - serverRebooted = []string{"ACTIVE"} - serverStopping = []string{"TURNING-OFF"} - serverStopped = []string{"STOPPED"} - serverStarting = []string{"STARTING"} - serverStarted = []string{"ACTIVE"} - serverResizing = []string{"CHANGING-FLAVOR", "VERIFYING-FLAVOR"} - serverResize = []string{"ACTIVE", "STOPPED"} - serverDeleting = []string{"DELETING"} - serverDeleted = []string{"DELETED"} - subnetCreating = []string{"CREATING"} - subnetCreated = []string{"ACTIVE"} - subnetDeleting = []string{"DELETING"} - subnetDeleted = []string{"DELETED"} - volumeCreating = []string{"CREATING", "CREATING-BILLING"} - volumeCreated = []string{"AVAILABLE"} - volumeAttaching = []string{"AVAILABLE", "ATTACHING"} - volumeAttached = []string{"IN-USE"} - volumeDetaching = []string{"IN-USE", "DETACHING"} - volumeResizing = []string{"RESIZING", "CHANGING-IOPS"} - volumeResized = []string{"IN-USE", "AVAILABLE"} - volumeDetached = []string{"AVAILABLE", "IN-USE"} - volumeDeleting = []string{"DELETING"} - volumeDeleted = []string{"DELETED"} - serverChangingSecGroup = []string{"CHANGING-SECURITY-GROUP"} - serverChangedSecGroup = []string{"ACTIVE", "STOPPED"} + loadBalancerCreating = []string{"CREATING"} + loadBalancerCreated = []string{"CREATED"} + listenerCreating = []string{"CREATING"} + listenerUpdating = []string{"UPDATING"} + listenerCreated = []string{"CREATED"} + poolCreating = []string{"CREATING"} + poolUpdating = []string{"UPDATING"} + poolCreated = []string{"CREATED"} + networkCreating = []string{"CREATING"} + networkCreated = []string{"ACTIVE"} + networkDeleting = []string{"DELETING"} + networkDeleted = []string{"DELETED"} + secgroupRuleCreating = []string{"CREATING"} + secgroupRuleCreated = []string{"ACTIVE"} + secgroupCreating = []string{"CREATING"} + secgroupCreated = []string{"ACTIVE"} + serverCreating = []string{"CREATING", "CREATING-BILLING"} + serverCreated = []string{"ACTIVE"} + serverRebooting = []string{"REBOOTING"} + serverRebooted = []string{"ACTIVE"} + serverStopping = []string{"TURNING-OFF"} + serverStopped = []string{"STOPPED"} + serverStarting = []string{"STARTING"} + serverStarted = []string{"ACTIVE"} + serverResizing = []string{"CHANGING-FLAVOR", "VERIFYING-FLAVOR"} + serverResize = []string{"ACTIVE", "STOPPED"} + serverDeleting = []string{"DELETING"} + serverDeleted = []string{"DELETED"} + subnetCreating = []string{"CREATING"} + subnetCreated = []string{"ACTIVE"} + subnetDeleting = []string{"DELETING"} + subnetDeleted = []string{"DELETED"} + volumeCreating = []string{"CREATING", "CREATING-BILLING"} + volumeCreated = []string{"AVAILABLE"} + volumeAttaching = []string{"AVAILABLE", "ATTACHING"} + volumeAttached = []string{"IN-USE"} + volumeDetaching = []string{"IN-USE", "DETACHING"} + volumeResizing = []string{"RESIZING", "CHANGING-IOPS"} + volumeResized = []string{"IN-USE", "AVAILABLE"} + volumeDetached = []string{"AVAILABLE"} + volumeDeleting = []string{"DELETING"} + volumeDeleted = []string{"DELETED"} + serverChangingSecGroup = []string{"CHANGING-SECURITY-GROUP"} + serverChangedSecGroup = []string{"ACTIVE", "STOPPED"} + k8sClusterCreating = []string{"CREATING", "CREATING-BILLING"} + k8sClusterCreated = []string{"ACTIVE"} + k8sClusterDeleting = []string{"DELETING"} + k8sClusterDeleted = []string{"DELETED"} + k8sClusterAttachingLB = []string{"PROCESSING"} + k8sClusterAttachedLB = []string{"FINISH"} + clusterNodeGroupCreating = []string{"CREATING"} + clusterNodeGroupCreated = []string{"ACTIVE"} + clusterNodeGroupDeleting = []string{"DELETING"} + clusterNodeGroupDeleted = []string{"DELETED"} + clusterNodeGroupScaling = []string{"PROCESSING"} + clusterNodeGroupScaled = []string{"FINISH"} ) diff --git a/resource/vserver/data_source_flavor.go b/resource/vserver/data_source_flavor.go index 853df4e..29f4af6 100644 --- a/resource/vserver/data_source_flavor.go +++ b/resource/vserver/data_source_flavor.go @@ -54,9 +54,11 @@ func dataSourceFlavorRead(d *schema.ResourceData, m interface{}) error { name := d.Get("name").(string) flavorZoneId := d.Get("flavor_zone_id").(string) cli := m.(*client.Client) - resp, _, err := cli.VserverClient.FlavorRestControllerApi.ListFlavorUsingGET(context.TODO(), flavorZoneId, projectID) - if err != nil { - return err + resp, httpResponse, _ := cli.VserverClient.FlavorRestControllerApi.ListFlavorUsingGET(context.TODO(), flavorZoneId, projectID) + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errorResponse := fmt.Errorf("request fail with errMsg : %s", responseBody) + return errorResponse } respJSON, _ := json.Marshal(resp) log.Printf("-------------------------------------\n") diff --git a/resource/vserver/data_source_flavor_zone.go b/resource/vserver/data_source_flavor_zone.go index 5798176..1b5397d 100644 --- a/resource/vserver/data_source_flavor_zone.go +++ b/resource/vserver/data_source_flavor_zone.go @@ -31,9 +31,11 @@ func dataSourceFlavorZoneRead(d *schema.ResourceData, m interface{}) error { projectID := d.Get("project_id").(string) name := d.Get("name").(string) cli := m.(*client.Client) - resp, _, err := cli.VserverClient.FlavorZoneRestControllerApi.ListFlavorZoneUsingGET(context.TODO(), projectID) - if err != nil { - return err + resp, httpResponse, _ := cli.VserverClient.FlavorZoneRestControllerApi.ListFlavorZoneUsingGET(context.TODO(), projectID) + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errorResponse := fmt.Errorf("request fail with errMsg : %s", responseBody) + return errorResponse } respJSON, _ := json.Marshal(resp) log.Printf("-------------------------------------\n") diff --git a/resource/vserver/data_source_image.go b/resource/vserver/data_source_image.go index 7ee85b5..721079a 100644 --- a/resource/vserver/data_source_image.go +++ b/resource/vserver/data_source_image.go @@ -38,9 +38,11 @@ func dataSourceImageRead(d *schema.ResourceData, m interface{}) error { name := d.Get("name").(string) flavorID := d.Get("flavor_zone_id") cli := m.(*client.Client) - resp, _, err := cli.VserverClient.ImageRestControllerApi.ListOSImageUsingGET(context.TODO(), projectID) - if err != nil { - return err + resp, httpResponse, _ := cli.VserverClient.ImageRestControllerApi.ListOSImageUsingGET(context.TODO(), projectID) + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errorResponse := fmt.Errorf("request fail with errMsg : %s", responseBody) + return errorResponse } respJSON, _ := json.Marshal(resp) log.Printf("-------------------------------------\n") diff --git a/resource/vserver/data_source_k8s_network_type.go b/resource/vserver/data_source_k8s_network_type.go new file mode 100644 index 0000000..3c044fe --- /dev/null +++ b/resource/vserver/data_source_k8s_network_type.go @@ -0,0 +1,58 @@ +package vserver + +import ( + "encoding/json" + "fmt" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/vngcloud/terraform-provider-vngcloud/client" + "golang.org/x/net/context" + "log" +) + +func DataSourceK8sNetworkType() *schema.Resource { + return &schema.Resource{ + Read: dataSourceK8sNetworkTypeRead, + Schema: map[string]*schema.Schema{ + "project_id": { + Type: schema.TypeString, + Required: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceK8sNetworkTypeRead(d *schema.ResourceData, m interface{}) error { + projectID := d.Get("project_id").(string) + k8sNetworkTypeName := d.Get("name").(string) + cli := m.(*client.Client) + + resp, httpResponse, _ := cli.VserverClient.K8SClusterRestControllerApi.ListK8sNetworkTypeUsingGET(context.TODO(), projectID) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + err := fmt.Errorf("request fail with errMsg: %s", responseBody) + return err + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + + for _, k8sNetworkType := range resp { + if k8sNetworkType.Name == k8sNetworkTypeName { + d.SetId(k8sNetworkType.Uuid) + d.Set("id", string(k8sNetworkType.Uuid)) + return nil + } + } + return fmt.Errorf("not found resource with name %s ", k8sNetworkTypeName) +} diff --git a/resource/vserver/data_source_k8s_version.go b/resource/vserver/data_source_k8s_version.go new file mode 100644 index 0000000..98a674c --- /dev/null +++ b/resource/vserver/data_source_k8s_version.go @@ -0,0 +1,58 @@ +package vserver + +import ( + "encoding/json" + "fmt" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/vngcloud/terraform-provider-vngcloud/client" + "golang.org/x/net/context" + "log" +) + +func DataSourceK8sVersion() *schema.Resource { + return &schema.Resource{ + Read: dataSourceK8sVersionRead, + Schema: map[string]*schema.Schema{ + "project_id": { + Type: schema.TypeString, + Required: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + "id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func dataSourceK8sVersionRead(d *schema.ResourceData, m interface{}) error { + projectID := d.Get("project_id").(string) + k8sVersionName := d.Get("name").(string) + + cli := m.(*client.Client) + resp, httpResponse, _ := cli.VserverClient.K8SClusterRestControllerApi.ListK8sVersionUsingGET(context.TODO(), projectID) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + err := fmt.Errorf("request fail with errMsg: %s", responseBody) + return err + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + + for _, k8sVersion := range resp { + if k8sVersion.Name == k8sVersionName { + d.SetId(k8sVersion.Uuid) + d.Set("id", string(k8sVersion.Uuid)) + return nil + } + } + return fmt.Errorf("not found resource with name %s ", k8sVersionName) +} diff --git a/resource/vserver/data_source_project.go b/resource/vserver/data_source_project.go index 30298f5..ccba234 100644 --- a/resource/vserver/data_source_project.go +++ b/resource/vserver/data_source_project.go @@ -24,9 +24,11 @@ func DataSourceProject() *schema.Resource { func dataSourceProjectRead(d *schema.ResourceData, m interface{}) error { // id := d.Get("project_id").(string) cli := m.(*client.Client) - resp, _, err := cli.VserverClient.ProjectRestControllerApi.ListProjectUsingGET(context.TODO()) - if err != nil { - return err + resp, httpResponse, _ := cli.VserverClient.ProjectRestControllerApi.ListProjectUsingGET(context.TODO()) + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errorResponse := fmt.Errorf("request fail with errMsg : %s", responseBody) + return errorResponse } respJSON, _ := json.Marshal(resp) log.Printf("-------------------------------------\n") diff --git a/resource/vserver/data_source_volume_type.go b/resource/vserver/data_source_volume_type.go index b390ea4..c356714 100644 --- a/resource/vserver/data_source_volume_type.go +++ b/resource/vserver/data_source_volume_type.go @@ -50,9 +50,11 @@ func dataSourceVolumeTypeRead(d *schema.ResourceData, m interface{}) error { zoneID := d.Get("volume_type_zone_id").(string) name := d.Get("name").(string) cli := m.(*client.Client) - resp, _, err := cli.VserverClient.VolumeTypeRestControllerApi.ListVolumeTypeUsingGET(context.TODO(), projectID, zoneID) - if err != nil { - return err + resp, httpResponse, _ := cli.VserverClient.VolumeTypeRestControllerApi.ListVolumeTypeUsingGET(context.TODO(), projectID, zoneID) + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errorResponse := fmt.Errorf("request fail with errMsg : %s", responseBody) + return errorResponse } respJSON, _ := json.Marshal(resp) log.Printf("-------------------------------------\n") diff --git a/resource/vserver/data_source_volume_type_zone.go b/resource/vserver/data_source_volume_type_zone.go index f0a0722..4b94179 100644 --- a/resource/vserver/data_source_volume_type_zone.go +++ b/resource/vserver/data_source_volume_type_zone.go @@ -29,9 +29,11 @@ func dataSourceVolumeTypeZoneRead(d *schema.ResourceData, m interface{}) error { projectID := d.Get("project_id").(string) name := d.Get("name").(string) cli := m.(*client.Client) - resp, _, err := cli.VserverClient.VolumeTypeZoneRestControllerApi.ListVolumeTypeZoneUsingGET(context.TODO(), projectID) - if err != nil { - return err + resp, httpResponse, _ := cli.VserverClient.VolumeTypeZoneRestControllerApi.ListVolumeTypeZoneUsingGET(context.TODO(), projectID) + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errorResponse := fmt.Errorf("request fail with errMsg : %s", responseBody) + return errorResponse } respJSON, _ := json.Marshal(resp) log.Printf("-------------------------------------\n") diff --git a/resource/vserver/resource_attach_lb.go b/resource/vserver/resource_attach_lb.go new file mode 100644 index 0000000..b717ab1 --- /dev/null +++ b/resource/vserver/resource_attach_lb.go @@ -0,0 +1,246 @@ +package vserver + +import ( + "encoding/json" + "fmt" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/vngcloud/terraform-provider-vngcloud/client" + "github.com/vngcloud/terraform-provider-vngcloud/client/vserver" + "golang.org/x/net/context" + "log" + "net/http" + "time" +) + +func ResourceAttachLb() *schema.Resource { + return &schema.Resource{ + Create: resourceClusterLbAttach, + Update: resourceClusterLbAttach, + Delete: resourceClusterLbDetach, + Read: resourceClusterLbRead, + Schema: map[string]*schema.Schema{ + "project_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "cluster_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "load_balancers": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "load_balancer_id": { + Type: schema.TypeString, + Required: true, + }, + "pools": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "monitor_port": { + Type: schema.TypeInt, + Required: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + }, + "pool_id": { + Type: schema.TypeString, + Required: true, + }, + "port": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func resourceClusterLbAttach(d *schema.ResourceData, m interface{}) error { + projectID := d.Get("project_id").(string) + clusterID := d.Get("cluster_id").(string) + cli := m.(*client.Client) + + loadBalancers := d.Get("load_balancers").([]interface{}) + + loadBalancerList := make([]vserver.LoadBalancerItem, 0, len(loadBalancers)) + + for _, lb := range loadBalancers { + loadBalancer := lb.(map[string]interface{}) + var loadBalancerItem vserver.LoadBalancerItem + loadBalancerItem.LoadBalancerId = loadBalancer["load_balancer_id"].(string) + loadBalancerItem.Pools = buildPoolItemRequest(loadBalancer["pools"].([]interface{})) + loadBalancerList = append(loadBalancerList, loadBalancerItem) + } + + req := vserver.AttachToLoadBalancerBackendRequest{ + ClusterId: clusterID, + LoadBalancers: loadBalancerList, + } + log.Printf("[DEBUG] %v\n", req) + resp, httpResponse, err := cli.VserverClient.K8SClusterRestControllerApi.AttachToLbUsingPOST(context.TODO(), req, clusterID, projectID) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errResponse := fmt.Errorf("request fail with errMsg: %s", responseBody) + return errResponse + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + + stateConf := &resource.StateChangeConf{ + Pending: k8sClusterAttachingLB, + Target: k8sClusterAttachedLB, + Refresh: resourceServerTaskStateRefreshFunc(cli, clusterID, projectID, resp.Data.Id), + Timeout: 60 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 1 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for attach load balancer to cluster (%s) %s", clusterID, err) + } + + d.SetId(clusterID) + + return resourceClusterLbRead(d, m) +} + +func buildPoolItemRequest(ps []interface{}) []vserver.PoolItem { + poolItemList := make([]vserver.PoolItem, 0, len(ps)) + for _, p := range ps { + pool := p.(map[string]interface{}) + var poolItem vserver.PoolItem + poolItem.MonitorPort = int32(pool["monitor_port"].(int)) + poolItem.Name = pool["name"].(string) + poolItem.PoolId = pool["pool_id"].(string) + poolItem.Port = int32(pool["port"].(int)) + poolItemList = append(poolItemList, poolItem) + } + return poolItemList +} + +func resourceClusterLbDetach(d *schema.ResourceData, m interface{}) error { + projectID := d.Get("project_id").(string) + clusterID := d.Id() + cli := m.(*client.Client) + loadBalancerList := make([]vserver.LoadBalancerItem, 0) + + req := vserver.AttachToLoadBalancerBackendRequest{ + ClusterId: clusterID, + LoadBalancers: loadBalancerList, + } + + resp, httpResponse, err := cli.VserverClient.K8SClusterRestControllerApi.AttachToLbUsingPOST(context.TODO(), req, clusterID, projectID) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errorResponse := fmt.Errorf("request faile with errMsg: %s", responseBody) + return errorResponse + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + + stateConf := &resource.StateChangeConf{ + Pending: k8sClusterAttachingLB, + Target: k8sClusterAttachedLB, + Refresh: resourceServerTaskStateRefreshFunc(cli, clusterID, projectID, resp.Data.Id), + Timeout: 50 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 1 * time.Second, + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for attach load balancer to cluster (%s) %s", clusterID, err) + } + + d.SetId("") + + return nil +} + +func resourceClusterLbRead(d *schema.ResourceData, m interface{}) error { + projectID := d.Get("project_id").(string) + clusterID := d.Id() + cli := m.(*client.Client) + resp, httpResponse, _ := cli.VserverClient.K8SClusterRestControllerApi.ListClusterPoolByClusterUsingGET(context.TODO(), clusterID, projectID) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + err := fmt.Errorf("request fail with errMsg: %s", responseBody) + return err + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + + if len(resp) > 0 { + d.Set("load_balancer_id", resp[0].LoadBalancerId) + d.Set("cluster_id", resp[0].ClusterId) + //d.Set("cluster_pool", flattenPools(resp)) + } else { + d.Set("load_balancer_id", "") + d.Set("cluster_id", clusterID) + //d.Set("cluster_pool", "") + } + return nil +} + +func flattenPools(poolLists []vserver.ClusterPoolDto) []map[string]interface{} { + if len(poolLists) == 0 { + return []map[string]interface{}{} + } + + l := make([]map[string]interface{}, 0, len(poolLists)) + + for _, poolList := range poolLists { + m := map[string]interface{}{ + "monitor_port": poolList.MonitorPort, + "name": poolList.PoolName, + "pool_id": poolList.PoolId, + "port": int(poolList.Port), + } + + l = append(l, m) + } + return l +} + +func resourceServerTaskStateRefreshFunc(cli *client.Client, clusterId string, projectId string, serverTaskId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, httpResponse, _ := cli.VserverClient.K8SClusterRestControllerApi.GetServerTaskStatusUsingGET(context.TODO(), clusterId, projectId, serverTaskId) + + if httpResponse.StatusCode != http.StatusOK { + return nil, "", fmt.Errorf("error describing: %s", GetResponseBody(httpResponse)) + } + + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(resp)) + log.Printf("-------------------------------------\n") + + return resp, resp, nil + } +} diff --git a/resource/vserver/resource_change_cluster_sec_group.go b/resource/vserver/resource_change_cluster_sec_group.go new file mode 100644 index 0000000..563b0b1 --- /dev/null +++ b/resource/vserver/resource_change_cluster_sec_group.go @@ -0,0 +1,198 @@ +package vserver + +import ( + "context" + "encoding/json" + "fmt" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/vngcloud/terraform-provider-vngcloud/client" + "github.com/vngcloud/terraform-provider-vngcloud/client/vserver" + "log" +) + +func ResourceChangeClusterSecGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceAddSecGroup, + Delete: resourceRemoveSecGroup, + Read: resourceReadSecGroup, + Schema: map[string]*schema.Schema{ + "project_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "cluster_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "master": { + Type: schema.TypeBool, + Required: true, + ForceNew: true, + }, + "sec_group_id_list": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + }, + //"sec_group_list": { + // Type: schema.TypeList, + // Computed: true, + // Elem: &schema.Resource{ + // Schema: map[string]*schema.Schema{ + // "id": { + // Type: schema.TypeString, + // Computed: true, + // }, + // "name": { + // Type: schema.TypeString, + // Computed: true, + // }, + // }, + // }, + //}, + }, + } +} + +func resourceAddSecGroup(d *schema.ResourceData, m interface{}) error { + projectID := d.Get("project_id").(string) + clusterId := d.Get("cluster_id").(string) + var typeOfNode string + if d.Get("master").(bool) == true { + typeOfNode = "master" + } else { + typeOfNode = "minion" + } + cli := m.(*client.Client) + var secGroupIdList []string + for _, s := range d.Get("sec_group_id_list").([]interface{}) { + secGroup := s.(string) + secGroupIdList = append(secGroupIdList, secGroup) + } + + request := vserver.UpdateClusterSecGroupRequest{ + ClusterId: clusterId, + Master: d.Get("master").(bool), + SecGroupIds: secGroupIdList, + } + + resp, httpResponse, err := cli.VserverClient.K8SClusterRestControllerApi.UpdateSecGroupUsingPUT(context.TODO(), projectID, clusterId, request) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errResponse := fmt.Errorf("request fail with errMsg: %s", responseBody) + return errResponse + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + if err != nil { + return fmt.Errorf("error attaching secgroup for %s cluster (%s) %s", typeOfNode, clusterId, err) + } + + d.SetId(clusterId) + return resourceReadSecGroup(d, m) +} + +func resourceRemoveSecGroup(d *schema.ResourceData, m interface{}) error { + projectID := d.Get("project_id").(string) + clusterId := d.Get("cluster_id").(string) + var typeOfNode string + if d.Get("master").(bool) == true { + typeOfNode = "master" + } else { + typeOfNode = "minion" + } + cli := m.(*client.Client) + var secGroupIdList = make([]string, 0) + + request := vserver.UpdateClusterSecGroupRequest{ + ClusterId: clusterId, + Master: d.Get("master").(bool), + SecGroupIds: secGroupIdList, + } + + resp, httpResponse, err := cli.VserverClient.K8SClusterRestControllerApi.UpdateSecGroupUsingPUT(context.TODO(), projectID, clusterId, request) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errResponse := fmt.Errorf("request fail with errMsg: %s", responseBody) + return errResponse + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + if err != nil { + return fmt.Errorf("error attaching secgroup for %s cluster (%s) %s", typeOfNode, clusterId, err) + } + + d.SetId(clusterId) + return resourceReadSecGroup(d, m) +} + +func resourceReadSecGroup(d *schema.ResourceData, m interface{}) error { + projectID := d.Get("project_id").(string) + clusterId := d.Get("cluster_id").(string) + isMaster := d.Get("master").(bool) + var typeOfNode string + if isMaster == true { + typeOfNode = "master" + } else { + typeOfNode = "minion" + } + cli := m.(*client.Client) + resp, httpResponse, err := cli.VserverClient.K8SClusterRestControllerApi.ListSecGroupUsingGET(context.TODO(), clusterId, projectID, isMaster) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errResponse := fmt.Errorf("request fail with errMsg: %s", responseBody) + return errResponse + } + + respJSON, _ := json.Marshal(resp) + log.Printf("[DEBUG] %s: %s", typeOfNode, string(respJSON)) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + if err != nil { + return fmt.Errorf("error get list secgroup for %s cluster (%s) %s", typeOfNode, clusterId, err) + } + + //var secGroupList []map[string]string + securityGroupInterfaceRequest := d.Get("sec_group_id_list").([]interface{}) + var secGroupIdListRequest []string + var secGroupIdList []string + for _, s := range securityGroupInterfaceRequest { + secGroupIdListRequest = append(secGroupIdListRequest, s.(string)) + } + + if len(resp) > 0 { + for _, s := range resp { + secGroupIdList = append(secGroupIdList, s.SecGroupId) + //m := make(map[string]string) + //m["id"] = s.SecGroupId + //m["name"] = s.SecGroupName + //secGroupList = append(secGroupList, m) + } + } + + if !CheckListStringEqual(secGroupIdListRequest, secGroupIdList) { + d.Set("sec_group_id_list", secGroupIdList) + } + + d.Set("cluster_id", clusterId) + d.Set("master", isMaster) + //d.Set("sec_group_list", secGroupList) + + d.SetId(clusterId) + return nil +} diff --git a/resource/vserver/resource_cluster_node_group.go b/resource/vserver/resource_cluster_node_group.go new file mode 100644 index 0000000..760eb28 --- /dev/null +++ b/resource/vserver/resource_cluster_node_group.go @@ -0,0 +1,256 @@ +package vserver + +import ( + "context" + "encoding/json" + "fmt" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/vngcloud/terraform-provider-vngcloud/client" + "github.com/vngcloud/terraform-provider-vngcloud/client/vserver" + "log" + "net/http" + "strings" + "time" +) + +func ResourceClusterNodeGroup() *schema.Resource { + return &schema.Resource{ + Create: resourceClusterNodeGroupCreate, + Read: resourceClusterNodeGroupRead, + Update: UpdateClusterNodeGroupFunc, + Delete: DeleteClusterNodeGroupFunc, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), ":") + if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { + return nil, fmt.Errorf("unexpected format of ID (%q), expected ProjectID:NodeGroupId", d.Id()) + } + projectID := idParts[0] + clusterNodeGroupId := idParts[1] + d.SetId(clusterNodeGroupId) + d.Set("project_id", projectID) + return []*schema.ResourceData{d}, nil + }, + }, + Schema: map[string]*schema.Schema{ + "project_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "cluster_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "flavor_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "flavor_name": { + Type: schema.TypeString, + Computed: true, + }, + "node_count": { + Type: schema.TypeInt, + Required: true, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceClusterNodeGroupCreate(d *schema.ResourceData, m interface{}) error { + log.Printf("Create Cluster Node Group") + projectId := d.Get("project_id").(string) + cli := m.(*client.Client) + + nodeGroup := vserver.CreateNodeGroupBackendRequest{ + ClusterId: d.Get("cluster_id").(string), + FlavorId: d.Get("flavor_id").(string), + Name: d.Get("name").(string), + NodeCount: int32(d.Get("node_count").(int)), + } + + resp, httpResponse, err := cli.VserverClient.K8SClusterRestControllerApi.CreateClusterNodeGroupUsingPOST(context.TODO(), nodeGroup.ClusterId, nodeGroup, projectId) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errResponse := fmt.Errorf("request fail with errMsg: %s", responseBody) + return errResponse + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + + stateConf := &resource.StateChangeConf{ + Pending: clusterNodeGroupCreating, + Target: clusterNodeGroupCreated, + Refresh: resourceClusterNodeGroupStateRefreshFunc(cli, resp.Data.Uuid, projectId), + Timeout: 60 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 1 * time.Second, + } + + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for create cluster node group (%s) %s", resp.Data.Uuid, err) + } + d.SetId(resp.Data.Uuid) + return resourceClusterNodeGroupRead(d, m) +} + +func resourceClusterNodeGroupStateRefreshFunc(cli *client.Client, nodegroupId string, projectId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, httpResponse, _ := cli.VserverClient.K8SClusterRestControllerApi.GetClusterNodeGroupUsingGET(context.TODO(), nodegroupId, projectId) + if httpResponse.StatusCode != http.StatusOK { + return nil, "", fmt.Errorf("error describing instance: %s", GetResponseBody(httpResponse)) + } + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + clusterNodegroup := resp.Data + return clusterNodegroup, clusterNodegroup.Status, nil + } +} + +func resourceClusterNodeGroupRead(d *schema.ResourceData, m interface{}) error { + log.Printf("Read Cluster Node Group") + projectId := d.Get("project_id").(string) + nodeGroupId := d.Id() + cli := m.(*client.Client) + + resp, httpResponse, _ := cli.VserverClient.K8SClusterRestControllerApi.GetClusterNodeGroupUsingGET(context.TODO(), nodeGroupId, projectId) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + err := fmt.Errorf("request fail with errMsg: %s", responseBody) + return err + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + nodeGroup := resp.Data + d.Set("project_id", nodeGroup.ProjectId) + d.Set("name", nodeGroup.Name) + d.Set("cluster_id", nodeGroup.ClusterId) + d.Set("flavor_id", nodeGroup.FlavorId) + d.Set("flavor_name", nodeGroup.FlavorName) + d.Set("node_count", nodeGroup.NodeCount) + d.Set("status", nodeGroup.Status) + return nil +} + +func UpdateClusterNodeGroupFunc(d *schema.ResourceData, m interface{}) error { + if d.HasChange("node_count") { + nodeGroupId := d.Id() + clusterId := d.Get("cluster_id").(string) + return ResourceK8sScalingNodeGroup(d, m, nodeGroupId, clusterId) + } + return resourceClusterNodeGroupRead(d, m) +} + +func DeleteClusterNodeGroupFunc(d *schema.ResourceData, m interface{}) error { + projectID := d.Get("project_id").(string) + nodeGroupID := d.Id() + cli := m.(*client.Client) + + resp, httpResponse, err := cli.VserverClient.K8SClusterRestControllerApi.DeleteClusterNodeGroupUsingDELETE(context.TODO(), nodeGroupID, projectID) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errorResponse := fmt.Errorf("request fail with errMsh: %s", responseBody) + return errorResponse + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + stateConf := &resource.StateChangeConf{ + Pending: clusterNodeGroupDeleting, + Target: clusterNodeGroupDeleted, + Refresh: resourceClusterNodeGroupDeleteStateRefreshFunc(cli, d.Id(), projectID), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 1 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for delete cluster (%s) : %s", d.Id(), err) + } + d.SetId("") + return nil +} + +func resourceClusterNodeGroupDeleteStateRefreshFunc(cli *client.Client, nodegroupId string, projectID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, httpResponse, _ := cli.VserverClient.K8SClusterRestControllerApi.GetClusterNodeGroupUsingGET(context.TODO(), nodegroupId, projectID) + if httpResponse.StatusCode != http.StatusOK { + if httpResponse.StatusCode == http.StatusNotFound { + return vserver.ClusterNodeGroupDto{Status: "DELETED"}, "DELETED", nil + } else { + return nil, "", fmt.Errorf("error describing instance: %s", GetResponseBody(httpResponse)) + } + } + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + nodeGroup := resp.Data + return nodeGroup, nodeGroup.Status, nil + } +} + +func ResourceK8sScalingNodeGroup(d *schema.ResourceData, m interface{}, nodegroupId string, clusterId string) error { + projectID := d.Get("project_id").(string) + cli := m.(*client.Client) + + o, n := d.GetChange("node_count") + scaleMinionRequest := vserver.ScaleMinionBackendRequest{ + ClusterId: clusterId, + NodeCount: int32(n.(int)), + NodeGroupId: nodegroupId, + } + + resp, httpResponse, err := cli.VserverClient.K8SClusterRestControllerApi.ScaleMinionUsingPOST(context.TODO(), clusterId, projectID, nodegroupId, scaleMinionRequest) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errorResponse := fmt.Errorf("request fail with errMsg: %s", responseBody) + d.Set("node_count", o.(int)) + return errorResponse + } + scaleMinionRespJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(scaleMinionRespJSON)) + log.Printf("-------------------------------------\n") + stateConf := &resource.StateChangeConf{ + Pending: clusterNodeGroupScaling, + Target: clusterNodeGroupScaled, + Refresh: resourceServerTaskStateRefreshFunc(cli, clusterId, projectID, resp.Data.Id), + Timeout: 60 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 1 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for instance %s to be resizing: %s", nodegroupId, err) + } + return nil +} diff --git a/resource/vserver/resource_k8s.go b/resource/vserver/resource_k8s.go new file mode 100644 index 0000000..57d56f8 --- /dev/null +++ b/resource/vserver/resource_k8s.go @@ -0,0 +1,661 @@ +package vserver + +import ( + "context" + "encoding/json" + "fmt" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/vngcloud/terraform-provider-vngcloud/client" + "github.com/vngcloud/terraform-provider-vngcloud/client/vserver" + "log" + "net/http" + "strings" + "time" +) + +func ResourceK8s() *schema.Resource { + return &schema.Resource{ + Create: resourceK8sCreate, + Read: resourceK8sRead, + Update: resourceK8sUpdate, + Delete: resourceK8sDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), ":") + if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { + return nil, fmt.Errorf( + "unexpected format of ID (%q), expected ProjectID:VolumeID", d.Id()) + } + projectID := idParts[0] + clusterID := idParts[1] + d.SetId(clusterID) + d.Set("project_id", projectID) + return []*schema.ResourceData{d}, nil + }, + }, + Schema: map[string]*schema.Schema{ + "project_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "ipip_mode": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + }, + "k8s_version": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "master_count": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + //Update node group default + "node_count": { + Type: schema.TypeInt, + Required: true, + }, + "master_flavor_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "node_flavor_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "etcd_volume_size": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "etcd_volume_type_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "boot_volume_size": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "boot_volume_type_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "docker_volume_size": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "docker_volume_type_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "network_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "calico_cidr": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "network_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "subnet_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "ssh_key_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "security_group": { + Type: schema.TypeList, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Optional: true, + }, + "min_node_count": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, + "max_node_count": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + }, + "enable_lb": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "auto_scaling": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "auto_healing": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "ingress_controller": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "auto_monitoring": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + //"node_group_list": { + // Type: schema.TypeList, + // Optional: true, + // Elem: map[string]*schema.Schema{ + // "name": { + // Type: schema.TypeString, + // ForceNew: true, + // }, + // "node_amount": { + // Type: schema.TypeInt, + // }, + // "flavor_id": { + // Type: schema.TypeString, + // ForceNew: true, + // }, + // }, + //}, + "k8s_network_type": { + Type: schema.TypeString, + Computed: true, + }, + "ssh_key_name": { + Type: schema.TypeString, + Computed: true, + }, + "node_flavor_name": { + Type: schema.TypeString, + Computed: true, + }, + "master_flavor_name": { + Type: schema.TypeString, + Computed: true, + }, + "end_point": { + Type: schema.TypeString, + Computed: true, + }, + "node_group_default_id": { + Type: schema.TypeString, + Computed: true, + }, + "config": { + Type: schema.TypeString, + Computed: true, + }, + "secgroup_default_master": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "rules": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "direction": { + Type: schema.TypeString, + Computed: true, + }, + "ethertype": { + Type: schema.TypeString, + Computed: true, + }, + "port_range_max": { + Type: schema.TypeInt, + Computed: true, + }, + "port_range_min": { + Type: schema.TypeInt, + Computed: true, + }, + "protocol": { + Type: schema.TypeString, + Computed: true, + }, + "remote_group_name": { + Type: schema.TypeString, + Computed: true, + }, + "remote_ip_prefix": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "sec_group_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "secgroup_default_minion": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "rules": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "direction": { + Type: schema.TypeString, + Computed: true, + }, + "ethertype": { + Type: schema.TypeString, + Computed: true, + }, + "port_range_max": { + Type: schema.TypeInt, + Computed: true, + }, + "port_range_min": { + Type: schema.TypeInt, + Computed: true, + }, + "protocol": { + Type: schema.TypeString, + Computed: true, + }, + "remote_group_name": { + Type: schema.TypeString, + Computed: true, + }, + "remote_ip_prefix": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "sec_group_name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +//func buildCreateNodeGroupRequests(d *schema.ResourceData) []vserver.NodeGroupRequestModel { +// nodeGroupList := d.Get("node_group_list").([]interface{}) +// NodeGroups := make([]vserver.NodeGroupRequestModel, len(nodeGroupList)) +// +// for _, nodeGroup := range nodeGroupList { +// nodeGroup := nodeGroup.(map[string]interface{}) +// var request vserver.NodeGroupRequestModel +// request.Name = nodeGroup["name"].(string) +// request.FlavorId = nodeGroup["flavor_id"].(string) +// request.NodeCount = nodeGroup["node_amount"].(int) +// NodeGroups = append(NodeGroups, request) +// } +// return NodeGroups +//} + +func resourceK8sCreate(d *schema.ResourceData, m interface{}) error { + log.Printf("Create K8s") + projectId := d.Get("project_id").(string) + cli := m.(*client.Client) + var secGroupIdList []string + + cluster := vserver.CreateClusterRequest{ + AutoHealingEnabled: d.Get("auto_healing").(bool), + AutoMonitoringEnabled: d.Get("auto_monitoring").(bool), + AutoScalingEnabled: d.Get("auto_scaling").(bool), + BootVolumeSize: int32(d.Get("boot_volume_size").(int)), + BootVolumeTypeId: d.Get("boot_volume_type_id").(string), + CalicoCidr: d.Get("calico_cidr").(string), + DockerVolumeSize: int32(d.Get("docker_volume_size").(int)), + DockerVolumeTypeId: d.Get("docker_volume_type_id").(string), + Description: d.Get("description").(string), + EnabledLb: d.Get("enable_lb").(bool), + EtcdVolumeSize: int32(d.Get("etcd_volume_size").(int)), + EtcdVolumeTypeId: d.Get("etcd_volume_type_id").(string), + IngressControllerEnabled: d.Get("ingress_controller").(bool), + IpipMode: d.Get("ipip_mode").(string), + K8sVersion: d.Get("k8s_version").(string), + MasterCount: int32(d.Get("master_count").(int)), + MasterFlavorId: d.Get("master_flavor_id").(string), + MaxNodeCount: int32(d.Get("max_node_count").(int)), + MinNodeCount: int32(d.Get("min_node_count").(int)), + Name: d.Get("name").(string), + NetworkId: d.Get("network_id").(string), + NetworkType: d.Get("network_type").(string), + NodeCount: int32(d.Get("node_count").(int)), + NodeFlavorId: d.Get("node_flavor_id").(string), + SecGroupIds: secGroupIdList, + SshKeyId: d.Get("ssh_key_id").(string), + SubnetId: d.Get("subnet_id").(string), + //NodeGroupRequestModelList: d.Get("node_group_list").([]vserver.NodeGroupRequestModel), + //NodeGroupRequestModelList: buildCreateNodeGroupRequests(d), + NodeGroupRequestModelList: []vserver.NodeGroupRequestModel{}, + } + + resp, httpResponse, err := cli.VserverClient.K8SClusterRestControllerApi.CreateClusterUsingPOST(context.TODO(), cluster, projectId) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errResponse := fmt.Errorf("request fail with errMsg: %s", responseBody) + return errResponse + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + + stateConf := &resource.StateChangeConf{ + Pending: k8sClusterCreating, + Target: k8sClusterCreated, + Refresh: resourceK8sClusterStateRefreshFunc(cli, resp.Data.Uuid, projectId), + Timeout: 180 * time.Minute, + Delay: 10 * time.Second, + MinTimeout: 1 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for create cluster (%s) %s", resp.Data.Uuid, err) + } + + d.SetId(resp.Data.Uuid) + + return resourceK8sRead(d, m) +} + +func resourceK8sRead(d *schema.ResourceData, m interface{}) error { + projectId := d.Get("project_id").(string) + clusterId := d.Id() + cli := m.(*client.Client) + resp, httpResponse, _ := cli.VserverClient.K8SClusterRestControllerApi.GetClusterUsingGET(context.TODO(), clusterId, projectId) + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + err := fmt.Errorf("request fail with errMsg: %s", responseBody) + return err + } + respSecGroup, httpResponseSecGroup, _ := cli.VserverClient.K8SClusterRestControllerApi.ListSecgroupDefaultUsingGET(context.TODO(), clusterId, projectId) + if CheckErrorResponse(httpResponseSecGroup) { + responseBody := GetResponseBody(httpResponseSecGroup) + err := fmt.Errorf("request fail with errMsg: %s", responseBody) + return err + } + + respConfig, httpResponseConfig, _ := cli.VserverClient.K8SClusterRestControllerApi.GetConfigUsingGET(context.TODO(), clusterId, projectId) + if CheckErrorResponse(httpResponseConfig) { + responseBody := GetResponseBody(httpResponseConfig) + err := fmt.Errorf("request fail with errMsg: %s", responseBody) + return err + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + + respSecGroupJSON, _ := json.Marshal(respSecGroup) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respSecGroupJSON)) + log.Printf("-------------------------------------\n") + + respConfigJSON, _ := json.Marshal(respConfig) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respConfigJSON)) + log.Printf("-------------------------------------\n") + + cluster := resp.Data + masterSecgroupDefault := respSecGroup[0].Master + minionSecgroupDefault := respSecGroup[0].Minion + config := respConfig.Configuration + if cluster.AutoHealingEnabled { + d.Set("auto_healing", cluster.AutoHealingEnabled) + } + + if cluster.AutoMonitoringEnabled { + d.Set("auto_monitoring", cluster.AutoMonitoringEnabled) + } + + if cluster.AutoScalingEnabled { + d.Set("auto_scaling", cluster.AutoScalingEnabled) + } + + if cluster.EnabledLb { + d.Set("enable_lb", cluster.EnabledLb) + } + + d.Set("boot_volume_size", cluster.BootVolumeSize) + d.Set("boot_volume_type_id", cluster.BootVolumeTypeId) + d.Set("calico_cidr", cluster.CalicoCidr) + d.Set("description", cluster.Description) + d.Set("docker_volume_size", cluster.DockerVolumeSize) + d.Set("docker_volume_type_id", cluster.DockerVolumeTypeId) + d.Set("end_point", cluster.Endpoint) + d.Set("etcd_volume_size", cluster.EtcdVolumeSize) + d.Set("etcd_volume_type_id", cluster.EtcdVolumeTypeId) + d.Set("id", cluster.ClusterId) + + if cluster.IngressControllerEnabled { + d.Set("ingress_controller", cluster.IngressControllerEnabled) + } + + d.Set("ipip_mode", "Always") + d.Set("k8s_network_type", cluster.K8sNetworkType) + d.Set("network_type", cluster.K8sNetworkTypeId) + d.Set("k8s_version_name", cluster.K8sVersion) + d.Set("k8s_version", cluster.K8sVersionId) + d.Set("master_count", cluster.MasterCount) + d.Set("master_flavor_name", cluster.MasterFlavorName) + d.Set("master_flavor_id", cluster.MasterFlavorId) + if cluster.AutoScalingEnabled { + d.Set("max_node_count", cluster.MaxNodeCount) + } + + if cluster.AutoScalingEnabled { + d.Set("min_node_count", cluster.MinNodeCount) + } + + d.Set("name", cluster.Name) + d.Set("network_id", cluster.NetworkId) + d.Set("node_count", cluster.NodeCount) + d.Set("node_flavor_name", cluster.NodeFlavorName) + d.Set("node_flavor_id", cluster.NodeFlavorId) + d.Set("node_group_default_id", cluster.NodegroupDefaultId) + d.Set("ssh_key_name", cluster.SshKeyName) + d.Set("ssh_key_id", cluster.SshKeyId) + d.Set("subnet_id", cluster.SubnetId) + d.Set("config", config) + d.Set("secgroup_default_master", flattenClusterSecGroupDefault(masterSecgroupDefault)) + d.Set("secgroup_default_minion", flattenClusterSecGroupDefault(minionSecgroupDefault)) + return nil +} + +func resourceK8sUpdate(d *schema.ResourceData, m interface{}) error { + if d.HasChange("node_count") { + nodeGroupDefaultId := d.Get("node_group_default_id").(string) + clusterId := d.Id() + return ResourceK8sScalingNodeGroup(d, m, nodeGroupDefaultId, clusterId) + } + + if d.HasChange("description") { + clusterId := d.Id() + return ResourceK8sUpdateDescription(d, m, clusterId) + } + + return resourceK8sRead(d, m) +} + +func resourceK8sDelete(d *schema.ResourceData, m interface{}) error { + projectId := d.Get("project_id").(string) + cli := m.(*client.Client) + resp, httpResponse, err := cli.VserverClient.K8SClusterRestControllerApi.DeleteClusterUsingDELETE(context.TODO(), d.Id(), projectId) + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errorResponse := fmt.Errorf("request fail with errMsh: %s", responseBody) + return errorResponse + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + stateConf := &resource.StateChangeConf{ + Pending: k8sClusterDeleting, + Target: k8sClusterDeleted, + Refresh: resourceK8sDeleteStateRefreshFunc(cli, d.Id(), projectId), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 1 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for delete cluster (%s) : %s", d.Id(), err) + } + d.SetId("") + return nil +} + +func ResourceK8sUpdateDescription(d *schema.ResourceData, m interface{}, clusterId string) error { + projectID := d.Get("project_id").(string) + cli := m.(*client.Client) + + _, n := d.GetChange("description") + updateClusterDescriptionRequest := vserver.UpdateClusterDescriptionRequest{ + ClusterId: clusterId, + Description: n.(string), + } + + resp, httpResponse, err := cli.VserverClient.K8SClusterRestControllerApi.UpdateClusterDescriptionUsingPut(context.TODO(), projectID, clusterId, updateClusterDescriptionRequest) + + if CheckErrorResponse(httpResponse) { + responseBody := GetResponseBody(httpResponse) + errResponse := fmt.Errorf("request fail with errMsg: %s", responseBody) + return errResponse + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + if err != nil { + return fmt.Errorf("error updating description for cluster (%s) %s", clusterId, err) + } + + d.SetId(clusterId) + return nil +} + +func resourceK8sClusterStateRefreshFunc(cli *client.Client, clusterId string, projectId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, httpResponse, _ := cli.VserverClient.K8SClusterRestControllerApi.GetClusterUsingGET(context.TODO(), clusterId, projectId) + + if httpResponse.StatusCode != http.StatusOK { + return nil, "", fmt.Errorf("error describing: %s", GetResponseBody(httpResponse)) + } + + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + cluster := resp.Data + return cluster, cluster.Status, nil + } +} + +func resourceK8sDeleteStateRefreshFunc(cli *client.Client, clusterId string, projectId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + resp, httpResponse, _ := cli.VserverClient.K8SClusterRestControllerApi.GetClusterUsingGET(context.TODO(), clusterId, projectId) + if httpResponse.StatusCode != http.StatusOK { + if httpResponse.StatusCode == http.StatusNotFound { + return vserver.ClusterDto{Status: "DELETED"}, "DELETED", nil + } else { + return nil, "", fmt.Errorf("error describing instance: %s", GetResponseBody(httpResponse)) + } + } + respJSON, _ := json.Marshal(resp) + log.Printf("-------------------------------------\n") + log.Printf("%s\n", string(respJSON)) + log.Printf("-------------------------------------\n") + cluster := resp.Data + return cluster, cluster.Status, nil + } +} + +func flattenClusterSecGroupDefault(secgroupDefaults *vserver.SecGroupDefault) []map[string]interface{} { + if secgroupDefaults == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{ + "rules": flattenRules(secgroupDefaults.Rules), + "sec_group_name": secgroupDefaults.SecgroupName, + } + fmt.Printf("[DEBUG]: %s", m) + + return []map[string]interface{}{m} +} + +func flattenRules(rules []vserver.SecGroupRuleDefault) []map[string]interface{} { + if len(rules) == 0 { + return []map[string]interface{}{} + } + + l := make([]map[string]interface{}, 0, len(rules)) + + for _, rule := range rules { + m := map[string]interface{}{ + "direction": rule.Direction, + "ethertype": rule.Ethertype, + "port_range_max": int64(rule.PortRangeMax), + "port_range_min": int64(rule.PortRangeMin), + "protocol": rule.Protocol, + "remote_group_name": rule.RemoteGroupName, + "remote_ip_prefix": rule.RemoteIpPrefix, + } + + l = append(l, m) + } + + return l +} diff --git a/resource/vserver/resource_secgroup_rule.go b/resource/vserver/resource_secgroup_rule.go index 19d972b..8e09bc4 100644 --- a/resource/vserver/resource_secgroup_rule.go +++ b/resource/vserver/resource_secgroup_rule.go @@ -11,6 +11,7 @@ import ( "log" "net/http" "strings" + "time" ) func ResourceSecgroupRule() *schema.Resource { @@ -130,8 +131,6 @@ func resourceSecgroupRuleRead(d *schema.ResourceData, m interface{}) error { resp, httpResponse, _ := cli.VserverClient.SecgroupRuleRestControllerApi.GetSecgroupRuleUsingGET1(context.TODO(), projectID, SecgroupRuleID, SecurityGroupId) if CheckErrorResponse(httpResponse) { responseBody := GetResponseBody(httpResponse) - //api get sec group rule 403 - log.Printf("tunm4new", responseBody, httpResponse.StatusCode) errorResponse := fmt.Errorf("request fail with errMsg : %s", responseBody) return errorResponse } @@ -155,12 +154,19 @@ func resourceSecgroupRuleDelete(d *schema.ResourceData, m interface{}) error { SecgroupRuleId := d.Id() SecurityGroupId := d.Get("security_group_id").(string) cli := m.(*client.Client) - httpResponse, _ := cli.VserverClient.SecgroupRuleRestControllerApi.DeleteSecgroupRuleUsingDELETE1(context.TODO(), projectID, SecgroupRuleId, SecurityGroupId) - if CheckErrorResponse(httpResponse) { - responseBody := GetResponseBody(httpResponse) - errorResponse := fmt.Errorf("request fail with errMsg : %s", responseBody) - return errorResponse - } - d.SetId("") - return nil + cli.VserverClient.SecgroupRuleRestControllerApi.DeleteSecgroupRuleUsingDELETE1(context.TODO(), projectID, SecgroupRuleId, SecurityGroupId) + return resource.Retry(3*time.Minute, func() *resource.RetryError { + _, httpResponse, _ := cli.VserverClient.SecgroupRuleRestControllerApi.GetSecgroupRuleUsingGET1(context.TODO(), projectID, SecgroupRuleId, SecurityGroupId) + if httpResponse.StatusCode != http.StatusNotFound { + d.SetId("") + return nil + } + httpResponse, _ = cli.VserverClient.SecgroupRuleRestControllerApi.DeleteSecgroupRuleUsingDELETE1(context.TODO(), projectID, SecgroupRuleId, SecurityGroupId) + if CheckErrorResponse(httpResponse) { + return resource.RetryableError(fmt.Errorf("Error when refreshing security group rule state: %s", GetResponseBody(httpResponse))) + } else { + d.SetId("") + return nil + } + }) } diff --git a/resource/vserver/resource_server.go b/resource/vserver/resource_server.go index a100567..7bdc47e 100644 --- a/resource/vserver/resource_server.go +++ b/resource/vserver/resource_server.go @@ -320,6 +320,18 @@ func resourceServerRead(d *schema.ResourceData, m interface{}) error { externalInterfaces = append(externalInterfaces, externalInterfaceMap) } d.Set("external_interfaces", externalInterfaces) + securityGroupInterfaceRequest := d.Get("security_group").([]interface{}) + var securityGroupRequest []string + for _, s := range securityGroupInterfaceRequest { + securityGroupRequest = append(securityGroupRequest, s.(string)) + } + var securityGroupServer []string + for _, secGroup := range server.SecGroups { + securityGroupServer = append(securityGroupServer, secGroup.Uuid) + } + if !CheckListStringEqual(securityGroupRequest, securityGroupServer) { + d.Set("security_group", securityGroupServer) + } return nil } diff --git a/resource/vserver/util.go b/resource/vserver/util.go index d721036..952337a 100644 --- a/resource/vserver/util.go +++ b/resource/vserver/util.go @@ -21,3 +21,24 @@ func GetResponseBody(httpResponse *http.Response) string { } return fmt.Sprint("Status Code: ", httpResponse.StatusCode, ", ", responseMessage) } + +func CheckContainString(list []string, findElement string) bool { + for _, element := range list { + if element == findElement { + return true + } + } + return false +} + +func CheckListStringEqual(firstList []string, secondList []string) bool { + if len(firstList) == len(secondList) { + for _, element := range firstList { + if !CheckContainString(secondList, element) { + return false + } + } + return true + } + return false +} diff --git a/variable.tf b/variable.tf index b6732d5..a74a710 100644 --- a/variable.tf +++ b/variable.tf @@ -4,19 +4,21 @@ variable "client_id" { } variable "client_secret" { type = string - default = "c945f0d3-b1bf-4343-920c-89f6c36f23a8" + default = "29ee24e8-c1b8-4b18-addb-f0c65689a2a8" } variable "project_id" { type = string - default = "pro-11dd35af-8349-4441-b34e-0a969f6aeb1a" + default = "pro-26151c78-0470-4b4c-88a1-6ec41ef29492" } + variable "image_id" { type = string default = "img-2aba43f5-281a-4978-81ee-824e68cb0fb4" } + variable "flavor_id" { type = string - default = "flav-0bd3d055-7d41-4999-8582-382d370bcf57" + default = "flav-b9b44c1b-5823-4069-a0a2-ffd5acbeccf7" } variable "volume_type_name" { @@ -33,22 +35,23 @@ variable "data_disk_size" { } variable "network_id" { type = string - default = "net-44c1098c-2271-47bc-bfba-9b504ee167b2" + default = "net-910ea9c5-cbb5-45af-860e-25d4b6550d53" } variable "subnet_id" { type = string - default = "sub-1e55d876-cdf8-489f-9000-7ffee722d5aa" + default = "sub-0c71ba69-5b55-44db-95ce-46ddab94054c" } variable "ssh_key_id" { type = string - default = "ssh-614594fa-e31a-4a36-ad9c-fc18db327e43" -} -variable "security_group_id_list" { - type = list(string) - default = ["secg-dc43929e-4c24-4044-be9b-2d57d4435a55"] + default = "ssh-d07ddb73-19e6-43d0-8d13-2f291a793443" } +#variable "security_group_id_list" { +# type = list(string) +# default = ["secg-5c1e8e96-d106-4a91-8047-a76d1ae5ba9b", "secg-28aee6f4-a4f7-4a8c-a3f5-4f739ea14dcb"] +#} variable "server_count" { type = number default = 1 } +