class Fog::Libvirt::Compute::Pool
Attributes
Public Class Methods
Source
# File lib/fog/libvirt/models/compute/pool.rb, line 20 def initialize(attributes={} ) # Can be created by passing in XML @xml = attributes.delete(:xml) super(attributes) end
Calls superclass method
Public Instance Methods
Source
# File lib/fog/libvirt/models/compute/pool.rb, line 63 def active? active end
Is the pool active or not?
Source
# File lib/fog/libvirt/models/compute/pool.rb, line 68 def auto_start? autostart end
Will the pool autostart or not?
Source
# File lib/fog/libvirt/models/compute/pool.rb, line 50 def build service.pool_action uuid, :build end
Build this storage pool
Source
# File lib/fog/libvirt/models/compute/pool.rb, line 55 def destroy # Shutdown pool if active service.pool_action uuid, :destroy if active? # If this is a persistent domain we need to undefine it service.pool_action uuid, :undefine if persistent? end
Destroys the storage pool
Source
# File lib/fog/libvirt/models/compute/pool.rb, line 73 def persistent? persistent end
Is the pool persistent or not?
Source
# File lib/fog/libvirt/models/compute/pool.rb, line 26 def save raise Fog::Errors::Error.new('Creating a new pool requires proper xml') unless xml self.uuid = (persistent ? service.define_pool(xml) : service.create_pool(xml)).uuid reload end
Source
# File lib/fog/libvirt/models/compute/pool.rb, line 45 def shutdown stop end
Shuts down the pool
Source
# File lib/fog/libvirt/models/compute/pool.rb, line 34 def start service.pool_action uuid, :create end
Start the pool = make it active Performs a libvirt create (= start)
Source
# File lib/fog/libvirt/models/compute/pool.rb, line 40 def stop service.pool_action uuid, :destroy end
Stop the pool = make it non-active Performs a libvirt destroy (= stop)
Source
# File lib/fog/libvirt/models/compute/pool.rb, line 78 def volumes service.list_pool_volumes uuid end
Retrieves the volumes of this pool