Sha256: 8429141138e55cfd218ad917fe9fe0764c9a2654d170a897a80831bca4b3d064

Contents?: true

Size: 810 Bytes

Versions: 39

Compression:

Stored size: 810 Bytes

Contents

module Fog
  module Compute
    class OpenStack
      class Real
        def evacuate_server(server_id, host = nil, on_shared_storage = nil, admin_password = nil)
          evacuate                    = {}
          evacuate['host']            = host if host
          evacuate['onSharedStorage'] = on_shared_storage if on_shared_storage
          evacuate['adminPass']       = admin_password if admin_password
          body                        = {
            'evacuate' => evacuate
          }
          server_action(server_id, body)
        end
      end

      class Mock
        def evacuate_server(_server_id, _host, _on_shared_storage, _admin_password = nil)
          response        = Excon::Response.new
          response.status = 202
          response
        end
      end
    end
  end
end

Version data entries

39 entries across 37 versions & 3 rubygems

Version Path
fog-openstack-0.1.25 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.24 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.23 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.22 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.21 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.20 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.19 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.18 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.17 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.15 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.14 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.13 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.12 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.11 lib/fog/compute/openstack/requests/evacuate_server.rb
fog-openstack-0.1.10 lib/fog/openstack/requests/compute/evacuate_server.rb
fog-openstack-0.1.9 lib/fog/openstack/requests/compute/evacuate_server.rb
fog-openstack-0.1.8 lib/fog/openstack/requests/compute/evacuate_server.rb
fog-openstack-0.1.7 lib/fog/openstack/requests/compute/evacuate_server.rb
fog-openstack-0.1.6 lib/fog/openstack/requests/compute/evacuate_server.rb