Sha256: 15e4c7cc08ba601bd4e328a5a28a961dd1dfa99bab92f260bb891e6ca6b2d345

Contents?: true

Size: 606 Bytes

Versions: 26

Compression:

Stored size: 606 Bytes

Contents

module Fog
  module Brightbox
    class Compute
      class Real

        def stop_server(identifier, options = {})
          return nil if identifier.nil? || identifier == ""
          request(
            :expects  => [202],
            :method   => 'POST',
            :path     => "/1.0/servers/#{identifier}/stop",
            :headers  => {"Content-Type" => "application/json"},
            :body     => options.to_json
          )
        end

      end

      class Mock

        def stop_server(identifier, options = {})
          Fog::Mock.not_implemented
        end

      end
    end
  end
end

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
fog-0.3.23 lib/fog/brightbox/requests/compute/stop_server.rb
fog-0.3.22 lib/fog/brightbox/requests/compute/stop_server.rb
fog-0.3.21 lib/fog/brightbox/requests/compute/stop_server.rb
fog-0.3.20 lib/fog/brightbox/requests/compute/stop_server.rb
fog-0.3.19 lib/fog/brightbox/requests/compute/stop_server.rb
fog-0.3.18 lib/fog/brightbox/requests/compute/stop_server.rb