def get_config(self, retrieve="<STR_LIT:all>"):
get_startup = retrieve == "<STR_LIT:all>" or retrieve == "<STR_LIT>"<EOL>get_running = retrieve == "<STR_LIT:all>" or retrieve == "<STR_LIT>"<EOL>get_candidate = (<EOL>retrieve == "<STR_LIT:all>" or retrieve == "<STR_LIT>"<EOL>) and self.config_session<EOL>if retrieve == "<STR_LIT:all>":<EOL><INDENT>commands = ["<STR_LIT>", "<STR_LIT>"]<EOL>if self.config_session:<EOL><INDENT>commands.append(<EOL>"<STR_LIT>".format(self.config_session)<EOL>)<EOL><DEDENT>output = self.device.run_commands(commands, encoding="<STR_LIT:text>")<EOL>return {<EOL>"<STR_LIT>": py23_compat.text_type(output[<NUM_LIT:0>]["<STR_LIT>"])<EOL>if get_startup<EOL>else "<STR_LIT>",<EOL>"<STR_LIT>": py23_compat.text_type(output[<NUM_LIT:1>]["<STR_LIT>"])<EOL>if get_running<EOL>else "<STR_LIT>",<EOL>"<STR_LIT>": py23_compat.text_type(output[<NUM_LIT:2>]["<STR_LIT>"])<EOL>if get_candidate<EOL>else "<STR_LIT>",<EOL>}<EOL><DEDENT>elif get_startup or get_running:<EOL><INDENT>commands = ["<STR_LIT>".format(retrieve)]<EOL>output = self.device.run_commands(commands, encoding="<STR_LIT:text>")<EOL>return {<EOL>"<STR_LIT>": py23_compat.text_type(output[<NUM_LIT:0>]["<STR_LIT>"])<EOL>if get_startup<EOL>else "<STR_LIT>",<EOL>"<STR_LIT>": py23_compat.text_type(output[<NUM_LIT:0>]["<STR_LIT>"])<EOL>if get_running<EOL>else "<STR_LIT>",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>}<EOL><DEDENT>elif get_candidate:<EOL><INDENT>commands = ["<STR_LIT>".format(self.config_session)]<EOL>output = self.device.run_commands(commands, encoding="<STR_LIT:text>")<EOL>return {<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": py23_compat.text_type(output[<NUM_LIT:0>]["<STR_LIT>"]),<EOL>}<EOL><DEDENT>elif retrieve == "<STR_LIT>":<EOL><INDENT>return {"<STR_LIT>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>"}<EOL><DEDENT>else:<EOL><INDENT>raise Exception("<STR_LIT>".format(retrieve))<EOL><DEDENT>
get_config implementation for EOS.