[Kimchi-devel] [RFC PATCH V2 25/31] Fix storage pool URI split

Lucio Correia luciojhc at linux.vnet.ibm.com
Mon Jun 22 22:59:39 UTC 2015


We want here the last piece of URI (storage pool name),
not the second one. This was breaking kimchi initialization
in the new plugin structure.

Signed-off-by: Lucio Correia <luciojhc at linux.vnet.ibm.com>
Signed-off-by: Gustavo Y. Ribeiro <gyr at linux.vnet.ibm.com>
---
 plugins/kimchi/model/storagepools.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/kimchi/model/storagepools.py b/plugins/kimchi/model/storagepools.py
index 51269da..a0d10d9 100644
--- a/plugins/kimchi/model/storagepools.py
+++ b/plugins/kimchi/model/storagepools.py
@@ -72,7 +72,7 @@ class StoragePoolsModel(object):
         pools = {}
 
         default_pool = tmpl_defaults['storagepool']
-        default_pool = default_pool.split('/')[2]
+        default_pool = default_pool.split('/')[-1]
 
         pools[default_pool] = {}
         if default_pool == 'default':
-- 
1.7.1




More information about the Kimchi-devel mailing list