def compare_config(self):
<EOL>base_file = "<STR_LIT>"<EOL>base_file_system = "<STR_LIT>"<EOL>if self.config_replace:<EOL><INDENT>new_file = self.candidate_cfg<EOL><DEDENT>else:<EOL><INDENT>new_file = self.merge_cfg<EOL><DEDENT>new_file_system = self.dest_file_system<EOL>base_file_full = self._gen_full_path(<EOL>filename=base_file, file_system=base_file_system<EOL>)<EOL>new_file_full = self._gen_full_path(<EOL>filename=new_file, file_system=new_file_system<EOL>)<EOL>if self.config_replace:<EOL><INDENT>cmd = "<STR_LIT>".format(<EOL>base_file_full, new_file_full<EOL>)<EOL>diff = self.device.send_command_expect(cmd)<EOL>diff = self._normalize_compare_config(diff)<EOL><DEDENT>else:<EOL><INDENT>cmd = "<STR_LIT>".format(<EOL>new_file_full<EOL>)<EOL>diff = self.device.send_command_expect(cmd)<EOL>if "<STR_LIT>" in diff or "<STR_LIT>" in diff:<EOL><INDENT>diff = (<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>elif "<STR_LIT>" not in diff:<EOL><INDENT>diff = self._normalize_merge_diff_incr(diff)<EOL><DEDENT>else:<EOL><INDENT>cmd = "<STR_LIT>".format(new_file_full)<EOL>diff = self.device.send_command_expect(cmd)<EOL>diff = self._normalize_merge_diff(diff)<EOL><DEDENT><DEDENT>return diff.strip()<EOL>
show archive config differences <base_file> <new_file>.

Default operation is to compare system:running-config to self.candidate_cfg