Skip to content

Commit

Permalink
Merge branch 'develop' into fix-napalm-automation#1569
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceaulinic authored Mar 25, 2022
2 parents 10fcc63 + 31acd89 commit 48c4e5b
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 42 deletions.
5 changes: 2 additions & 3 deletions napalm/base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
from napalm.base import constants as c
from napalm.base import validate
from napalm.base.exceptions import ConnectionException
from napalm.base.test import models
from napalm.base.test.models import NTPStats
from napalm.base import models


class NetworkDriver(object):
Expand Down Expand Up @@ -938,7 +937,7 @@ def get_ntp_servers(self) -> Dict[str, models.NTPServerDict]:

raise NotImplementedError

def get_ntp_stats(self) -> List[NTPStats]:
def get_ntp_stats(self) -> List[models.NTPStats]:

"""
Returns a list of NTP synchronization statistics.
Expand Down
2 changes: 1 addition & 1 deletion napalm/base/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# local modules
import napalm.base.exceptions
from napalm.base import constants
from napalm.base.test.models import ConfigDict
from napalm.base.models import ConfigDict
from napalm.base.utils.jinja_filters import CustomJinjaFilters
from napalm.base.canonical_map import base_interfaces, reverse_mapping

Expand Down
2 changes: 1 addition & 1 deletion napalm/base/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from pydoc import locate

from napalm.base.test import models
from napalm.base import models


def raise_exception(result): # type: ignore
Expand Down
25 changes: 0 additions & 25 deletions napalm/base/test/models.py → napalm/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,31 +400,6 @@

ConfigDict = TypedDict("ConfigDict", {"running": str, "startup": str, "candidate": str})

TracerouteResultDictEntry = TypedDict(
"TracerouteResultDictEntry", {"probes": Dict[int, TracerouteDict]}
)

OpticsStateDict = TypedDict(
"OpticsStateDict", {"instant": float, "avg": float, "min": float, "max": float}
)

OpticsStatePerChannelDict = TypedDict(
"OpticsStatePerChannelDict",
{
"input_power": OpticsStateDict,
"output_power": OpticsStateDict,
"laser_bias_current": OpticsStateDict,
},
)

OpticsPerChannelDict = TypedDict(
"OpticsPerChannelDict", {"index": int, "state": OpticsStatePerChannelDict}
)

OpticsPhysicalChannelsDict = TypedDict(
"OpticsPhysicalChannelsDict", {"channels": OpticsPerChannelDict}
)

NetworkInstanceDict = TypedDict(
"NetworkInstanceDict", {"name": str, "type": str, "state": dict, "interfaces": dict}
)
Expand Down
2 changes: 1 addition & 1 deletion napalm/base/test/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# the License.
import difflib
from napalm.base import exceptions
from napalm.base.test import models
from napalm.base import models
from unittest import SkipTest


Expand Down
2 changes: 1 addition & 1 deletion napalm/base/test/getters.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import pytest
from napalm.base.test import helpers
from napalm.base.test import models
from napalm.base import models
from napalm.base import NetworkDriver
from napalm.base.test import conftest

Expand Down
2 changes: 1 addition & 1 deletion napalm/base/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
if TYPE_CHECKING:
from napalm.base import NetworkDriver
from napalm.base.exceptions import ValidationException
from napalm.base.test import models
from napalm.base import models


# We put it here to compile it only once
Expand Down
2 changes: 1 addition & 1 deletion napalm/nxos/nxos.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
from napalm.base.helpers import as_number
from napalm.base.helpers import generate_regex_or
from napalm.base.netmiko_helpers import netmiko_args
from napalm.base.test import models
from napalm.base import models
from napalm.nxapi_plumbing import Device as NXOSDevice
from napalm.nxapi_plumbing import (
NXAPIAuthError,
Expand Down
10 changes: 5 additions & 5 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ pytest-pythonpath==0.7.4
pylama==7.7.1
mock==4.0.3
tox==3.24.5
mypy==0.931
types-requests==2.27.9
types-six==1.16.10
types-setuptools==57.4.9
types-PyYAML==6.0.4
mypy==0.941
types-requests==2.27.14
types-six==1.16.12
types-setuptools==57.4.11
types-PyYAML==6.0.5
ttp==0.8.4
ttp_templates==0.1.3
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",
version="3.4.0",
version="4.0.0",
packages=find_packages(exclude=("test*",)),
test_suite="test_base",
author="David Barroso, Kirk Byers, Mircea Ulinic",
Expand Down
2 changes: 1 addition & 1 deletion test/nxos/test_getters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from napalm.base.test.getters import BaseTestGetters, wrap_test_cases
from napalm.base.test import helpers
from napalm.base.test import models
from napalm.base import models

import pytest
from mock import patch
Expand Down
2 changes: 1 addition & 1 deletion test/nxos_ssh/test_getters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from napalm.base.test.getters import BaseTestGetters, wrap_test_cases
from napalm.base.test import helpers
from napalm.base.test import models
from napalm.base import models

import pytest
from mock import patch
Expand Down

0 comments on commit 48c4e5b

Please sign in to comment.