Sha256: 4be0494e49f14c264e1ba18bf0f74c7f043a8fb50b2a0d2c10c62e16596cbc56

Contents?: true

Size: 812 Bytes

Versions: 4

Compression:

Stored size: 812 Bytes

Contents

module Fog
  module Compute
    class HuaweiCloud
      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

4 entries across 4 versions & 1 rubygems

Version Path
fog-huaweicloud-0.0.3 lib/fog/compute/huaweicloud/requests/evacuate_server.rb
fog-huaweicloud-0.0.2 lib/fog/compute/huaweicloud/requests/evacuate_server.rb
fog-huaweicloud-0.1.3 lib/fog/compute/huaweicloud/requests/evacuate_server.rb
fog-huaweicloud-0.1.2 lib/fog/compute/huaweicloud/requests/evacuate_server.rb