napalm-automation / napalm-ios

Apache License 2.0
31 stars 40 forks source link

Significant update to merge and replace operations #100

Closed ktbyers closed 7 years ago

ktbyers commented 7 years ago
  1. Add support for config inline (i.e. config argument to merge and replace methods).

  2. Add support for incremental diff on Cisco IOS (for improved compare_config)

  3. Add support for Netmiko's InLineTransfer mechanism that uses TCL to eliminate requirement for SCP file operation.

ktbyers commented 7 years ago

Note, this requires Netmiko 1.2.7 which I have to release.

ktbyers commented 7 years ago

New, optional_arg = inline_transfer needs documented.

ktbyers commented 7 years ago

In the case where a temporary config file needs written, it writes this to os.getcwd(). IMO, this is better than /tmp (as config files might have security sensitive info in them).

ktbyers commented 7 years ago

I verified the following

merge from file (SCP) merge from inline config (SCP) merge from file (InLineTransfer TCL) merge from inline config (InLineTransfer TCL)

replace from file (SCP) replace from inline config (SCP) replace from file (InLineTransfer TCL) replace from inline config (InLineTransfer TCL)

dbarrosop commented 7 years ago

This is great! When you release netmiko let us know. I would certainly want to test myself and see how it looks and feels : )

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-3.5%) to 65.851% when pulling c406542c9277ad51573fd834646558ac122a60bf on ktbyers:devel into 527b8d48ce03c78764a6fae2a0fc0d788e17bf37 on napalm-automation:develop.

ktbyers commented 7 years ago

@dbarrosop @mirceaulinic Okay, Netmiko 1.2.7 has been released so this should work now. Please test and review :-)

mirceaulinic commented 7 years ago

This looks good to me! But unfortunately I cannot test; and I think @dbarrosop does not have a device running IOS either. Let's see if other people would like to volunteer :)

@ogenstad @DiogoAndre @XioNoX would you mind testing this branch and provide some feedback?

Thanks!

ktbyers commented 7 years ago

I have tested it quite a bit...so I am happy release it.

If people want to test it more...have at it :-)

mirceaulinic commented 7 years ago

Alright, let's release then! Feedback will be welcome at any point after! :)

MatthiasGabriel commented 7 years ago

Seems to work just fine thank you very much @ktbyers