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

Commit

Permalink
Merge pull request #35 from mirceaulinic/CF-PYIOSXR-REL0.20
Browse files Browse the repository at this point in the history
Adapt to pyIOSXR 0.20
  • Loading branch information
dbarrosop authored Aug 29, 2016
2 parents 160323a + 97dde18 commit c2a51af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions napalm_iosxr/iosxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
# third party libs
from lxml import etree as ETREE
import xml.etree.ElementTree as ET
from lxml import etree as ETREE

from netaddr import IPAddress
from netaddr.core import AddrFormatError

from pyIOSXR import IOSXR
from pyIOSXR.iosxr import __execute_show__
from pyIOSXR.exceptions import InvalidInputError, TimeoutError, EOFError
from pyIOSXR.exceptions import ConnectError
from pyIOSXR.exceptions import TimeoutError
from pyIOSXR.exceptions import InvalidInputError

# napalm_base
from napalm_base.helpers import convert, find_txt, mac, ip
Expand All @@ -54,8 +54,8 @@ def __init__(self, hostname, username, password, timeout=60, optional_args=None)
def open(self):
try:
self.device.open()
except EOFError as ee:
raise ConnectionException(ee.message)
except ConnectError as conn_err:
raise ConnectionException(conn_err.message)

def close(self):
self.device.close()
Expand Down Expand Up @@ -685,7 +685,7 @@ def cli(self, commands = None):

for command in commands:
try:
cli_output[unicode(command)] = unicode(__execute_show__(self.device.device, command, self.timeout))
cli_output[unicode(command)] = unicode(self.device._execute_show(command))
except TimeoutError:
cli_output[unicode(command)] = 'Execution of command "{command}" took too long! Please adjust your params!'.format(
command = command
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
napalm-base
pyIOSXR
pyIOSXR >= 0.20
netaddr
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name="napalm-iosxr",
version="0.2.1",
version="0.2.2",
packages=find_packages(),
author="David Barroso",
author_email="dbarrosop@dravetech.com",
Expand Down

0 comments on commit c2a51af

Please sign in to comment.