From 0f8609546bd9f293bd2c89e158ee2dccde441534 Mon Sep 17 00:00:00 2001 From: gcotone <15230109+gcotone@users.noreply.github.com> Date: Wed, 8 Jan 2020 11:26:35 +0100 Subject: [PATCH] build dependencies; python3.5 compat --- .github/workflows/pythopackage.yml | 1 + napalm_arubaoss/ArubaOS.py | 17 ++++++++--------- napalm_arubaoss/__init__.py | 1 - 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pythopackage.yml b/.github/workflows/pythopackage.yml index 4d0f7e0..87ca3d8 100644 --- a/.github/workflows/pythopackage.yml +++ b/.github/workflows/pythopackage.yml @@ -21,6 +21,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements-dev.txt + pip install -r requirements.txt - name: Lint with flake8 run: | pip install flake8 diff --git a/napalm_arubaoss/ArubaOS.py b/napalm_arubaoss/ArubaOS.py index ab8a68e..7960895 100644 --- a/napalm_arubaoss/ArubaOS.py +++ b/napalm_arubaoss/ArubaOS.py @@ -1,21 +1,20 @@ -import requests import base64 -import logging -from time import sleep - from itertools import zip_longest +from time import sleep +import requests +import logging from netaddr import IPNetwork from napalm.base.helpers import textfsm_extractor from napalm.base.base import NetworkDriver from napalm.base.exceptions import ( - MergeConfigException, - ReplaceConfigException, ConnectAuthError, ConnectionClosedException, CommandErrorException, - CommandTimeoutException + CommandTimeoutException, + MergeConfigException, + ReplaceConfigException ) """ Debugging @@ -546,8 +545,8 @@ def _config_batch(self, cmd_list): if check_status.status_code == 200: for cmd_status in check_status.json()['cmd_exec_logs']: if cmd_status['status'] != "CCS_SUCCESS": - log.debug(f"command failed to execute with error \ - {cmd_status['result']}") + log.debug("command failed to execute with error \ + {}".format(cmd_status['result'])) return False else: return True diff --git a/napalm_arubaoss/__init__.py b/napalm_arubaoss/__init__.py index ec00b68..6d46f1e 100644 --- a/napalm_arubaoss/__init__.py +++ b/napalm_arubaoss/__init__.py @@ -1,5 +1,4 @@ """ load napalm_arubaoss.ArubaOS class """ - from napalm_arubaoss.ArubaOS import AOS __all__ = ("ArubaOSS",)