class Fog::Image::HuaweiCloud

Public Class Methods

new(args = {}) click to toggle source

Fog::Image::HuaweiCloud.new() will return a Fog::Image::HuaweiCloud::V2 or a Fog::Image::HuaweiCloud::V1,

choosing the latest available
# File lib/fog/image/huaweicloud.rb, line 11
def self.new(args = {})
  @huaweicloud_auth_uri = URI.parse(args[:huaweicloud_auth_url]) if args[:huaweicloud_auth_url]
  if inspect == 'Fog::Image::HuaweiCloud'
    service = Fog::Image::HuaweiCloud::V2.new(args) unless args.empty?
    service ||= Fog::Image::HuaweiCloud::V1.new(args)
  else
    service = Fog::Service.new(args)
  end
  service
end