Sha256: 2c76a545d2f76bbee99477f9bb452d263703d530ef1e50dbd562f7083f855396
Contents?: true
Size: 1.12 KB
Versions: 20
Compression:
Stored size: 1.12 KB
Contents
module Fog module OpenStack class Compute class Real # Available filters: name, status, image, flavor, changes_since, reservation_id def list_servers_detail(options = {}) params = options.dup if params[:all_tenants] params['all_tenants'] = 'True' params.delete(:all_tenants) end request( :expects => [200, 203], :method => 'GET', :path => 'servers/detail', :query => params ) end end class Mock def list_servers_detail(_filters = {}) response = Excon::Response.new servers = data[:servers].values servers.each do |server| case server['status'] when 'BUILD' if Time.now - data[:last_modified][:servers][server['id']] > Fog::Mock.delay * 2 server['status'] = 'ACTIVE' end end end response.status = [200, 203][rand(2)] response.body = {'servers' => servers} response end end end end end
Version data entries
20 entries across 20 versions & 3 rubygems