class VagrantPlugins::ProviderLibvirt::Action::SnapshotRestore

Public Class Methods

new(app, env) click to toggle source
# File lib/vagrant-libvirt/action/snapshot_restore.rb, line 6
def initialize(app, env)
  @app = app
end

Public Instance Methods

call(env) click to toggle source
# File lib/vagrant-libvirt/action/snapshot_restore.rb, line 10
def call(env)
  env[:ui].info(I18n.t(
    "vagrant.actions.vm.snapshot.restoring",
    name: env[:snapshot_name]))
  env[:machine].provider.driver.restore_snapshot(env[:machine], env[:snapshot_name])

  @app.call(env)
end