def _get_merge_diff(self):
diff = []<EOL>running_config = self.get_config(retrieve="<STR_LIT>")["<STR_LIT>"]<EOL>running_lines = running_config.splitlines()<EOL>for line in self.merge_candidate.splitlines():<EOL><INDENT>if line not in running_lines and line:<EOL><INDENT>if line[<NUM_LIT:0>].strip() != "<STR_LIT:!>":<EOL><INDENT>diff.append(line)<EOL><DEDENT><DEDENT><DEDENT>return "<STR_LIT:\n>".join(diff)<EOL>
The merge diff is not necessarily what needs to be loaded
for example under NTP, even though the 'ntp commit' command might be
alread configured, it is mandatory to be sent
otherwise it won't take the new configuration - see:
https://github.com/napalm-automation/napalm-nxos/issues/59
therefore this method will return the real diff (but not necessarily what is
being sent by the merge_load_config()