Class: VagrantPlugins::OpenNebulaProvider::Action::Create
- Inherits:
-
Object
- Object
- VagrantPlugins::OpenNebulaProvider::Action::Create
- Defined in:
- lib/opennebula-provider/action/create.rb
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.
5 6 7 8 |
# File 'lib/opennebula-provider/action/create.rb', line 5 def initialize(app, env) @app = app @logger = Log4r::Logger.new('vagrant::provider::opennebula::create') end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/opennebula-provider/action/create.rb', line 10 def call(env) @logger.info I18n.t('opennebula_provider.info.creating') driver = env[:machine].provider.driver env[:machine].id = driver.create @app.call(env) end |