Sha256: bf510d6b2f13ebd8484371f5c2d46f9dcdf296b4693810f76e177efc1071c454

Contents?: true

Size: 580 Bytes

Versions: 9

Compression:

Stored size: 580 Bytes

Contents

module VagrantPlugins
  module Openstack
    module Action
      class Resume
        def initialize(app, _env)
          @app = app
          @logger = Log4r::Logger.new('vagrant_openstack::action::resume_server')
        end

        def call(env)
          if env[:machine].id
            @logger.info "Resuming suspended VM #{env[:machine].id}..."
            env[:ui].info I18n.t('vagrant.actions.vm.resume.resuming')
            env[:openstack_client].nova.resume_server(env, env[:machine].id)
          end

          @app.call(env)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
vagrant-openstack-provider-0.5.2 lib/vagrant-openstack-provider/action/resume.rb
vagrant-openstack-provider-0.5.1 lib/vagrant-openstack-provider/action/resume.rb
vagrant-openstack-provider-0.5.0 lib/vagrant-openstack-provider/action/resume.rb
vagrant-openstack-provider-0.4.1 lib/vagrant-openstack-provider/action/resume.rb
vagrant-openstack-provider-0.4.0 lib/vagrant-openstack-provider/action/resume.rb
vagrant-openstack-provider-0.3.4.pre lib/vagrant-openstack-provider/action/resume.rb
vagrant-openstack-provider-0.3.3 lib/vagrant-openstack-provider/action/resume.rb
vagrant-openstack-provider-0.3.2 lib/vagrant-openstack-provider/action/resume.rb
vagrant-openstack-provider-0.3.0 lib/vagrant-openstack-provider/action/resume.rb