Sha256: b182ba8da085cb8f361c01db52588cc0e0a2fb02427d651b70d7a4c0933c88e4
Contents?: true
Size: 680 Bytes
Versions: 25
Compression:
Stored size: 680 Bytes
Contents
require 'fog/core/collection' require 'fog/rackspace/models/compute/image' module Fog module Compute class Rackspace class Images < Fog::Collection model Fog::Compute::Rackspace::Image attribute :server def all data = connection.list_images_detail.body['images'] load(data) if server self.replace(self.select {|image| image.server_id == server.id}) end end def get(image_id) data = connection.get_image_details(image_id).body['image'] new(data) rescue Fog::Compute::Rackspace::NotFound nil end end end end end
Version data entries
25 entries across 25 versions & 7 rubygems