コード例 #1
0
    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)
コード例 #2
0
ファイル: ifcfg.py プロジェクト: nirs/vdsm
    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)
コード例 #3
0
 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)
コード例 #4
0
ファイル: ifcfg.py プロジェクト: nirs/vdsm
 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)