napalm-automation / napalm-ios

Apache License 2.0
31 stars 40 forks source link

`load_template` doesn't work as `load_merge_candidate` does not support `config` arg #98

Closed mirceaulinic closed 7 years ago

mirceaulinic commented 7 years ago

Description of Issue/Question

Looks like load_merge_candidate does not accept the config arg: https://github.com/napalm-automation/napalm-ios/blob/develop/napalm_ios/ios.py#L170-L171

For this reason, the load_template helper won't work as it tries to send the result after the template is renders in the config argument: https://github.com/napalm-automation/napalm-base/blob/develop/napalm_base/helpers.py#L86

ktbyers commented 7 years ago

See: https://github.com/napalm-automation/napalm-ios/issues/7

ktbyers commented 7 years ago

I will see if I can fix this weekend or early next week.

mirceaulinic commented 7 years ago

Meanwhile I was already looking at some sort of solution... has been written only by guess.

ktbyers commented 7 years ago

How do we want to implement this...I think we should probably use the InLine transfer mechanism (or at least give the option for this).

This would allow people who for some reason can't use SCP (biggest issue being SCP mechanism requires a direct priv15 account i.e. can't do enable with separate SCP channel...Cisco limitation).

So people would have two mechanisms and they could code around to use either (if required), by them reading or writing a file.

mirceaulinic commented 7 years ago

@ktbyers you know the best what would be the most suitable.

From the surface I would be tempted to suggest leaving the current behaviour unchanged, provide the ability to use the config arg; in addition let the user choose the InLine transfer instead of SCP, by specifying an optional arg as you suggested.

... and I guess I only rephrased what you just said :)

ktbyers commented 7 years ago

Fix for this is here:

https://github.com/napalm-automation/napalm-ios/pull/100