
+import sys +import os
You have an import os statement later on, so no need to include this one.
+from socket import gethostname +from XenKvmLib import vxml
Same here, you have an import vxml statement later on; this one can be removed.
+ if status != PASS: + break
Instead of breaking here, you can break after calling cleanup_guest_netpool(), this way, you won't need to call cleanup_guest_netpool() after you unsubscribe the indications.
+ + cleanup_guest_netpool(virt, cxml, test_dom, t_sysname, + s_sysname, clean_net=False) + + + #Make sure all subscriptions are really unsubscribed + for ind, sub in sub_list.iteritems(): + sub.unsubscribe(dict['default_auth']) + logger.info("Cancelling subscription for %s", ind_names[ind]) + + cleanup_guest_netpool(virt, cxml, test_dom, t_sysname, + s_sysname) + return status +
-- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com