Class: VagrantPlugins::ProviderZone::Action::Create
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderZone::Action::Create
- Defined in:
- lib/vagrant-zones/action/create.rb
Overview
This will create the zone
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ Create
constructor
A new instance of Create.
Constructor Details
#initialize(app, _env) ⇒ Create
Returns a new instance of Create.
12 13 14 15 |
# File 'lib/vagrant-zones/action/create.rb', line 12 def initialize(app, _env) @logger = Log4r::Logger.new('vagrant_zones::action::import') @app = app end |
Instance Method Details
#call(env) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/vagrant-zones/action/create.rb', line 17 def call(env) @machine = env[:machine] @driver = @machine.provider.driver @machine.id = SecureRandom.uuid @driver.create_dataset(env[:ui]) @driver.zonecfg(env[:ui]) @driver.install(env[:ui]) @app.call(env) end |