Deepti B Kalakeri wrote:
Kaitlin Rupert wrote:
>
>> +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.
>
The call to cleanup_guest_netpool() are little different .. the call
after the status check is designed to not delete the network pool that
is created on the target machine so that we can reuse it through the
loop without having to create it every time we want to migrate the guest.
Ah, yes -thanks for the correction. I missed the "clean_net=False"
param in the call below.
>> +
>> + 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(a)linux.vnet.ibm.com