Sha256: ccac38be80b75920b7822fedf33341f8aa77d2db94cb075b75459d7b5b95a949

Contents?: true

Size: 634 Bytes

Versions: 11

Compression:

Stored size: 634 Bytes

Contents


module Fog
  module Image
    class OpenStack < Fog::Service

      # Fog::Image::OpenStack.new() will return a Fog::Image::OpenStack::V2 or a Fog::Image::OpenStack::V1,
      #  choosing the latest available
      def self.new(args = {})
        @openstack_auth_uri = URI.parse(args[:openstack_auth_url]) if args[:openstack_auth_url]
        if self.inspect == 'Fog::Image::OpenStack'
          service = Fog::Image::OpenStack::V2.new(args) unless args.empty?
          service ||= Fog::Image::OpenStack::V1.new(args)
        else
          service = Fog::Service.new(args)
        end
        service
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fog-openstack-0.1.10 lib/fog/openstack/image.rb
fog-openstack-0.1.9 lib/fog/openstack/image.rb
fog-openstack-0.1.8 lib/fog/openstack/image.rb
fog-openstack-0.1.7 lib/fog/openstack/image.rb
fog-openstack-0.1.6 lib/fog/openstack/image.rb
fog-openstack-0.1.5 lib/fog/openstack/image.rb
fog-openstack-0.1.4 lib/fog/openstack/image.rb
fog-openstack-0.1.3 lib/fog/openstack/image.rb
fog-openstack-0.1.2 lib/fog/openstack/image.rb
fog-openstack-0.1.1 lib/fog/openstack/image.rb
fog-openstack-0.1.0 lib/fog/openstack/image.rb