Class: VagrantPlugins::ProviderZone::Action::Create

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-zone/action/create.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ Create

Returns a new instance of Create.



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

def initialize(app, env)
	@logger = Log4r::Logger.new("vagrant_zone::action::import")
	@app = app
end

Instance Method Details

#call(env) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/vagrant-zone/action/create.rb', line 14

def call(env)
	@machine = env[:machine]
	@driver  = @machine.provider.driver

	@machine.id = SecureRandom.uuid
	@driver.create_dataset(@machine, env[:ui])
	@driver.zonecfg(@machine, env[:ui])
	@driver.install(@machine, env[:ui])
	@app.call(env)
end