[DRE-commits] [vagrant-libvirt] 93/163: Change libvirt method for creating storage pool
Antonio Terceiro
terceiro at moszumanska.debian.org
Sun Apr 24 13:57:10 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to annotated tag 0.0.26
in repository vagrant-libvirt.
commit 8df13baade3867aeaae9eca24e5947f631745726
Author: Brian Pitts <brian at polibyte.com>
Date: Sun Dec 7 14:25:54 2014 -0600
Change libvirt method for creating storage pool
We should use define_storage pool_xml instead of create_storage_pool_xml
so that
* the pool is permanent
* pool creation succeeds if the directory does not already exist
---
lib/vagrant-libvirt/action/handle_storage_pool.rb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/vagrant-libvirt/action/handle_storage_pool.rb b/lib/vagrant-libvirt/action/handle_storage_pool.rb
index 9ebae53..e405638 100644
--- a/lib/vagrant-libvirt/action/handle_storage_pool.rb
+++ b/lib/vagrant-libvirt/action/handle_storage_pool.rb
@@ -34,8 +34,10 @@ module VagrantPlugins
# Fog libvirt currently doesn't support creating pools. Use
# ruby-libvirt client directly.
begin
- libvirt_pool = env[:libvirt_compute].client.create_storage_pool_xml(
+ libvirt_pool = env[:libvirt_compute].client.define_storage_pool_xml(
to_xml('default_storage_pool'))
+ libvirt_pool.build
+ libvirt_pool.create
rescue => e
raise Errors::CreatingStoragePoolError,
:error_message => e.message
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/vagrant-libvirt.git
More information about the Pkg-ruby-extras-commits
mailing list