Ejemplo n.º 1
0
def teardown_device(dom, log):
    name, type_ = _get_device_name_type(dom)
    if name is None:
        log.debug("Unknown kind of host device: %s",
                  xmlutils.tostring(dom, pretty=True))
    elif type_ == 'mdev':
        despawn_mdev(name)
    else:
        pci_reattach = type_ == 'pci'
        log.info('Reattaching device %s to the host.' % (name,))
        reattach_detachable(name, pci_reattach=pci_reattach)
        log.info('Device %s reattached to the host.' % (name,))
Ejemplo n.º 2
0
 def teardown(self):
     despawn_mdev(self.mdev_uuid)
Ejemplo n.º 3
0
 def teardown(self):
     despawn_mdev(self.mdev_uuid)