require 'fog/core/collection' require 'fog/aws/models/compute/image' module Fog module AWS class Compute class Images < Fog::Collection attribute :filters model Fog::AWS::Compute::Image # Creates a new Amazon machine image # # AWS.images.new # # ==== Returns # # Returns the details of the new image # #>> AWS.images.new # # def initialize(attributes) self.filters ||= {} super end def all(filters = self.filters) self.filters = filters data = connection.describe_images(filters).body load(data['imagesSet']) end def get(image_id) if image_id self.class.new(:connection => connection).all('image-id' => image_id).first end end end end end end