Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
.gitignore
.gitlab-ci.yml
.openapi-generator-ignore
.rspec
.rubocop.yml
.travis.yml
Gemfile
README.md
Rakefile
docs/AddDisk202Response.md
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.9.0
7.16.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g

- API version: 4.0.2
- Package version: 1.0.0
- Generator version: 7.9.0
- Generator version: 7.16.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen

## Installation
Expand Down
2 changes: 1 addition & 1 deletion lib/nutanix_clustermgmt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand Down
2 changes: 1 addition & 1 deletion lib/nutanix_clustermgmt/api/bmc_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand Down
2 changes: 1 addition & 1 deletion lib/nutanix_clustermgmt/api/cluster_profiles_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand Down
2 changes: 1 addition & 1 deletion lib/nutanix_clustermgmt/api/clusters_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand Down
2 changes: 1 addition & 1 deletion lib/nutanix_clustermgmt/api/disks_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand Down
2 changes: 1 addition & 1 deletion lib/nutanix_clustermgmt/api/pcie_devices_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand Down
2 changes: 1 addition & 1 deletion lib/nutanix_clustermgmt/api/storage_containers_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand Down
2 changes: 1 addition & 1 deletion lib/nutanix_clustermgmt/api/vcenter_extensions_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand Down
17 changes: 8 additions & 9 deletions lib/nutanix_clustermgmt/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand Down Expand Up @@ -49,7 +49,8 @@ def self.default
# the data deserialized from response body (may be a Tempfile or nil), response status code and response headers.
def call_api(http_method, path, opts = {})
request = build_request(http_method, path, opts)
tempfile = download_file(request) if opts[:return_type] == 'File'
tempfile = nil
(download_file(request) { tempfile = _1 }) if opts[:return_type] == 'File'
response = request.run

if @config.debugging
Expand Down Expand Up @@ -188,19 +189,17 @@ def download_file(request)
chunk.force_encoding(encoding)
tempfile.write(chunk)
end
# run the request to ensure the tempfile is created successfully before returning it
request.run
if tempfile
request.on_complete do
if !tempfile
fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
end
tempfile.close
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
"explicitly with `tempfile.delete`"
else
fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
yield tempfile if block_given?
end

tempfile
end

# Check if the given MIME is a JSON MIME.
Expand Down
2 changes: 1 addition & 1 deletion lib/nutanix_clustermgmt/api_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand Down
2 changes: 1 addition & 1 deletion lib/nutanix_clustermgmt/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand Down
14 changes: 10 additions & 4 deletions lib/nutanix_clustermgmt/models/add_disk202_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand All @@ -28,9 +28,14 @@ def self.attribute_map
}
end

# Returns attribute mapping this model knows about
def self.acceptable_attribute_map
attribute_map
end

# Returns all the JSON keys this model knows about
def self.acceptable_attributes
attribute_map.values
acceptable_attribute_map.values
end

# Attribute type mapping.
Expand All @@ -55,9 +60,10 @@ def initialize(attributes = {})
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::AddDisk202Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
if (!acceptable_attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::AddDisk202Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down
14 changes: 10 additions & 4 deletions lib/nutanix_clustermgmt/models/add_disk4_xx_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand All @@ -28,9 +28,14 @@ def self.attribute_map
}
end

# Returns attribute mapping this model knows about
def self.acceptable_attribute_map
attribute_map
end

# Returns all the JSON keys this model knows about
def self.acceptable_attributes
attribute_map.values
acceptable_attribute_map.values
end

# Attribute type mapping.
Expand All @@ -55,9 +60,10 @@ def initialize(attributes = {})
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::AddDisk4XXResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
if (!acceptable_attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::AddDisk4XXResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down
14 changes: 10 additions & 4 deletions lib/nutanix_clustermgmt/models/add_snmp_transport202_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand All @@ -28,9 +28,14 @@ def self.attribute_map
}
end

# Returns attribute mapping this model knows about
def self.acceptable_attribute_map
attribute_map
end

# Returns all the JSON keys this model knows about
def self.acceptable_attributes
attribute_map.values
acceptable_attribute_map.values
end

# Attribute type mapping.
Expand All @@ -55,9 +60,10 @@ def initialize(attributes = {})
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::AddSnmpTransport202Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
if (!acceptable_attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::AddSnmpTransport202Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down
14 changes: 10 additions & 4 deletions lib/nutanix_clustermgmt/models/add_snmp_transport4_xx_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand All @@ -28,9 +28,14 @@ def self.attribute_map
}
end

# Returns attribute mapping this model knows about
def self.acceptable_attribute_map
attribute_map
end

# Returns all the JSON keys this model knows about
def self.acceptable_attributes
attribute_map.values
acceptable_attribute_map.values
end

# Attribute type mapping.
Expand All @@ -55,9 +60,10 @@ def initialize(attributes = {})
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::AddSnmpTransport4XXResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
if (!acceptable_attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::AddSnmpTransport4XXResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand All @@ -28,9 +28,14 @@ def self.attribute_map
}
end

# Returns attribute mapping this model knows about
def self.acceptable_attribute_map
attribute_map
end

# Returns all the JSON keys this model knows about
def self.acceptable_attributes
attribute_map.values
acceptable_attribute_map.values
end

# Attribute type mapping.
Expand All @@ -55,9 +60,10 @@ def initialize(attributes = {})
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::ApplyClusterProfile202Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
if (!acceptable_attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::ApplyClusterProfile202Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The version of the OpenAPI document: 4.0.2

Generated by: https://openapi-generator.tech
Generator version: 7.9.0
Generator version: 7.16.0

=end

Expand All @@ -28,9 +28,14 @@ def self.attribute_map
}
end

# Returns attribute mapping this model knows about
def self.acceptable_attribute_map
attribute_map
end

# Returns all the JSON keys this model knows about
def self.acceptable_attributes
attribute_map.values
acceptable_attribute_map.values
end

# Attribute type mapping.
Expand All @@ -55,9 +60,10 @@ def initialize(attributes = {})
end

# check to see if the attribute exists and convert string to symbol for hash key
acceptable_attribute_map = self.class.acceptable_attribute_map
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::ApplyClusterProfile4XXResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
if (!acceptable_attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::ApplyClusterProfile4XXResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
end
h[k.to_sym] = v
}
Expand Down
Loading