Sha256: 0e8e554711f7684ac202c40e5b78dfa5bebe4fc43b4443a908701cdb0447626e
Contents?: true
Size: 861 Bytes
Versions: 2
Compression:
Stored size: 861 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-1.22.0 | lib/fog/serverlove/requests/compute/create_server.rb |
fog-1.21.0 | lib/fog/serverlove/requests/compute/create_server.rb |