code: def commit_config(self):
          
          commands = []
          commands.append('copy startup-config flash:rollback-0')
          commands.append('configure session {}'.format(self.config_session))
          commands.append('commit')
          commands.append('write memory')
  
          self.device.run_commands(commands)
          self.config_session = None
docs: Implementation of NAPALM method commit_config.