Class Libvirt::StoragePool
In: ext/libvirt/_libvirt.c
Parent: Object

Methods

Constants

INACTIVE = INT2NUM(VIR_STORAGE_POOL_INACTIVE)   virStoragePoolState
BUILDING = INT2NUM(VIR_STORAGE_POOL_BUILDING)
RUNNING = INT2NUM(VIR_STORAGE_POOL_RUNNING)
DEGRADED = INT2NUM(VIR_STORAGE_POOL_DEGRADED)
INACCESSIBLE = INT2NUM(VIR_STORAGE_POOL_INACCESSIBLE)
BUILD_NEW = INT2NUM(VIR_STORAGE_POOL_BUILD_NEW)   virStoragePoolBuildFlags
BUILD_REPAIR = INT2NUM(VIR_STORAGE_POOL_BUILD_REPAIR)
BUILD_RESIZE = INT2NUM(VIR_STORAGE_POOL_BUILD_RESIZE)
DELETE_NORMAL = INT2NUM(VIR_STORAGE_POOL_DELETE_NORMAL)   virStoragePoolDeleteFlags
DELETE_ZEROED = INT2NUM(VIR_STORAGE_POOL_DELETE_ZEROED)

Attributes

connection  [R] 

Public Instance methods

Call virStoragePoolIsActive to determine if this storage pool is active.

[Source]

/*
 * call-seq:
 *   pool.active? -> [true|false]
 *
 * Call +virStoragePoolIsActive+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolIsActive]
 * to determine if this storage pool is active.
 */
static VALUE libvirt_pool_active_p(VALUE p) {

Call virStoragePoolGetAutostart to determine whether this storage pool will autostart when libvirtd starts.

[Source]

/*
 * call-seq:
 *   pool.autostart? -> [true|false]
 *
 * Call +virStoragePoolGetAutostart+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolGetAutostart]
 * to determine whether this storage pool will autostart when libvirtd starts.
 */
static VALUE libvirt_pool_autostart(VALUE s){

Call virStoragePoolSetAutostart to make this storage pool start when libvirtd starts.

[Source]

/*
 * call-seq:
 *   pool.autostart = [true|false]
 *
 * Call +virStoragePoolSetAutostart+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolSetAutostart]
 * to make this storage pool start when libvirtd starts.
 */
static VALUE libvirt_pool_autostart_set(VALUE s, VALUE autostart) {

Call virStoragePoolGetAutostart to determine whether this storage pool will autostart when libvirtd starts.

[Source]

/*
 * call-seq:
 *   pool.autostart? -> [true|false]
 *
 * Call +virStoragePoolGetAutostart+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolGetAutostart]
 * to determine whether this storage pool will autostart when libvirtd starts.
 */
static VALUE libvirt_pool_autostart(VALUE s){

Call virStoragePoolBuild to build this storage pool.

[Source]

/*
 * call-seq:
 *   pool.build(flags=0) -> nil
 *
 * Call +virStoragePoolBuild+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolBuild]
 * to build this storage pool.
 */
static VALUE libvirt_pool_build(int argc, VALUE *argv, VALUE p) {

Call virStoragePoolCreate to start this storage pool.

[Source]

/*
 * call-seq:
 *   pool.create(flags=0) -> nil
 *
 * Call +virStoragePoolCreate+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolCreate]
 * to start this storage pool.
 */
static VALUE libvirt_pool_create(int argc, VALUE *argv, VALUE p) {

Call virStorageVolCreateXML to create a new storage volume from xml.

[Source]

/*
 * call-seq:
 *   pool.create_volume_xml(xml, flags=0) -> Libvirt::StorageVol
 *
 * Call +virStorageVolCreateXML+[http://www.libvirt.org/html/libvirt-libvirt.html#virStorageVolCreateXML]
 * to create a new storage volume from xml.
 */
static VALUE libvirt_pool_vol_create_xml(int argc, VALUE *argv, VALUE p) {

Call virStorageVolCreateXMLFrom to clone a volume from an existing volume with the properties specified in xml.

[Source]

/*
 * call-seq:
 *   pool.create_volume_xml_from(xml, clonevol, flags=0) -> Libvirt::StorageVol
 *
 * Call +virStorageVolCreateXMLFrom+[http://www.libvirt.org/html/libvirt-libvirt.html#virStorageVolCreateXMLFrom]
 * to clone a volume from an existing volume with the properties specified in
 * xml.
 */
static VALUE libvirt_pool_vol_create_xml_from(int argc, VALUE *argv, VALUE p) {

create_volume_xml(...)

Alias for create_vol_xml

create_volume_xml_from(...)

Call virStoragePoolDelete to delete the data corresponding to this data pool. This is a destructive operation.

[Source]

/*
 * call-seq:
 *   pool.delete(flags=0) -> nil
 *
 * Call +virStoragePoolDelete+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolDelete]
 * to delete the data corresponding to this data pool.  This is a destructive
 * operation.
 */
static VALUE libvirt_pool_delete(int argc, VALUE *argv, VALUE p) {

Call virStoragePoolDestroy to shutdown this storage pool.

[Source]

/*
 * call-seq:
 *   pool.destroy -> nil
 *
 * Call +virStoragePoolDestroy+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolDestroy]
 * to shutdown this storage pool.
 */
static VALUE libvirt_pool_destroy(VALUE p) {

Call virStoragePoolFree to free this storage pool object. After this call the storage pool object is no longer valid.

[Source]

/*
 * call-seq:
 *   pool.free -> nil
 *
 * Call +virStoragePoolFree+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolFree]
 * to free this storage pool object.  After this call the storage pool object
 * is no longer valid.
 */
static VALUE libvirt_pool_free(VALUE s) {

Call virStoragePoolGetInfo to retrieve information about this storage pool.

[Source]

/*
 * call-seq:
 *   pool.info -> Libvirt::StoragePoolInfo
 *
 * Call +virStoragePoolGetInfo+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolGetInfo]
 * to retrieve information about this storage pool.
 */
static VALUE libvirt_pool_info(VALUE s) {

Call virStoragePoolListVolumes to retrieve a list of volume names in this storage pools.

[Source]

/*
 * call-seq:
 *   pool.list_volumes -> list
 *
 * Call +virStoragePoolListVolumes+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolListVolumes]
 * to retrieve a list of volume names in this storage pools.
 */
static VALUE libvirt_pool_list_volumes(VALUE s) {

Call virStorageVolLookupByKey to retrieve a storage volume object by key.

[Source]

/*
 * call-seq:
 *   pool.lookup_volume_by_key(key) -> Libvirt::StorageVol
 *
 * Call +virStorageVolLookupByKey+[http://www.libvirt.org/html/libvirt-libvirt.html#virStorageVolLookupByKey]
 * to retrieve a storage volume object by key.
 */
static VALUE libvirt_pool_lookup_vol_by_key(VALUE p, VALUE key) {

Call virStorageVolLookupByName to retrieve a storage volume object by name.

[Source]

/*
 * call-seq:
 *   pool.lookup_volume_by_name(name) -> Libvirt::StorageVol
 *
 * Call +virStorageVolLookupByName+[http://www.libvirt.org/html/libvirt-libvirt.html#virStorageVolLookupByName]
 * to retrieve a storage volume object by name.
 */
static VALUE libvirt_pool_lookup_vol_by_name(VALUE p, VALUE name) {

Call virStorageVolLookupByPath to retrieve a storage volume object by path.

[Source]

/*
 * call-seq:
 *   pool.lookup_volume_by_path(path) -> Libvirt::StorageVol
 *
 * Call +virStorageVolLookupByPath+[http://www.libvirt.org/html/libvirt-libvirt.html#virStorageVolLookupByPath]
 * to retrieve a storage volume object by path.
 */
static VALUE libvirt_pool_lookup_vol_by_path(VALUE p, VALUE path) {

Call virStoragePoolGetName to retrieve the name of this storage pool.

[Source]

/*
 * call-seq:
 *   pool.name -> string
 *
 * Call +virStoragePoolGetName+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolGetName]
 * to retrieve the name of this storage pool.
 */
static VALUE libvirt_pool_name(VALUE s) {

Call virStoragePoolNumOfVolumes to retrieve the number of volumes in this storage pool.

[Source]

/*
 * call-seq:
 *   pool.num_of_volumes -> fixnum
 *
 * Call +virStoragePoolNumOfVolumes+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolNumOfVolumes]
 * to retrieve the number of volumes in this storage pool.
 */
static VALUE libvirt_pool_num_of_volumes(VALUE s) {

Call virStoragePoolIsPersistent to determine if this storage pool is persistent.

[Source]

/*
 * call-seq:
 *   pool.persistent? -> [true|false]
 *
 * Call +virStoragePoolIsPersistent+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolIsPersistent]
 * to determine if this storage pool is persistent.
 */
static VALUE libvirt_pool_persistent_p(VALUE p) {

Call virStoragePoolRefresh to refresh the list of volumes in this storage pool.

[Source]

/*
 * call-seq:
 *   pool.refresh(flags=0) -> nil
 *
 * Call +virStoragePoolRefresh+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolRefresh]
 * to refresh the list of volumes in this storage pool.
 */
static VALUE libvirt_pool_refresh(int argc, VALUE *argv, VALUE p) {

Call virStoragePoolUndefine to undefine this storage pool.

[Source]

/*
 * call-seq:
 *   pool.undefine -> nil
 *
 * Call +virStoragePoolUndefine+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolUndefine]
 * to undefine this storage pool.
 */
static VALUE libvirt_pool_undefine(VALUE p) {

Call virStoragePoolGetUUIDString to retrieve the UUID of this storage pool.

[Source]

/*
 * call-seq:
 *   pool.uuid -> string
 *
 * Call +virStoragePoolGetUUIDString+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolGetUUIDString]
 * to retrieve the UUID of this storage pool.
 */
static VALUE libvirt_pool_uuid(VALUE s) {

Call virStoragePoolGetXMLDesc to retrieve the XML for this storage pool.

[Source]

/*
 * call-seq:
 *   pool.xml_desc(flags=0) -> string
 *
 * Call +virStoragePoolGetXMLDesc+[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolGetXMLDesc]
 * to retrieve the XML for this storage pool.
 */
static VALUE libvirt_pool_xml_desc(int argc, VALUE *argv, VALUE s) {

[Validate]