Hi, attached is a patch for virtinst to fix the lookup_pool_by_path() function. It removes the trailing slash to have a normalized path.
Cheers, -- andreas -- Andreas Schneider, SUSE Labs, http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Index: virtinst-0.400.0/virtinst/util.py
===================================================================
--- virtinst-0.400.0.orig/virtinst/util.py
+++ virtinst-0.400.0/virtinst/util.py
@@ -455,7 +455,8 @@ def lookup_pool_by_path(conn, path):
pool_list = conn.listStoragePools() + conn.listDefinedStoragePools()
for name in pool_list:
pool = conn.storagePoolLookupByName(name)
- if get_xml_path(pool.XMLDesc(0), "/pool/target/path") == path:
+ xml_path = get_xml_path(pool.XMLDesc(0), "/pool/target/path")
+ if os.path.dirname(xml_path) == path:
return pool
return None
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ et-mgmt-tools mailing list [email protected] https://www.redhat.com/mailman/listinfo/et-mgmt-tools
