Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 21, 2023
1 parent 8eec053 commit 6aa8e1f
Show file tree
Hide file tree
Showing 85 changed files with 182 additions and 3 deletions.
1 change: 1 addition & 0 deletions plugins/action/cli_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

from ansible_collections.ansible.netcommon.plugins.action.network import (
Expand Down
1 change: 1 addition & 0 deletions plugins/action/cli_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

from ansible_collections.ansible.netcommon.plugins.action.network import (
Expand Down
1 change: 1 addition & 0 deletions plugins/action/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

from ansible_collections.ansible.netcommon.plugins.action.network import (
Expand Down
2 changes: 2 additions & 0 deletions plugins/action/net_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

import hashlib
Expand All @@ -18,6 +19,7 @@
from ansible.plugins.action import ActionBase
from ansible.utils.display import Display


display = Display()


Expand Down
2 changes: 2 additions & 0 deletions plugins/action/net_ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

import copy
Expand All @@ -12,6 +13,7 @@
from ansible.plugins.action import ActionBase
from ansible.utils.display import Display


display = Display()


Expand Down
2 changes: 2 additions & 0 deletions plugins/action/net_put.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

import hashlib
Expand All @@ -17,6 +18,7 @@
from ansible.plugins.action import ActionBase
from ansible.utils.display import Display


display = Display()


Expand Down
3 changes: 3 additions & 0 deletions plugins/action/netconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

import copy
import sys

from ansible.utils.display import Display

from ansible_collections.ansible.netcommon.plugins.action.network import (
ActionModule as ActionNetworkModule,
)


display = Display()


Expand Down
2 changes: 2 additions & 0 deletions plugins/action/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

import os
Expand All @@ -19,6 +20,7 @@
from ansible.utils.display import Display
from ansible.utils.hashing import checksum, checksum_s


display = Display()

DEXEC_PREFIX = "ANSIBLE_NETWORK_IMPORT_MODULES:"
Expand Down
5 changes: 5 additions & 0 deletions plugins/action/network_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

import copy
import glob
import os

from importlib import import_module


try:
import yaml

Expand All @@ -27,10 +30,12 @@
from ansible.errors import AnsibleActionFail, AnsibleError
from ansible.module_utils._text import to_text
from ansible.utils.display import Display

from ansible_collections.ansible.netcommon.plugins.action.network import (
ActionModule as ActionNetworkModule,
)


display = Display()


Expand Down
3 changes: 3 additions & 0 deletions plugins/action/telnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

from time import sleep
Expand All @@ -13,8 +14,10 @@
from ansible.module_utils.six import text_type
from ansible.plugins.action import ActionBase
from ansible.utils.display import Display

from ansible_collections.ansible.netcommon.plugins.plugin_utils.compat import telnetlib


display = Display()


Expand Down
1 change: 1 addition & 0 deletions plugins/become/enable.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

DOCUMENTATION = """
Expand Down
1 change: 1 addition & 0 deletions plugins/cache/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

DOCUMENTATION = """
Expand Down
2 changes: 2 additions & 0 deletions plugins/connection/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

DOCUMENTATION = """
Expand Down Expand Up @@ -145,6 +146,7 @@
from ansible.errors import AnsibleConnectionFailure, AnsibleError
from ansible.plugins.connection import NetworkConnectionBase


try:
from grpc import insecure_channel, secure_channel, ssl_channel_credentials
from grpc.beta import implementations
Expand Down
2 changes: 2 additions & 0 deletions plugins/connection/httpapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

DOCUMENTATION = """
Expand Down Expand Up @@ -167,6 +168,7 @@
from ansible.plugins.connection import ensure_connect
from ansible.plugins.loader import httpapi_loader
from ansible.release import __version__ as ANSIBLE_CORE_VERSION

from ansible_collections.ansible.netcommon.plugins.plugin_utils.connection_base import (
NetworkConnectionBase,
)
Expand Down
4 changes: 4 additions & 0 deletions plugins/connection/libssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

DOCUMENTATION = """
Expand Down Expand Up @@ -192,6 +193,7 @@
import re
import socket
import sys

from termios import TCIFLUSH, tcflush

from ansible.errors import AnsibleConnectionFailure, AnsibleError, AnsibleFileNotFound
Expand All @@ -200,8 +202,10 @@
from ansible.module_utils.six.moves import input
from ansible.plugins.connection import ConnectionBase
from ansible.utils.display import Display

from ansible_collections.ansible.netcommon.plugins.plugin_utils.version import Version


display = Display()

try:
Expand Down
3 changes: 3 additions & 0 deletions plugins/connection/netconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

DOCUMENTATION = """
Expand Down Expand Up @@ -161,11 +162,13 @@
from ansible.playbook.play_context import PlayContext
from ansible.plugins.connection import ensure_connect
from ansible.plugins.loader import netconf_loader

from ansible_collections.ansible.netcommon.plugins.plugin_utils.connection_base import (
NetworkConnectionBase,
)
from ansible_collections.ansible.netcommon.plugins.plugin_utils.version import Version


try:
from ncclient import __version__ as NCCLIENT_VERSION
from ncclient import manager
Expand Down
4 changes: 4 additions & 0 deletions plugins/connection/network_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

DOCUMENTATION = """
Expand Down Expand Up @@ -306,6 +307,7 @@
import socket
import time
import traceback

from functools import wraps
from io import BytesIO

Expand All @@ -316,12 +318,14 @@
from ansible.module_utils.six.moves import cPickle
from ansible.playbook.play_context import PlayContext
from ansible.plugins.loader import cache_loader, cliconf_loader, connection_loader, terminal_loader

from ansible_collections.ansible.netcommon.plugins.connection.libssh import HAS_PYLIBSSH
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import to_list
from ansible_collections.ansible.netcommon.plugins.plugin_utils.connection_base import (
NetworkConnectionBase,
)


try:
from scp import SCPClient

Expand Down
2 changes: 2 additions & 0 deletions plugins/connection/persistent.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

DOCUMENTATION = """
Expand All @@ -24,6 +25,7 @@
from ansible.plugins.connection import ConnectionBase
from ansible.utils.display import Display


display = Display()


Expand Down
1 change: 1 addition & 0 deletions plugins/doc_fragments/connection_persistent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type


Expand Down
1 change: 1 addition & 0 deletions plugins/doc_fragments/network_agnostic.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function


__metaclass__ = type

# Copyright: (c) 2019 Ansible, Inc
Expand Down
4 changes: 4 additions & 0 deletions plugins/filter/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
# Make coding more python3-ish
from __future__ import absolute_import, division, print_function


__metaclass__ = type

import os
import re
import string
import traceback

from xml.etree.ElementTree import fromstring

from ansible.errors import AnsibleError, AnsibleFilterError
Expand All @@ -20,8 +22,10 @@
from ansible.module_utils.six import iteritems, string_types
from ansible.utils.display import Display
from ansible.utils.encrypt import passlib_or_crypt, random_password

from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import Template


try:
import yaml

Expand Down
5 changes: 4 additions & 1 deletion plugins/filter/pop_ace.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"""
from __future__ import absolute_import, division, print_function


__metaclass__ = type

DOCUMENTATION = """
Expand Down Expand Up @@ -992,11 +993,13 @@
"""

from ansible.errors import AnsibleFilterError
from ansible_collections.ansible.netcommon.plugins.plugin_utils.pop_ace import pop_ace
from ansible_collections.ansible.utils.plugins.module_utils.common.argspec_validate import (
AnsibleArgSpecValidator,
)

from ansible_collections.ansible.netcommon.plugins.plugin_utils.pop_ace import pop_ace


try:
from jinja2.filters import pass_environment
except ImportError:
Expand Down
3 changes: 3 additions & 0 deletions plugins/httpapi/restconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import absolute_import, division, print_function


__metaclass__ = type

DOCUMENTATION = """
Expand All @@ -29,8 +30,10 @@
from ansible.module_utils._text import to_text
from ansible.module_utils.connection import ConnectionError
from ansible.module_utils.six.moves.urllib.error import HTTPError

from ansible_collections.ansible.netcommon.plugins.plugin_utils.httpapi_base import HttpApiBase


CONTENT_TYPE = "application/yang-data+json"


Expand Down
1 change: 1 addition & 0 deletions plugins/module_utils/cli_parser/cli_parserbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"""
from __future__ import absolute_import, division, print_function


__metaclass__ = type

# TODO: Remove this file after ansible.netcommon.cli_parse module is removed
Expand Down
Loading

0 comments on commit 6aa8e1f

Please sign in to comment.