Class: Fog::Compute::XenServer::Pool

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/xenserver/models/compute/pool.rb

Instance Method Summary collapse

Instance Method Details

#default_srObject



40
41
42
# File 'lib/fog/xenserver/models/compute/pool.rb', line 40

def default_sr
  service.storage_repositories.get __default_sr
end

#default_sr=(sr) ⇒ Object Also known as: default_storage_repository=



44
45
46
# File 'lib/fog/xenserver/models/compute/pool.rb', line 44

def default_sr=(sr)
  service.set_attribute( 'pool', reference, 'default_SR', sr.reference )
end

#default_storage_repositoryObject



49
50
51
# File 'lib/fog/xenserver/models/compute/pool.rb', line 49

def default_storage_repository
  default_sr
end

#masterObject



61
62
63
# File 'lib/fog/xenserver/models/compute/pool.rb', line 61

def master
  service.hosts.get __master
end

#set_attribute(name, *val) ⇒ Object



65
66
67
68
69
70
71
# File 'lib/fog/xenserver/models/compute/pool.rb', line 65

def set_attribute(name, *val)
  data = service.set_attribute( 'pool', reference, name, *val )
  # Do not reload automatically for performance reasons
  # We can set multiple attributes at the same time and
  # then reload manually
  #reload
end

#suspend_image_srObject



57
58
59
# File 'lib/fog/xenserver/models/compute/pool.rb', line 57

def suspend_image_sr
  service.storage_repositories.get __suspend_image_sr
end

#suspend_image_sr=(sr) ⇒ Object



53
54
55
# File 'lib/fog/xenserver/models/compute/pool.rb', line 53

def suspend_image_sr=(sr)
  service.set_attribute( 'pool', reference, 'suspend_image_SR', sr.reference )
end