Example #1
0
    def _persistentNetworkBackup(cls, network):
        """ Persistently backup libvirt networks """
        content = libvirtCfg.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(netinfo.NET_LOGICALNET_CONF_BACK_DIR, network, content)
Example #2
0
    def _persistentNetworkBackup(cls, network):
        """ Persistently backup libvirt networks """
        content = libvirtCfg.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(netinfo.NET_LOGICALNET_CONF_BACK_DIR, network,
                            content)
Example #3
0
 def _atomicNetworkBackup(self, network):
     """ In-memory backup libvirt networks """
     if network not in self._networksBackups:
         self._networksBackups[network] = libvirtCfg.getNetworkDef(network)
         logging.debug("Backed up %s", network)
Example #4
0
 def _atomicNetworkBackup(self, network):
     """ In-memory backup libvirt networks """
     if network not in self._networksBackups:
         self._networksBackups[network] = libvirtCfg.getNetworkDef(network)
         logging.debug("Backed up %s", network)