Sha256: b1ffcaa4763822e68d9e589b7cedd1766389ab4ae9b1b37bdde785b3f33199d3

Contents?: true

Size: 431 Bytes

Versions: 1

Compression:

Stored size: 431 Bytes

Contents

module VagrantPlugins
  module Openstack
    module Action
      class Suspend
        def initialize(app, _env)
          @app = app
        end

        def call(env)
          if env[:machine].id
            env[:ui].info I18n.t('vagrant.actions.vm.suspend.suspending')
            env[:openstack_client].nova.suspend_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-provider-0.2.0 lib/vagrant-openstack-provider/action/suspend.rb