Skip to content

Commit

Permalink
Add pluggable_memory_gb to QemuHCKDevice
Browse files Browse the repository at this point in the history
Signed-off-by: Kostiantyn Kostiuk <konstantin@daynix.com>
  • Loading branch information
kostyanf14 committed Oct 9, 2024
1 parent 6ce7c22 commit b8faa05
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/models/qemuhck_device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class QemuHCKDevice < T::Struct
const :pre_start_commands, T::Array[String], default: []
const :post_stop_commands, T::Array[String], default: []
const :machine_options, T::Array[String], default: []
const :pluggable_memory_gb, Integer, default: 0
end
end
end
7 changes: 7 additions & 0 deletions lib/setupmanagers/qemuhck/qemu_machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ def initialize(options)
@devices_list.flatten!
@devices_list.compact!
@device_infos = load_devices
process_device_options
end

def process_device_options
@device_infos.each do |device_info|
@pluggable_memory_gb += device_info.pluggable_memory_gb
end
end

def define_local_variables
Expand Down

0 comments on commit b8faa05

Please sign in to comment.