lib/ionoscloud/api/kubernetes_api.rb in ionoscloud-5.1.2 vs lib/ionoscloud/api/kubernetes_api.rb in ionoscloud-6.0.0.beta.1

- old
+ new

@@ -1,14 +1,14 @@ =begin #CLOUD API #An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. -The version of the OpenAPI document: 5.0 +The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.2.1-SNAPSHOT +OpenAPI Generator version: 5.0.1-SNAPSHOT =end require 'cgi' @@ -252,30 +252,30 @@ end return data, status_code, headers end # Retrieve Kubernetes Configuration File - # You can retrieve kubernetes configuration file for the kubernetes cluster. + # You can retrieve kubernetes configuration file in YAML or JSON format for the kubernetes cluster. You can send the Accept header accordingly. Default Accept header is application/yaml # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster # @param [Hash] opts the optional parameters # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0) # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed - # @return [KubernetesConfig] + # @return [String] def k8s_kubeconfig_get(k8s_cluster_id, opts = {}) data, _status_code, _headers = k8s_kubeconfig_get_with_http_info(k8s_cluster_id, opts) data end # Retrieve Kubernetes Configuration File - # You can retrieve kubernetes configuration file for the kubernetes cluster. + # You can retrieve kubernetes configuration file in YAML or JSON format for the kubernetes cluster. You can send the Accept header accordingly. Default Accept header is application/yaml # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster # @param [Hash] opts the optional parameters # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed - # @return [Array<(KubernetesConfig, Integer, Hash)>] KubernetesConfig data, response status code and response headers + # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers def k8s_kubeconfig_get_with_http_info(k8s_cluster_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_kubeconfig_get ...' end # verify the required parameter 'k8s_cluster_id' is set @@ -299,21 +299,21 @@ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['application/yaml', 'application/x-yaml', 'application/json']) header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'KubernetesConfig' + return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] new_options = opts.merge( @@ -948,11 +948,11 @@ end # Create a Kubernetes Node Pool # This will create a new Kubernetes Node Pool inside a Kubernetes Cluster. # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster - # @param kubernetes_node_pool [KubernetesNodePoolForPost] Details of the Kubernetes Node Pool + # @param kubernetes_node_pool [KubernetesNodePool] Details of the Kubernetes Node Pool # @param [Hash] opts the optional parameters # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0) # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed # @return [KubernetesNodePool] @@ -962,11 +962,11 @@ end # Create a Kubernetes Node Pool # This will create a new Kubernetes Node Pool inside a Kubernetes Cluster. # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster - # @param kubernetes_node_pool [KubernetesNodePoolForPost] Details of the Kubernetes Node Pool + # @param kubernetes_node_pool [KubernetesNodePool] Details of the Kubernetes Node Pool # @param [Hash] opts the optional parameters # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed # @return [Array<(KubernetesNodePool, Integer, Hash)>] KubernetesNodePool data, response status code and response headers @@ -1037,31 +1037,31 @@ # Modify Kubernetes Node Pool # This will modify the Kubernetes Node Pool. # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool - # @param kubernetes_node_pool [KubernetesNodePoolForPut] Details of the Kubernetes Node Pool + # @param kubernetes_node_pool [KubernetesNodePool] Details of the Kubernetes Node Pool # @param [Hash] opts the optional parameters # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0) # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed - # @return [KubernetesNodePool] + # @return [KubernetesNodePoolForPut] def k8s_nodepools_put(k8s_cluster_id, nodepool_id, kubernetes_node_pool, opts = {}) data, _status_code, _headers = k8s_nodepools_put_with_http_info(k8s_cluster_id, nodepool_id, kubernetes_node_pool, opts) data end # Modify Kubernetes Node Pool # This will modify the Kubernetes Node Pool. # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool - # @param kubernetes_node_pool [KubernetesNodePoolForPut] Details of the Kubernetes Node Pool + # @param kubernetes_node_pool [KubernetesNodePool] Details of the Kubernetes Node Pool # @param [Hash] opts the optional parameters # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed - # @return [Array<(KubernetesNodePool, Integer, Hash)>] KubernetesNodePool data, response status code and response headers + # @return [Array<(KubernetesNodePoolForPut, Integer, Hash)>] KubernetesNodePoolForPut data, response status code and response headers def k8s_nodepools_put_with_http_info(k8s_cluster_id, nodepool_id, kubernetes_node_pool, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_put ...' end # verify the required parameter 'k8s_cluster_id' is set @@ -1105,11 +1105,11 @@ # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(kubernetes_node_pool) # return_type - return_type = opts[:debug_return_type] || 'KubernetesNodePool' + return_type = opts[:debug_return_type] || 'KubernetesNodePoolForPut' # auth_names auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] new_options = opts.merge( @@ -1212,11 +1212,11 @@ end # Modify Kubernetes Cluster # This will modify the Kubernetes Cluster. # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster - # @param kubernetes_cluster [KubernetesClusterForPut] Details of the Kubernetes Cluster + # @param kubernetes_cluster [KubernetesClusterForPut] Details of of the Kubernetes Cluster # @param [Hash] opts the optional parameters # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on (default to 0) # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed # @return [KubernetesCluster] @@ -1226,11 +1226,11 @@ end # Modify Kubernetes Cluster # This will modify the Kubernetes Cluster. # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster - # @param kubernetes_cluster [KubernetesClusterForPut] Details of the Kubernetes Cluster + # @param kubernetes_cluster [KubernetesClusterForPut] Details of of the Kubernetes Cluster # @param [Hash] opts the optional parameters # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;... and so on # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed # @return [Array<(KubernetesCluster, Integer, Hash)>] KubernetesCluster data, response status code and response headers @@ -1293,72 +1293,9 @@ ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: KubernetesApi#k8s_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Retrieves a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster. - # You can retrieve a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster. - # @param cluster_version [String] - # @param [Hash] opts the optional parameters - # @return [Array<String>] - def k8s_versions_compatibilities_get(cluster_version, opts = {}) - data, _status_code, _headers = k8s_versions_compatibilities_get_with_http_info(cluster_version, opts) - data - end - - # Retrieves a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster. - # You can retrieve a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster. - # @param cluster_version [String] - # @param [Hash] opts the optional parameters - # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers - def k8s_versions_compatibilities_get_with_http_info(cluster_version, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_versions_compatibilities_get ...' - end - # verify the required parameter 'cluster_version' is set - if @api_client.config.client_side_validation && cluster_version.nil? - fail ArgumentError, "Missing the required parameter 'cluster_version' when calling KubernetesApi.k8s_versions_compatibilities_get" - end - # resource path - local_var_path = '/k8s/versions/{clusterVersion}/compatibilities'.sub('{' + 'clusterVersion' + '}', CGI.escape(cluster_version.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'Array<String>' - - # auth_names - auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication'] - - new_options = opts.merge( - :operation => :"KubernetesApi.k8s_versions_compatibilities_get", - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: KubernetesApi#k8s_versions_compatibilities_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve the current default kubernetes version for clusters and nodepools.