Sha256: 4205c0997a41f1b411b62af36badd387bc4ab7d61e052cddcdbb4c1fabfe37a8

Contents?: true

Size: 875 Bytes

Versions: 11

Compression:

Stored size: 875 Bytes

Contents

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

          if !microversion_newer_than?('2.13') && on_shared_storage
            evacuate['onSharedStorage'] = on_shared_storage
          end

          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

11 entries across 11 versions & 3 rubygems

Version Path
fog-openstack-1.1.3 lib/fog/openstack/compute/requests/evacuate_server.rb
fog-openstack-1.1.2 lib/fog/openstack/compute/requests/evacuate_server.rb
fog-openstack-fork-99 lib/fog/openstack/compute/requests/evacuate_server.rb
fog-openstack-1.1.0 lib/fog/openstack/compute/requests/evacuate_server.rb
fog-openstack-1.1.0.pre lib/fog/openstack/compute/requests/evacuate_server.rb
fog-openstack-apibank-1.0.102 lib/fog/openstack/compute/requests/evacuate_server.rb
fog-openstack-1.0.11 lib/fog/openstack/compute/requests/evacuate_server.rb
fog-openstack-apibank-1.0.101 lib/fog/openstack/compute/requests/evacuate_server.rb
fog-openstack-1.0.10 lib/fog/openstack/compute/requests/evacuate_server.rb
fog-openstack-1.0.9 lib/fog/openstack/compute/requests/evacuate_server.rb
fog-openstack-1.0.8 lib/fog/openstack/compute/requests/evacuate_server.rb