class Fog::Image::OpenStack

Public Class Methods

new(args = {}) click to toggle source

::new will return a Fog::Image::OpenStack::V2 or a Fog::Image::OpenStack::V1,

choosing the latest available
# File lib/fog/openstack/image.rb, line 9
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