code: def get_config(self, retrieve="all"):
          
          get_startup = retrieve == "all" or retrieve == "startup"
          get_running = retrieve == "all" or retrieve == "running"
          get_candidate = (retrieve == "all" or retrieve == "candidate") and self.config_session
  
          if retrieve == "all":
              commands = ['show startup-config',
                          'show running-config']
  
              if self.config_session:
                  commands.append('show session-config named {}'.format(self.config_session))
  
              output = self.device.run_commands(commands, encoding="text")
              return {
                  'startup': py23_compat.text_type(output[0]['output']) if get_startup else u"",
                  'running': py23_compat.text_type(output[1]['output']) if get_running else u"",
                  'candidate': py23_compat.text_type(output[2]['output']) if get_candidate else u"",
              }
          elif get_startup or get_running:
              commands = ['show {}-config'.format(retrieve)]
              output = self.device.run_commands(commands, encoding="text")
              return {
                  'startup': py23_compat.text_type(output[0]['output']) if get_startup else u"",
                  'running': py23_compat.text_type(output[0]['output']) if get_running else u"",
                  'candidate': "",
              }
          elif get_candidate:
              commands = ['show session-config named {}'.format(self.config_session)]
              output = self.device.run_commands(commands, encoding="text")
              return {
                  'startup': "",
                  'running': "",
                  'candidate': py23_compat.text_type(output[0]['output']),
              }
          elif retrieve == "candidate":
              # If we get here it means that we want the candidate but there is none.
              return {
                  'startup': "",
                  'running': "",
                  'candidate': "",
              }
          else:
              raise Exception("Wrong retrieve filter: {}".format(retrieve))
docs: get_config implementation for EOS.