Sha256: b9cefb30af7569438613dec1097b76f0484b2b63ecb89861dc7339719db7fa9d

Contents?: true

Size: 584 Bytes

Versions: 3

Compression:

Stored size: 584 Bytes

Contents

module VagrantPlugins
  module VCloudAir
    module Action
      class Resume
        def initialize(app, env)
          @app = app
          @logger = Log4r::Logger.new('vagrant_vcloudair::action::resume')
        end

        def call(env)
          cfg = env[:machine].provider_config
          cnx = cfg.vcloudair_cnx.driver

          vm_id = env[:machine].id

          env[:ui].info(I18n.t('vagrant_vcloudair.vm.poweron_vm'))
          task_id = cnx.poweron_vm(vm_id)
          cnx.wait_task_completion(task_id)

          @app.call env
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-vcloudair-0.5.3 lib/vagrant-vcloudair/action/resume.rb
vagrant-vcloudair-0.5.2 lib/vagrant-vcloudair/action/resume.rb
vagrant-vcloudair-0.5.1 lib/vagrant-vcloudair/action/resume.rb