Class: VagrantPlugins::Proxmox::Action::UploadIsoFile

Inherits:
ProxmoxAction
  • Object
show all
Defined in:
lib/vagrant-proxmox/action/upload_iso_file.rb

Overview

This action uploads a iso file into the local storage a given node

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ UploadIsoFile

Returns a new instance of UploadIsoFile.



8
9
10
11
# File 'lib/vagrant-proxmox/action/upload_iso_file.rb', line 8

def initialize app, env
	@app = app
	@logger = Log4r::Logger.new 'vagrant_proxmox::action::iso_file_upload'
end

Instance Method Details

#call(env) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/vagrant-proxmox/action/upload_iso_file.rb', line 13

def call env
	env[:result] = :ok
	config = env[:machine].provider_config
	if config.qemu_iso_file
		env[:result] = upload_file env, config.qemu_iso_file, config.replace_qemu_iso_file
	end
	next_action env
end