Method: Fog::SharedFileSystem::OpenStack::Real#initialize

Defined in:
lib/fog/shared_file_system/openstack.rb

#initialize(options = {}) ⇒ Real

Returns a new instance of Real.



354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# File 'lib/fog/shared_file_system/openstack.rb', line 354

def initialize(options = {})
  @supported_versions     = SUPPORTED_VERSIONS
  @supported_microversion = SUPPORTED_MICROVERSION
  @fixed_microversion     = options[:openstack_shared_file_system_microversion]
  @microversion_key       = 'X-Openstack-Manila-Api-Version'.freeze

  initialize_identity options

  @openstack_service_type  = options[:openstack_service_type] || ['sharev2']
  @openstack_service_name  = options[:openstack_service_name]
  @connection_options      = options[:connection_options] || {}

  authenticate
  set_api_path
  set_microversion

  @persistent = options[:persistent] || false
  @connection = Fog::Core::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options)
end