Sha256: 1ec11e3c3ada46079c02fbed818d03b4c8c8b8a762b527fcfaec47256f8e1d83
Contents?: true
Size: 956 Bytes
Versions: 12
Compression:
Stored size: 956 Bytes
Contents
# # Author:: Matt Eldridge (<matt.eldridge@us.ibm.com>) # © Copyright IBM Corporation 2014. # # LICENSE: MIT (http://opensource.org/licenses/MIT) # require 'fog/softlayer/models/compute/image' module Fog module Compute class Softlayer class Images < Fog::Collection model Fog::Compute::Softlayer::Image # Returns an array of all public images. # # Fog::Softlayer.images.all def all load(service.request(:virtual_guest_block_device_template_group, :get_public_images).body) self end # Returns an array of all private images for current account. def private load(service.request(:account, :getPrivateBlockDeviceTemplateGroups).body) self end # Used to retrieve an image def get(uuid) self.class.new(:service => service).all.detect {|image| image.id == uuid} end end end end end
Version data entries
12 entries across 10 versions & 2 rubygems