On 18/04/13 06:08 AM, Yiqiao Pu wrote:
-                    if nic.nettype == 'bridge' or nic.nettype ==
'network':
+                    if (nic.nettype == 'bridge'
+                            or nic.nettype == 'network'
+                            or nic.nettype == "macvtap"):
                          self._nic_tap_add_helper(nic)
                      elif nic.nettype == 'user':
                          logging.info("Assuming dependencies met for "
@@ -2149,6 +2161,10 @@ class VM(virt_vm.BaseVM):
                            self.process.get_pid())
          finally:
+            for nic in self.virtnet:
+                if nic.nettype == 'macvtap':
+                    tap = utils_net.Macvtap(nic.ifname)
+                    tap.delete()

Can you move this part into the _cleanup function? And you should check
if it is already setted up with check self.virtnet. Just other clean up
in the _cleanup(). Otherwise if the program terminate before you set up
the macvtap, this piece of code may raise some exceptions that we don't
want.

Hi Yiqiao,

I've took Yunping's patch, fixed the small mistakes, made some other little improvements and sent as pull request

https://github.com/autotest/virt-test/pull/303

From my review now things are looking good, one more ack and you can push that pull request to next.

Thanks!

_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel

Reply via email to