Sha256: 328816221f99bd47094e15520a58f578720664dcc1d05e1d23b13d725211bf56
Contents?: true
Size: 749 Bytes
Versions: 1
Compression:
Stored size: 749 Bytes
Contents
# # Author:: Matt Eldridge (<matt.eldridge@us.ibm.com>) # © Copyright IBM Corporation 2014. # # LICENSE: MIT (http://opensource.org/licenses/MIT) # module Fog module Compute class Softlayer class Mock def get_vm(identifier) response = Excon::Response.new response.body = @virtual_guests.map {|vm| vm if vm['id'] == identifier}.compact.reduce response.status = 200 response end end class Real def get_vm(identifier) request(:virtual_guest, identifier, :expected => [200, 404], :query => 'objectMask=mask[datacenter,blockDevices,blockDeviceTemplateGroup.globalIdentifier,operatingSystem.passwords.password]') end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-softlayer-0.1.1 | lib/fog/softlayer/requests/compute/get_vm.rb |