Class: VagrantPlugins::Proxmox::Action::SelectNode

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

Overview

This action reads the state of a Proxmox virtual machine and stores it in env.

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ SelectNode

Returns a new instance of SelectNode.



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

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

Instance Method Details

#call(env) ⇒ Object



14
15
16
17
# File 'lib/vagrant-proxmox/action/select_node.rb', line 14

def call env
	env[:proxmox_selected_node] = env[:proxmox_nodes].sample
	next_action env
end