lib/ionoscloud/api_client.rb in ionoscloud-6.0.0.beta.3 vs lib/ionoscloud/api_client.rb in ionoscloud-6.0.0.beta.4
- 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.
+#IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on.
-The version of the OpenAPI document: 6.0-SDK.1
+The version of the OpenAPI document: 6.0-SDK.3
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.0.1-SNAPSHOT
+OpenAPI Generator version: 5.2.1-SNAPSHOT
=end
require 'date'
require 'json'
@@ -36,11 +36,11 @@
# Initializes the ApiClient
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
def initialize(config = Configuration.default)
@config = config
- @user_agent = "ionos-cloud-sdk-ruby/v6"
+ @user_agent = "ionos-cloud-sdk-ruby/6.0.0.beta.4"
@default_headers = {
'Content-Type' => 'application/json',
'User-Agent' => @user_agent
}
end
@@ -52,10 +52,11 @@
# Call an API with given options.
#
# @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
# the data deserialized from response body (could be nil), response status code and response headers.
def call_api(http_method, path, opts = {})
+
retry_count = 0
request = build_request(http_method, path, opts)
while true
retry_count += 1
@@ -436,11 +437,11 @@
# @param [Integer] scaleup Double polling interval every scaleup steps, which will be doubled.
def wait_for_completion(request_id, timeout = 3600, initial_wait = 5, scaleup = 10)
if request_id.nil?
return nil
end
-
+
wait_period = initial_wait
next_increase = Time.now.to_i + wait_period * scaleup
unless timeout.nil?
timeout = Time.now.to_i + timeout
end
@@ -482,11 +483,11 @@
# @param [Integer] scaleup Double polling interval every scaleup steps, which will be doubled.
def wait_for(timeout = 3600, initial_wait = 5, scaleup = 10, &_block)
if _block.nil?
return nil
end
-
+
wait_period = initial_wait
next_increase = Time.now.to_i + wait_period * scaleup
unless timeout.nil?
timeout = Time.now.to_i + timeout
end
@@ -496,10 +497,10 @@
break
end
current_time = Time.now.to_i
if timeout && current_time > timeout
- raise Ionoscloud::ApiError.new(message: "Timed out waiting for request #{request_id}.")
+ raise Ionoscloud::ApiError.new(message: "Timed out.")
end
if current_time > next_increase
wait_period *= 2
next_increase = Time.now.to_i + wait_period * scaleup