def enable_hairpin(self): """Enables hairpin mode for this guest.""" interfaces = self.get_interfaces() try: for interface in interfaces: libvirt_privsep.enable_hairpin(interface) except Exception: with excutils.save_and_reraise_exception(): LOG.error('Error enabling hairpin mode with XML: %s', self._encoded_xml, errors='ignore')