Sha256: c36dfacf1f2af750e3152a2fa0c84ceded32eb291171bd7747e0ef50d0427773

Contents?: true

Size: 618 Bytes

Versions: 1

Compression:

Stored size: 618 Bytes

Contents

require 'log4r'

require 'vagrant-openstack-illuin-provider/action/abstract_action'

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

        def execute(env)
          if env[:machine].id
            env[:ui].info(I18n.t('vagrant_openstack.starting_server'))
            env[:openstack_client].nova.start_server(env, env[:machine].id)
          end
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-openstack-illuin-provider-0.12.0 lib/vagrant-openstack-illuin-provider/action/start_server.rb