rtslib/root.py
def restore_from_file(self, restore_file=None, clear_existing=True,
                          target=None, storage_object=None,
                          abort_on_error=False):
        '''
        Restore the configuration from a file in json format.
        Restore file defaults to '/etc/target/saveconfig.json'.
        Returns a list of non-fatal errors. If abort_on_error is set,
          it will raise the exception instead of continuing.
        '''
        if not restore_file:
            restore_file = default_save_file

        with open(restore_file, "r") as f:
            config = json.loads(f.read())
            return self.restore(config, target, storage_object,
                                clear_existing=clear_existing,
                                abort_on_error=abort_on_error)

        Restore the configuration from a file in json format.
        Restore file defaults to '/etc/target/saveconfig.json'.
        Returns a list of non-fatal errors. If abort_on_error is set,
          it will raise the exception instead of continuing.
        
Restore the configuration from a file in json format.
Restore file defaults to '/etc/target/saveconfig.json'.
Returns a list of non-fatal errors. If abort_on_error is set,
it will raise the exception instead of continuing.
Restore the configuration from a file in json format . Restore file defaults to ' / etc / target / saveconfig . json ' . Returns a list of non - fatal errors . If abort_on_error is set it will raise the exception instead of continuing .
def restore_from_file(self, restore_file=None, clear_existing=True,
                          target=None, storage_object=None,
                          abort_on_error=False):
        if not restore_file:
            restore_file = default_save_file
        with open(restore_file, "r") as f:
            config = json.loads(f.read())
            return self.restore(config, target, storage_object,
                                clear_existing=clear_existing,
                                abort_on_error=abort_on_error)
def restore_from_file ( self , restore_file = None , clear_existing = True , target = None , storage_object = None , abort_on_error = False ) : if not restore_file : restore_file = default_save_file with open ( restore_file , "r" ) as f : config = json . loads ( f . read ( ) ) return self . restore ( config , target , storage_object , clear_existing = clear_existing , abort_on_error = abort_on_error )
Restore the configuration from a file in json format.
Restore the configuration from a file in json format .
'''
        Restore the configuration from a file in json format.
        Restore file defaults to '/etc/target/saveconfig.json'.
        Returns a list of non-fatal errors. If abort_on_error is set,
          it will raise the exception instead of continuing.
        '''
self
restore_file
clear_existing
target
storage_object
abort_on_error