Class: Bosh::Director::Blobstores

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/director/blobstores.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Blobstores

Returns a new instance of Blobstores.



5
6
7
8
9
10
# File 'lib/bosh/director/blobstores.rb', line 5

def initialize(config)
  b_config = config.hash.fetch('blobstore')
  bd_config = config.hash['backup_destination']
  @blobstore = create_client(b_config)
  @backup_destination = create_client(bd_config) if bd_config
end

Instance Attribute Details

#blobstoreObject (readonly)

Returns the value of attribute blobstore.



3
4
5
# File 'lib/bosh/director/blobstores.rb', line 3

def blobstore
  @blobstore
end

Instance Method Details

#backup_destinationObject



12
13
14
15
# File 'lib/bosh/director/blobstores.rb', line 12

def backup_destination
  raise 'No backup destination configured' unless @backup_destination
  @backup_destination
end