Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #61 from napalm-automation/develop
Browse files Browse the repository at this point in the history
napalm-ios release 0.3.1
  • Loading branch information
mirceaulinic authored Nov 1, 2016
2 parents 1b0a744 + c6c02b7 commit 6d4c408
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions napalm_ios/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import re

from netmiko import ConnectHandler, FileTransfer
from netmiko import __version__ as netmiko_version
from napalm_base.base import NetworkDriver
from napalm_base.exceptions import ReplaceConfigException, MergeConfigException

Expand Down Expand Up @@ -64,6 +65,14 @@ def __init__(self, hostname, username, password, timeout=60, optional_args=None)
'ssh_config_file': None,
}

fields = netmiko_version.split('.')
fields = [int(x) for x in fields]
maj_ver, min_ver, bug_fix = fields
if maj_ver >= 2:
netmiko_argument_map['allow_agent'] = False
elif maj_ver == 1 and min_ver >= 1:
netmiko_argument_map['allow_agent'] = False

# Build dict of any optional Netmiko args
self.netmiko_optional_args = {}
for k, v in netmiko_argument_map.items():
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
napalm_base==0.17.0
napalm_base>=0.18.0
netmiko>=1.0.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="napalm-ios",
version="0.3.0",
version="0.3.1",
packages=find_packages(),
author="David Barroso",
author_email="[email protected]",
Expand Down

0 comments on commit 6d4c408

Please sign in to comment.