Class: Fog::Identity::HuaweiCloud::Real
- Inherits:
-
Object
- Object
- Fog::Identity::HuaweiCloud::Real
- Includes:
- HuaweiCloud::Core
- Defined in:
- lib/fog/identity/huaweicloud.rb
Constant Summary collapse
- DEFAULT_SERVICE_TYPE_V3 =
%w(identity_v3 identityv3 identity).collect(&:freeze).freeze
- DEFAULT_SERVICE_TYPE =
%w(identity).collect(&:freeze).freeze
Instance Attribute Summary
Attributes included from HuaweiCloud::Core
#auth_token, #auth_token_expiration, #current_tenant, #current_user, #current_user_id, #huaweicloud_cache_ttl, #huaweicloud_domain_id, #huaweicloud_domain_name, #huaweicloud_identity_prefix, #huaweicloud_path, #huaweicloud_project_domain, #huaweicloud_project_domain_id, #huaweicloud_project_id, #huaweicloud_user_domain, #huaweicloud_user_domain_id, #unscoped_token
Class Method Summary collapse
Instance Method Summary collapse
- #config ⇒ Object
- #config_service? ⇒ Boolean
-
#initialize(options = {}) ⇒ Real
constructor
A new instance of Real.
Methods included from HuaweiCloud::Core
#credentials, #initialize_identity, #reload
Constructor Details
#initialize(options = {}) ⇒ Real
Returns a new instance of Real.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/fog/identity/huaweicloud.rb', line 57 def initialize( = {}) if .respond_to?(:config_service?) && .config_service? configure() return end initialize_identity() @huaweicloud_service_type = [:huaweicloud_service_type] || default_service_type() @huaweicloud_service_name = [:huaweicloud_service_name] @connection_options = [:connection_options] || {} @huaweicloud_endpoint_type = [:huaweicloud_endpoint_type] || 'adminURL' initialize_endpoint_path_matches() authenticate if [:huaweicloud_identity_prefix] @path = "/#{[:huaweicloud_identity_prefix]}/#{@path}" end @persistent = [:persistent] || false @connection = Fog::Core::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options) end |
Class Method Details
.not_found_class ⇒ Object
53 54 55 |
# File 'lib/fog/identity/huaweicloud.rb', line 53 def self.not_found_class Fog::Identity::HuaweiCloud::NotFound end |
Instance Method Details
#config ⇒ Object
87 88 89 |
# File 'lib/fog/identity/huaweicloud.rb', line 87 def config self end |
#config_service? ⇒ Boolean
83 84 85 |
# File 'lib/fog/identity/huaweicloud.rb', line 83 def config_service? true end |