Skip to content

Commit

Permalink
Ver Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
h4ndzdatm0ld committed Oct 13, 2024
1 parent 8cb11ae commit 682baa9
Show file tree
Hide file tree
Showing 45 changed files with 1,196 additions and 575 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VER=3.8
ARG PYTHON_VER=3.9

FROM python:${PYTHON_VER} AS base

Expand All @@ -21,7 +21,7 @@ COPY . .
RUN poetry install --no-interaction

RUN echo 'Rnning Ruff' && \
ruff . && \
ruff check . && \
echo 'Running Black' && \
black --check --diff . && \
echo 'Running Yamllint' && \
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Configuration for Documentation."""

# pylint: disable-all
# Configuration file for the Sphinx documentation builder.
#
Expand Down
1 change: 1 addition & 0 deletions nornir_netconf/plugins/connections/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Netconf Connection Plugin."""

from nornir_netconf.plugins.connections.netconf import CONNECTION_NAME, Netconf

__all__ = ("Netconf", "CONNECTION_NAME")
1 change: 1 addition & 0 deletions nornir_netconf/plugins/connections/netconf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Netconf Connection Plugin."""

from typing import Any, Dict, Optional

from ncclient import manager
Expand Down
1 change: 1 addition & 0 deletions nornir_netconf/plugins/helpers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper Functions."""

from .general import check_file, create_folder, write_output
from .models import RpcResult, SchemaResult
from .rpc import check_capability
Expand Down
1 change: 1 addition & 0 deletions nornir_netconf/plugins/helpers/general.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""General Helpers."""

import logging
import os.path
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions nornir_netconf/plugins/helpers/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Data Models."""

from dataclasses import dataclass, field
from typing import List, Optional

Expand Down
1 change: 1 addition & 0 deletions nornir_netconf/plugins/helpers/rpc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helper to extract info from RPC reply."""

from typing import List


Expand Down
1 change: 1 addition & 0 deletions nornir_netconf/plugins/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Operations are separated into their own categorized folder.
"""

from .capabilities.netconf_capabilities import netconf_capabilities
from .editing.netconf_commit import netconf_commit
from .editing.netconf_edit_config import netconf_edit_config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""NETCONF capabilities."""

from nornir.core.task import Result, Task

from nornir_netconf.plugins.connections import CONNECTION_NAME
Expand Down
1 change: 1 addition & 0 deletions nornir_netconf/plugins/tasks/editing/netconf_commit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""NETCONF commit."""

from typing import Optional

from ncclient.manager import Manager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""NETCONF edit config."""

from typing import Optional

from ncclient.manager import Manager
Expand Down
1 change: 1 addition & 0 deletions nornir_netconf/plugins/tasks/editing/netconf_validate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""NETCONF validate config."""

from typing import Optional

from ncclient.manager import Manager
Expand Down
1 change: 1 addition & 0 deletions nornir_netconf/plugins/tasks/locking/netconf_lock.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""NETCONF lock."""

from typing import Optional

from ncclient.manager import Manager
Expand Down
1 change: 1 addition & 0 deletions nornir_netconf/plugins/tasks/retrieval/netconf_get.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""NETCONF get."""

from nornir.core.task import Optional, Result, Task

from nornir_netconf.plugins.connections import CONNECTION_NAME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""NETCONF get config."""

from typing import Any, Dict, Optional

from nornir.core.task import Result, Task
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""NETCONF Schemas."""

from ncclient.operations.rpc import RPCError
from nornir.core.task import List, Result, Task

Expand Down
1 change: 1 addition & 0 deletions nornir_netconf/plugins/tasks/rpc/netconf_rpc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""NETCONF rpc generic call."""

import re
from typing import Optional

Expand Down
1,723 changes: 1,151 additions & 572 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ packages = [

[tool.poetry.dependencies]
ncclient = "^0.6.9"
python = "^3.8"
python = "^3.9"
nornir = {version = "^3.0.0", allow-prereleases = true}


Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Conftest for nornir_netconf UnitTests."""

import os
import shutil
import time
Expand Down
1 change: 1 addition & 0 deletions tests/integration/arista/test_arista_connection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test NETCONF Connection."""

import os

from ncclient.capabilities import Capabilities
Expand Down
1 change: 1 addition & 0 deletions tests/integration/arista/test_arista_edit_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test Edit Config on Arista."""

from random import randint
from string import Template

Expand Down
1 change: 1 addition & 0 deletions tests/integration/arista/test_arista_get.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test NETCONF get."""

from nornir_netconf.plugins.tasks import netconf_get
from tests.conftest import xml_dict

Expand Down
1 change: 1 addition & 0 deletions tests/integration/arista/test_arista_lock.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test NETCONF lock - integration."""

from ncclient.manager import Manager
from ncclient.operations.rpc import RPCReply

Expand Down
1 change: 1 addition & 0 deletions tests/integration/arista/test_arista_rpc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test Edit Config on Arista."""

from random import randint
from string import Template

Expand Down
1 change: 1 addition & 0 deletions tests/integration/common/test_lock_operations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test NETCONF lock - integration."""

import pytest

from nornir_netconf.plugins.tasks import netconf_lock
Expand Down
1 change: 1 addition & 0 deletions tests/integration/common/test_schemas.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test Get Schemas from all vendors."""

from typing import Dict

from nornir.core.filter import F
Expand Down
1 change: 1 addition & 0 deletions tests/integration/iosxe/test_iosxe_edit_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration test configuration edits against IOSXE device."""

from random import randint
from string import Template

Expand Down
1 change: 1 addition & 0 deletions tests/integration/iosxe/test_iosxe_get.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration test against IOSXE device."""

# from nornir_utils.plugins.functions import print_result

from nornir_netconf.plugins.tasks import netconf_get
Expand Down
1 change: 1 addition & 0 deletions tests/integration/iosxe/test_iosxe_get_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration test against IOSXE device."""

# from nornir_utils.plugins.functions import print_result

from nornir_netconf.plugins.tasks import netconf_get_config
Expand Down
1 change: 1 addition & 0 deletions tests/integration/iosxr/test_iosxr_edit_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration test against IOSXR device."""

from random import randint
from string import Template

Expand Down
1 change: 1 addition & 0 deletions tests/integration/iosxr/test_iosxr_get.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration test against IOSXR device."""

from nornir_netconf.plugins.tasks import netconf_get
from tests.conftest import skip_integration_tests, xml_dict

Expand Down
1 change: 1 addition & 0 deletions tests/integration/iosxr/test_iosxr_get_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration test against IOSXR device."""

from nornir_netconf.plugins.tasks import netconf_get_config
from tests.conftest import CONFIGS_DIR, skip_integration_tests, xml_dict

Expand Down
1 change: 1 addition & 0 deletions tests/integration/sros/test_sros_edit_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration Testing Deploying L3VPN via Netconf to candidate datastore and committing."""

from nornir_utils.plugins.functions import print_result

from nornir_netconf.plugins.tasks import (
Expand Down
1 change: 1 addition & 0 deletions tests/integration/sros/test_sros_get.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration test against SROS device."""

# from nornir_utils.plugins.functions import print_result

from nornir_netconf.plugins.tasks import netconf_get
Expand Down
1 change: 1 addition & 0 deletions tests/integration/sros/test_sros_get_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration test against SROS device."""

# from nornir_utils.plugins.functions import print_result

from nornir_netconf.plugins.tasks import netconf_get_config
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_general_unit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Helpers Unit Tests."""

from nornir_netconf.plugins.helpers import check_file


Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_helpers_unit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test Helper functions."""

import os
import pathlib
from unittest.mock import patch
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_netconf_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
that conflicts with patching SSH on the next set of tests for edit_config.
Context manager doesn't help, but using a different DEVICE_NAME does.
"""

from unittest.mock import MagicMock, patch

from nornir_netconf.plugins.helpers import RpcResult
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_netconf_edit_config_unit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test NETCONF edit-config unit test."""

from unittest.mock import MagicMock, patch

from nornir_netconf.plugins.tasks import netconf_edit_config
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_netconf_lock_unit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test NETCONF Lock - unit-tests."""

from unittest.mock import MagicMock, patch

from nornir_netconf.plugins.tasks import netconf_lock
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_netconf_rpc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test NETCONF rpc unit test."""

from unittest.mock import MagicMock, patch

from nornir_netconf.plugins.tasks import netconf_rpc
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_netconf_schemas_unit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test NETCONF get schemas unit test."""

from unittest.mock import MagicMock, patch

from ncclient.operations.rpc import RPCError, to_ele
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_netconf_validate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test NETCONF validate unit test."""

from unittest.mock import MagicMock, patch

from nornir_netconf.plugins.tasks import netconf_validate
Expand Down

0 comments on commit 682baa9

Please sign in to comment.