Class: VagrantPlugins::Utm::Action::SetId
- Inherits:
-
Object
- Object
- VagrantPlugins::Utm::Action::SetId
- Defined in:
- lib/vagrant_utm/action/set_id.rb
Overview
This action sets the machine id to the UUID of the VM in UTM.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ SetId
constructor
A new instance of SetId.
Constructor Details
#initialize(app, _env) ⇒ SetId
Returns a new instance of SetId.
8 9 10 |
# File 'lib/vagrant_utm/action/set_id.rb', line 8 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
12 13 14 15 16 |
# File 'lib/vagrant_utm/action/set_id.rb', line 12 def call(env) env[:machine].id = env[:machine].provider.driver.last_uuid env[:ui].info I18n.t("vagrant_utm.messages.setting_id", id: env[:machine].id) @app.call(env) end |