Sha256: 124487b183b36acb4a4db4ee881c9e98f3b65e67636a18a4e662345fb9abb7b4
Contents?: true
Size: 867 Bytes
Versions: 74
Compression:
Stored size: 867 Bytes
Contents
module Fog module Compute class Serverlove class Real def create_server(options) return nil if options.empty? || options.nil? request(:method => "post", :path => "/servers/create/stopped", :expects => 200, :options => options) end end class Mock def create_server(options = {}) response = Excon::Response.new response.status = 200 data = { 'server' => Fog::Mock.random_numbers(1000000).to_s, 'name' => options['name'] || 'Test', 'cpu' => options['cpu'] || 1000, 'persistent' => options['persistent'] || false, 'vnc:password' => options['vnc:password'] || 'T35tServER!' } response.body = data response end end end end end
Version data entries
74 entries across 74 versions & 11 rubygems