def _persistentNetworkBackup(cls, network): """ Persistently backup libvirt networks """ content = libvirt.getNetworkDef(network) if not content: # For non-exists networks use predefined header content = cls.DELETED_HEADER + '\n' logging.debug("backing up network %s: %s", network, content) cls.writeBackupFile(NET_LOGICALNET_CONF_BACK_DIR, network, content)
def _persistentNetworkBackup(cls, network): """ Persistently backup libvirt networks """ content = libvirt.getNetworkDef(network) if not content: # For non-exists networks use predefined header content = cls.DELETED_HEADER + "\n" logging.debug("backing up network %s: %s", network, content) cls.writeBackupFile(NET_LOGICALNET_CONF_BACK_DIR, network, content)
def _atomicNetworkBackup(self, network): """ In-memory backup libvirt networks """ if network not in self._networksBackups: self._networksBackups[network] = libvirt.getNetworkDef(network) logging.debug("Backed up %s", network)