Skip to content

Commit

Permalink
models/vm_instance: fix incompatibility with Orka3
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed Mar 13, 2024
1 parent 7989c86 commit d944fdf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Layout/LineLength:
Max: 118

Metrics/AbcSize:
Max: 50
Max: 60

Metrics/BlockLength:
Max: 50
Expand Down
10 changes: 7 additions & 3 deletions lib/orka_api_client/models/vm_instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,11 @@ def deserialize(hash)
@configuration_template = hash["configuration_template"]
@status = hash["vm_status"]
@io_boost = hash["io_boost"]
@net_boost = hash["net_boost"]
@net_boost = if hash["net_boost"] == "N/A"
true # arm64
else
hash["net_boost"]
end
@use_saved_state = hash["use_saved_state"]
@reserved_ports = hash["reserved_ports"].map do |mapping|
ProtocolPortMapping.new(
Expand All @@ -406,12 +410,12 @@ def deserialize(hash)
)
end
@creation_time = DateTime.iso8601(hash["creation_timestamp"])
@tag = if hash["tag"].empty?
@tag = if hash["tag"].nil? || hash["tag"].empty?
nil
else
hash["tag"]
end
@tag_required = hash["tag_required"]
@tag_required = !!hash["tag_required"]
# Replicas count also passed. Should always be 1 since we expand those.
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/orka_api_client/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module OrkaAPI
class Client
# The version of this gem.
VERSION = "0.2.0"
VERSION = "0.2.1"

# The Orka API version this gem supports. Support for other versions is not guaranteed, in particular older
# versions.
Expand Down

0 comments on commit d944fdf

Please sign in to comment.