class Fog::Identity::HuaweiCloud
Public Class Methods
new(args = {})
click to toggle source
Fog::Identity::HuaweiCloud.new()
will return a Fog::Identity::HuaweiCloud::V3
by default
# File lib/fog/identity/huaweicloud.rb, line 21 def self.new(args = {}) version = '3' url = Fog.credentials[:huaweicloud_auth_url] || args[:huaweicloud_auth_url] if url uri = URI(url) version = '2.0' if uri.path =~ /v2\.0/ end service = case version when '2.0' Fog::Identity::HuaweiCloud::V2.new(args) else Fog::Identity::HuaweiCloud::V3.new(args) end service end