Module: Fog::Image

Defined in:
lib/fog/image.rb,
lib/fog/openstack/image.rb,
lib/fog/openstack/models/image/image.rb,
lib/fog/openstack/models/image/images.rb,
lib/fog/openstack/requests/image/get_image.rb,
lib/fog/openstack/requests/image/set_tenant.rb,
lib/fog/openstack/requests/image/create_image.rb,
lib/fog/openstack/requests/image/delete_image.rb,
lib/fog/openstack/requests/image/update_image.rb,
lib/fog/openstack/requests/image/get_image_by_id.rb,
lib/fog/openstack/requests/image/get_image_members.rb,
lib/fog/openstack/requests/image/get_shared_images.rb,
lib/fog/openstack/requests/image/list_public_images.rb,
lib/fog/openstack/requests/image/add_member_to_image.rb,
lib/fog/openstack/requests/image/remove_member_from_image.rb,
lib/fog/openstack/requests/image/list_public_images_detailed.rb

Defined Under Namespace

Classes: OpenStack

Class Method Summary collapse

Class Method Details

.[](provider) ⇒ Object



4
5
6
# File 'lib/fog/image.rb', line 4

def self.[](provider)
  self.new(:provider => provider)
end

.new(attributes) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/fog/image.rb', line 8

def self.new(attributes)
  attributes = attributes.dup # Prevent delete from having side effects
  case provider = attributes.delete(:provider).to_s.downcase.to_sym
  when :openstack
    require 'fog/openstack/image'
    Fog::Image::OpenStack.new(attributes)
  else
    raise ArgumentError.new("#{provider} has no identity service")
  end
end

.providersObject



19
20
21
# File 'lib/fog/image.rb', line 19

def self.providers
  Fog.services[:image]
end