

def detach_device(self, conf, persistent=False, live=False):
    'Detaches device to the guest.\n\n        :param conf: A LibvirtConfigObject of the device to detach\n        :param persistent: A bool to indicate whether the change is\n                           persistent or not\n        :param live: A bool to indicate whether it affect the guest\n                     in running state\n        '
    flags = ((persistent and libvirt.VIR_DOMAIN_AFFECT_CONFIG) or 0)
    flags |= ((live and libvirt.VIR_DOMAIN_AFFECT_LIVE) or 0)
    self._domain.detachDeviceFlags(conf.to_xml(), flags=flags)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/libvirt/guest.py Guest.detach_device/original