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 #50 from napalm-automation/develop
Browse files Browse the repository at this point in the history
Release 0.4.1 - master
  • Loading branch information
mirceaulinic authored Nov 3, 2016
2 parents e0407bd + 5ddf82e commit a395d06
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions napalm_nxos/nxos.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# License for the specific language governing permissions and limitations under
# the License.

from __future__ import unicode_literals

# import stdlib
import re
import ssl
Expand All @@ -36,6 +38,7 @@
# import NAPALM Base
import napalm_base.helpers
from napalm_base import NetworkDriver
from napalm_base.utils import py23_compat
from napalm_base.exceptions import ConnectionException
from napalm_base.exceptions import MergeConfigException
from napalm_base.exceptions import CommandErrorException
Expand Down Expand Up @@ -728,7 +731,7 @@ def get_users(self):

password = user.get('password', '')
if password:
users[username]['password'] = password.strip()
users[username]['password'] = py23_compat.text_type(password.strip())

level = 0
role = user.get('role', '')
Expand All @@ -746,7 +749,7 @@ def get_users(self):
if sshkeytype and sshkeyvalue:
if sshkeytype not in ['ssh-rsa', 'ssh-dsa']:
continue
users[username]['sshkeys'].append(sshkeyvalue)
users[username]['sshkeys'].append(py23_compat.text_type(sshkeyvalue))

return users

Expand Down Expand Up @@ -849,9 +852,9 @@ def get_config(self, retrieve='all'):

if retrieve.lower() in ('running', 'all'):
_cmd = 'show running-config'
config['running'] = self.cli([_cmd]).get(_cmd)
config['running'] = py23_compat.text_type(self.cli([_cmd]).get(_cmd))
if retrieve.lower() in ('startup', 'all'):
_cmd = 'show startup-config'
config['startup'] = self.cli([_cmd]).get(_cmd)
config['startup'] = py23_compat.text_type(self.cli([_cmd]).get(_cmd))

return config
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
napalm-base==0.17.0
napalm-base>=0.18.0
pycsco
PyYAML # this is a requirement for pycsco but seems to be missing
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-nxos",
version="0.4.0",
version="0.4.1",
packages=find_packages(),
author="David Barroso",
author_email="[email protected]",
Expand Down

0 comments on commit a395d06

Please sign in to comment.