Esempio n. 1
0
def restore_command(*args):
    """
    restore-nets
    Restores the networks to what was previously persisted via vdsm.
    """
    threading.current_thread().setName('restore-net')
    try:
        logging.config.fileConfig('/etc/vdsm/svdsm.logger.conf',
                                  disable_existing_loggers=False)
    except:
        logging.basicConfig(filename='/dev/stderr', filemode='w+',
                            level=logging.DEBUG)
        logging.error('Could not init proper logging', exc_info=True)

    if len(args) > 2:
        raise ExtraArgsError()

    force_restore = '--force' in args
    restore(force_restore)
Esempio n. 2
0
def restore_command(*args):
    """
    restore-nets
    Restores the networks to what was previously persisted via vdsm.
    """
    threading.current_thread().setName('restore-net')
    try:
        logging.config.fileConfig('/etc/vdsm/svdsm.logger.conf',
                                  disable_existing_loggers=False)
    except:
        logging.basicConfig(filename='/dev/stderr',
                            filemode='w+',
                            level=logging.DEBUG)
        logging.error('Could not init proper logging', exc_info=True)

    if len(args) > 2:
        raise ExtraArgsError()

    force_restore = '--force' in args
    restore(force_restore)
Esempio n. 3
0
def restoreNetworks(*args, **kwrags):
    return restore(force=True)
Esempio n. 4
0
 def restore_nets(self):
     restore(force=True)
     self.refresh_netinfo()
     self.refresh_running_config()
Esempio n. 5
0
 def restoreNetConfig(self):
     restore(force=True)