Class: VagrantPlugins::AVF::DriverStartRequest
- Inherits:
-
Object
- Object
- VagrantPlugins::AVF::DriverStartRequest
- Defined in:
- lib/vagrant_provider_avf/driver_start_request.rb
Constant Summary collapse
- DEFAULT_BOOT_COMMAND_LINE =
"console=hvc0 root=LABEL=avf-root rw rootwait rootfstype=ext4".freeze
Instance Method Summary collapse
-
#initialize(machine_id:, machine_requirements:, boot_config:, disk_path:, mac_address:, shared_directories:, seed_image_path:, efi_variable_store_path:, paths:) ⇒ DriverStartRequest
constructor
A new instance of DriverStartRequest.
- #to_h ⇒ Object
Constructor Details
#initialize(machine_id:, machine_requirements:, boot_config:, disk_path:, mac_address:, shared_directories:, seed_image_path:, efi_variable_store_path:, paths:) ⇒ DriverStartRequest
Returns a new instance of DriverStartRequest.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/vagrant_provider_avf/driver_start_request.rb', line 6 def initialize(machine_id:, machine_requirements:, boot_config:, disk_path:, mac_address:, shared_directories:, seed_image_path:, efi_variable_store_path:, paths:) @machine_id = machine_id @machine_requirements = machine_requirements @boot_config = boot_config @disk_path = disk_path @mac_address = mac_address @shared_directories = shared_directories @seed_image_path = seed_image_path @efi_variable_store_path = efi_variable_store_path @paths = paths end |
Instance Method Details
#to_h ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/vagrant_provider_avf/driver_start_request.rb', line 18 def to_h { "guest" => @boot_config.guest.to_s, "cpuCount" => @machine_requirements.cpus, "memorySizeBytes" => @machine_requirements.memory_mb * 1024 * 1024, "kernelPath" => @boot_config.kernel_path, "initrdPath" => @boot_config.initrd_path, "diskImagePath" => @disk_path.to_s, "networkMacAddress" => @mac_address, "sharedDirectoryTag" => shared_directory_tag, "sharedDirectories" => @shared_directories.map(&:to_h), "seedImagePath" => @seed_image_path&.to_s, "seedImageReadOnly" => seed_image_read_only, "efiVariableStorePath" => @efi_variable_store_path&.to_s, "consoleLogPath" => @paths.console_log_path.to_s, "startedPath" => @paths.started_path.to_s, "errorPath" => @paths.error_path.to_s, "commandLine" => command_line } end |