Sha256: 3142d766a4904b18a22de1467c21d05654eb1f69c9ad92fecef89fa046e29e46
Contents?: true
Size: 855 Bytes
Versions: 13
Compression:
Stored size: 855 Bytes
Contents
module Fog module Compute class CloudSigma class Real def stop_server(server_id, graceful_acpi = false) action = graceful_acpi ? :shutdown : :stop request(:path => "servers/#{server_id}/action/", :method => 'POST', :query => {:do => action}, :expects => [200, 202]) end end class Mock def stop_server(server_id, graceful_acpi = false) server = self.data[:servers][server_id] server['status'] = 'stopped' response = Excon::Response.new response.status = 200 response.body = { 'action' => graceful_acpi ? 'shutdown' : 'stop', 'result' => 'success', 'uuid' => server_id } response end end end end end
Version data entries
13 entries across 11 versions & 3 rubygems