From 7a724f9eb824454a84b34bf0dbffcbdcbf3caac4 Mon Sep 17 00:00:00 2001 From: David Barroso Date: Tue, 1 Nov 2016 19:17:43 +0100 Subject: [PATCH 1/2] Adding support to napalm-base 0.18.0 --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index dc815fb..1454b58 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -napalm-base==0.17.0 +napalm-base>=0.18.0 pyFG diff --git a/setup.py b/setup.py index 9075c14..1af1d89 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name="napalm-fortios", - version="0.2.0", + version="0.2.1", packages=find_packages(), author="David Barroso", author_email="dbarrosop@dravetech.com", From fcea9076d84fd4ab44481fb51c539e203fc35bac Mon Sep 17 00:00:00 2001 From: David Barroso Date: Tue, 1 Nov 2016 20:20:59 +0100 Subject: [PATCH 2/2] We have to return unicode, not strings --- napalm_fortios/fortios.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/napalm_fortios/fortios.py b/napalm_fortios/fortios.py index 3a5c919..e0a2fcc 100644 --- a/napalm_fortios/fortios.py +++ b/napalm_fortios/fortios.py @@ -149,16 +149,16 @@ def get_config(self, retrieve="all"): text_result = '\n'.join(result) return { - 'startup': "", - 'running': text_result, - 'candidate': "", + 'startup': u"", + 'running': unicode(text_result), + 'candidate': u"", } elif get_startup or get_candidate: return { - 'startup': "", - 'running': "", - 'candidate': "", + 'startup': u"", + 'running': u"", + 'candidate': u"", } def get_facts(self):