[libvirt] [libvirt-perl][PATCH] Add VIR_STORAGE_POOL_CREATE_* constants

Michal Privoznik mprivozn at redhat.com
Fri Dec 18 15:10:34 UTC 2015


Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 Changes                     |  4 +++-
 Virt.xs                     |  5 +++++
 lib/Sys/Virt/StoragePool.pm | 28 ++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/Changes b/Changes
index 0b3e659..05643b5 100644
--- a/Changes
+++ b/Changes
@@ -2,7 +2,9 @@ Revision history for perl module Sys::Virt
 
 1.3.1 2015-12-00
 
- - XXX
+ - Add VIR_STORAGE_POOL_CREATE_NORMAL, VIR_STORAGE_POOL_CREATE_WITH_BUILD,
+   VIR_STORAGE_POOL_CREATE_WITH_BUILD_OVERWRITE and
+   VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE constants
 
 1.3.0 2015-12-10
 
diff --git a/Virt.xs b/Virt.xs
index db04fc2..4e28887 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -8026,6 +8026,11 @@ BOOT:
       REGISTER_CONSTANT(VIR_STORAGE_POOL_BUILD_NO_OVERWRITE, BUILD_NO_OVERWRITE);
       REGISTER_CONSTANT(VIR_STORAGE_POOL_BUILD_OVERWRITE, BUILD_OVERWRITE);
 
+      REGISTER_CONSTANT(VIR_STORAGE_POOL_CREATE_NORMAL, CREATE_NORMAL);
+      REGISTER_CONSTANT(VIR_STORAGE_POOL_CREATE_WITH_BUILD, CREATE_WITH_BUILD);
+      REGISTER_CONSTANT(VIR_STORAGE_POOL_CREATE_WITH_BUILD_OVERWRITE, CREATE_WITH_BUILD_OVERWRITE);
+      REGISTER_CONSTANT(VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE, CREATE_WITH_BUILD_NO_OVERWRITE);
+
       REGISTER_CONSTANT(VIR_STORAGE_POOL_DELETE_NORMAL, DELETE_NORMAL);
       REGISTER_CONSTANT(VIR_STORAGE_POOL_DELETE_ZEROED, DELETE_ZEROED);
 
diff --git a/lib/Sys/Virt/StoragePool.pm b/lib/Sys/Virt/StoragePool.pm
index 7572d62..5fd6acc 100644
--- a/lib/Sys/Virt/StoragePool.pm
+++ b/lib/Sys/Virt/StoragePool.pm
@@ -355,6 +355,34 @@ Overwrite existing storage pool data
 
 =back
 
+=head2 CREATE MODES
+
+When creating a storage pool it can be built at the same time.
+The following values are therefore close to their BUILD
+counterparts.
+
+=over 4
+
+=item Sys::Virt::StoragePool::CREATE_NORMAL
+
+Just create the storage pool without building it.
+
+=item Sys::Virt::StoragePool::CREATE_WITH_BUILD
+
+When creating new storage pool also perform pool build without any flags.
+
+=item Sys::Virt::StoragePool::CREATE_WITH_BUILD_OVERWRITE
+
+Create the pool and perform pool build using the BUILD_OVERWRITE
+flag. This is mutually exclusive to CREATE_WITH_BUILD_NO_OVERWRITE.
+
+=item Sys::Virt::StoragePool::CREATE_WITH_BUILD_NO_OVERWRITE
+
+Create the pool and perform pool build using the BUILD_NO_OVERWRITE
+flag. This is mutually exclusive to CREATE_WITH_BUILD_OVERWRITE.
+
+=back
+
 =head2 XML DOCUMENTS
 
 The following constants are useful when requesting
-- 
2.4.10




More information about the libvir-list mailing list