Class: OpenStack::Nova::Volume::Base

Inherits:
Common show all
Defined in:
lib/open_stack/nova/volume/base.rb

Direct Known Subclasses

Volume

Class Method Summary collapse

Methods inherited from Common

collection_path, custom_method_collection_url, element_path

Methods inherited from Base

headers

Methods inherited from ActiveResource::Base

#load

Class Method Details

.siteObject



24
25
26
27
28
29
30
# File 'lib/open_stack/nova/volume/base.rb', line 24

def self.site
  if self == OpenStack::Nova::Volume::Base
    Thread.current[:open_stack_nova_volume_site]
  else
    super
  end
end

.site=(site) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/open_stack/nova/volume/base.rb', line 32

def self.site=(site)
  super(site)
  Thread.current[:open_stack_nova_volume_site] = @site
  # Regenerate the prefix method
  default = @site.path
  default << '/' unless default[-1..-1] == '/'
  # generate the actual method based on the current site path
  self.prefix = default

  @site
end