mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
Cleanup: remove unicode prefix, remove explicit inheritance from object (#11015)
* Address UP025: remove unicode literals from strings. * Address UP004: class inherits from 'object'.
This commit is contained in:
parent
f61847b116
commit
0c5466de47
242 changed files with 329 additions and 331 deletions
2
plugins/cache/memcached.py
vendored
2
plugins/cache/memcached.py
vendored
|
|
@ -66,7 +66,7 @@ except ImportError:
|
|||
display = Display()
|
||||
|
||||
|
||||
class ProxyClientPool(object):
|
||||
class ProxyClientPool:
|
||||
"""
|
||||
Memcached connection pooling for thread/fork safety. Inspired by py-redis
|
||||
connection pool.
|
||||
|
|
|
|||
|
|
@ -791,7 +791,7 @@ except ImportError:
|
|||
SUPPORTS_DATA_TAGGING = False
|
||||
|
||||
|
||||
class DummyStdout(object):
|
||||
class DummyStdout:
|
||||
def flush(self):
|
||||
pass
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ class HostData:
|
|||
self.finish = time.time()
|
||||
|
||||
|
||||
class ElasticSource(object):
|
||||
class ElasticSource:
|
||||
def __init__(self, display):
|
||||
self.ansible_playbook = ""
|
||||
self.session = str(uuid.uuid4())
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ from ansible_collections.community.general.plugins.module_utils.datetime import
|
|||
)
|
||||
|
||||
|
||||
class AzureLogAnalyticsSource(object):
|
||||
class AzureLogAnalyticsSource:
|
||||
def __init__(self):
|
||||
self.ansible_check_mode = False
|
||||
self.ansible_playbook = ""
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ from ansible.plugins.callback import CallbackBase
|
|||
# * Better formatting of output before sending out to logentries data/api nodes.
|
||||
|
||||
|
||||
class PlainTextSocketAppender(object):
|
||||
class PlainTextSocketAppender:
|
||||
def __init__(self, display, LE_API='data.logentries.com', LE_PORT=80, LE_TLS_PORT=443):
|
||||
|
||||
self.LE_API = LE_API
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ class HostData:
|
|||
self.finish = time_ns()
|
||||
|
||||
|
||||
class OpenTelemetrySource(object):
|
||||
class OpenTelemetrySource:
|
||||
def __init__(self, display):
|
||||
self.ansible_playbook = ""
|
||||
self.session = str(uuid.uuid4())
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ from ansible_collections.community.general.plugins.module_utils.datetime import
|
|||
)
|
||||
|
||||
|
||||
class SplunkHTTPCollectorSource(object):
|
||||
class SplunkHTTPCollectorSource:
|
||||
def __init__(self):
|
||||
self.ansible_check_mode = False
|
||||
self.ansible_playbook = ""
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ from ansible_collections.community.general.plugins.module_utils.datetime import
|
|||
)
|
||||
|
||||
|
||||
class SumologicHTTPCollectorSource(object):
|
||||
class SumologicHTTPCollectorSource:
|
||||
def __init__(self):
|
||||
self.ansible_check_mode = False
|
||||
self.ansible_playbook = ""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Alicloud only documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ from __future__ import annotations
|
|||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Dimension Data doc fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ from __future__ import annotations
|
|||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Dimension Data ("wait-for-completion" parameters) doc fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
venv:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Documentation fragment for VNX (emc_vnx)
|
||||
EMC_VNX = r'''
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# HPE 3PAR doc fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# HWC doc fragment.
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# ibm_storage documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
# Parameters for influxdb modules
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
# Parameters for FreeIPA/IPA modules
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
# Standard LDAP documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
notes:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
# Standard Pylxca documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
author:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard ManageIQ documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
DOCUMENTATION = r"""
|
||||
requirements:
|
||||
- See U(https://support.1password.com/command-line/)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# OneView doc fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
# OpenNebula common documentation
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from __future__ import annotations
|
|||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
DOCUMENTATION = r"""
|
||||
requirements:
|
||||
- Python SDK for Oracle Cloud Infrastructure U(https://oracle-cloud-infrastructure-python-sdk.readthedocs.io)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from __future__ import annotations
|
|||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
force_create:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from __future__ import annotations
|
|||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
display_name:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from __future__ import annotations
|
|||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
name:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from __future__ import annotations
|
|||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
defined_tags:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from __future__ import annotations
|
|||
#
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
wait:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
global:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Use together with the community.general.redfish module utils' REDFISH_COMMON_ARGUMENT_SPEC
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
# Common parameters for Redis modules
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard files documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Standard documentation fragment
|
||||
DOCUMENTATION = r"""
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
headers:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
|
||||
# Documentation fragment for Vexata VX100 series
|
||||
VX100 = r'''
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class ModuleDocFragment(object):
|
||||
class ModuleDocFragment:
|
||||
# Common parameters for XenServer modules
|
||||
DOCUMENTATION = r"""
|
||||
options:
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ def list_accumulate(sequence):
|
|||
return accumulate(sequence)
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
|
||||
def filters(self):
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ def counter(sequence):
|
|||
return result
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
''' Ansible counter jinja2 filters '''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ def dict_filter(sequence):
|
|||
return dict(sequence)
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
'''Ansible jinja2 filters'''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ def dict_kv(value, key):
|
|||
return {key: value}
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
''' Query filter '''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ def from_csv(data, dialect='excel', fieldnames=None, delimiter=None, skipinitial
|
|||
return data_list
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
|
||||
def filters(self):
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ def from_ini(obj):
|
|||
return parser.as_dict()
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
''' Query filter '''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ def groupby_as_dict(sequence, attribute):
|
|||
return result
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
''' Ansible list filters '''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ def hashids_decode(hashid, salt=None, alphabet=None, min_length=None):
|
|||
return list(nums)
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
|
||||
def filters(self):
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ def jc_filter(data, parser, quiet=True, raw=False):
|
|||
raise AnsibleFilterError(f'Error in jc filter plugin: {e}')
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
''' Query filter '''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ def json_query(data, expr):
|
|||
raise AnsibleFilterError(f'Error in jmespath.search in json_query filter plugin:\n{e}')
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
''' Query filter '''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ def keep_keys(data, target=None, matching_parameter='equal'):
|
|||
return [{k: v for k, v in d.items() if keep_key(k)} for d in data]
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
|
||||
def filters(self):
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ def do_symmetric_difference(a, b):
|
|||
return sym_diff
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
''' Ansible lists jinja2 filters '''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ def lists_mergeby(*terms, **kwargs):
|
|||
return result
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
''' Ansible list filters '''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ def remove_keys(data, target=None, matching_parameter='equal'):
|
|||
return [{k: v for k, v in d.items() if keep_key(k)} for d in data]
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
|
||||
def filters(self):
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ def replace_keys(data, target=None, matching_parameter='equal'):
|
|||
return [{replace_key(k): v for k, v in d.items()} for d in data]
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
|
||||
def filters(self):
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ def reveal_ansible_type(data, alias=None):
|
|||
return _ansible_type(data, alias)
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
|
||||
def filters(self):
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ def to_years(human_time, **kwargs):
|
|||
return to_time_unit(human_time, 'y', **kwargs)
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
''' Ansible time jinja2 filters '''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ def to_ini(obj):
|
|||
return ''.join(config.getvalue().rsplit(config.getvalue()[-1], 1))
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
''' Query filter '''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ def to_prettytable(data, *args, **kwargs):
|
|||
return to_text(table)
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
"""Ansible core jinja2 filters."""
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ def to_nice_yaml(value: t.Any, *, redact_sensitive_values: bool = False, indent:
|
|||
)
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
def filters(self):
|
||||
return {
|
||||
'to_yaml': to_yaml,
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ def unicode_normalize(data, form='NFC'):
|
|||
return normalize(form, data)
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
def filters(self):
|
||||
return {
|
||||
'unicode_normalize': unicode_normalize,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ def version_sort(value, reverse=False):
|
|||
return sorted(value, key=LooseVersion, reverse=reverse)
|
||||
|
||||
|
||||
class FilterModule(object):
|
||||
class FilterModule:
|
||||
''' Version sort filter '''
|
||||
|
||||
def filters(self):
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ class BitwardenException(AnsibleError):
|
|||
pass
|
||||
|
||||
|
||||
class Bitwarden(object):
|
||||
class Bitwarden:
|
||||
|
||||
def __init__(self, path='bw'):
|
||||
self._cli_path = path
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class BitwardenSecretsManagerException(AnsibleLookupError):
|
|||
pass
|
||||
|
||||
|
||||
class BitwardenSecretsManager(object):
|
||||
class BitwardenSecretsManager:
|
||||
def __init__(self, path='bws'):
|
||||
self._cli_path = path
|
||||
self._max_retries = 3
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ from ansible.utils.cmd_functions import run_cmd
|
|||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
|
||||
class Hiera(object):
|
||||
class Hiera:
|
||||
def __init__(self, hiera_cfg, hiera_bin):
|
||||
self.hiera_cfg = hiera_cfg
|
||||
self.hiera_bin = hiera_bin
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class LPassException(AnsibleError):
|
|||
pass
|
||||
|
||||
|
||||
class LPass(object):
|
||||
class LPass:
|
||||
|
||||
def __init__(self, path='lpass'):
|
||||
self._cli_path = path
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ def _lower_if_possible(value):
|
|||
return value
|
||||
|
||||
|
||||
class OnePassCLIBase(object, metaclass=abc.ABCMeta):
|
||||
class OnePassCLIBase(metaclass=abc.ABCMeta):
|
||||
bin = "op"
|
||||
|
||||
def __init__(
|
||||
|
|
@ -583,7 +583,7 @@ class OnePassCLIv2(OnePassCLIBase):
|
|||
return self._run(args, command_input=to_bytes(self.master_password))
|
||||
|
||||
|
||||
class OnePass(object):
|
||||
class OnePass:
|
||||
def __init__(self, subdomain=None, domain="1password.com", username=None, secret_key=None, master_password=None,
|
||||
service_account_token=None, account_id=None, connect_host=None, connect_token=None, cli_class=None):
|
||||
self.subdomain = subdomain
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ except ImportError:
|
|||
display = Display()
|
||||
|
||||
|
||||
class TSSClient(object, metaclass=abc.ABCMeta):
|
||||
class TSSClient(metaclass=abc.ABCMeta): # noqa: B024
|
||||
def __init__(self):
|
||||
self._client = None
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class StormConfig(SSHConfig):
|
|||
self._config.append(host)
|
||||
|
||||
|
||||
class ConfigParser(object):
|
||||
class ConfigParser:
|
||||
"""
|
||||
Config parser for ~/.ssh/config files.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class SdkManagerException(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class AndroidSdkManager(object):
|
||||
class AndroidSdkManager:
|
||||
_RE_INSTALLED_PACKAGES_HEADER = re.compile(r'^Installed packages:$')
|
||||
_RE_UPDATABLE_PACKAGES_HEADER = re.compile(r'^Available Updates:$')
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class BtrfsModuleException(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class BtrfsCommands(object):
|
||||
class BtrfsCommands:
|
||||
|
||||
"""
|
||||
Provides access to a subset of the Btrfs command line
|
||||
|
|
@ -102,7 +102,7 @@ class BtrfsCommands(object):
|
|||
result = self.__module.run_command(command, check_rc=True)
|
||||
|
||||
|
||||
class BtrfsInfoProvider(object):
|
||||
class BtrfsInfoProvider:
|
||||
|
||||
"""
|
||||
Utility providing details of the currently available btrfs filesystems
|
||||
|
|
@ -174,7 +174,7 @@ class BtrfsInfoProvider(object):
|
|||
raise BtrfsModuleException(f"Failed to find subvolid for mountpoint in options '{mount_options}'")
|
||||
|
||||
|
||||
class BtrfsSubvolume(object):
|
||||
class BtrfsSubvolume:
|
||||
|
||||
"""
|
||||
Wrapper class providing convenience methods for inspection of a btrfs subvolume
|
||||
|
|
@ -252,7 +252,7 @@ class BtrfsSubvolume(object):
|
|||
return self.__info['parent']
|
||||
|
||||
|
||||
class BtrfsFilesystem(object):
|
||||
class BtrfsFilesystem:
|
||||
|
||||
"""
|
||||
Wrapper class providing convenience methods for inspection of a btrfs filesystem
|
||||
|
|
@ -411,7 +411,7 @@ class BtrfsFilesystem(object):
|
|||
}
|
||||
|
||||
|
||||
class BtrfsFilesystemsProvider(object):
|
||||
class BtrfsFilesystemsProvider:
|
||||
|
||||
"""
|
||||
Provides methods to query available btrfs filesystems
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ def _full_jitter_backoff(retries=10, delay=3, max_delay=60, _random=random):
|
|||
return backoff_gen
|
||||
|
||||
|
||||
class CloudRetry(object):
|
||||
class CloudRetry:
|
||||
""" CloudRetry can be used by any cloud provider, in order to implement a
|
||||
backoff algorithm/retry effect based on Status Code from Exceptions.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class FormatError(CmdRunnerException):
|
|||
return f"Failed to format parameter {self.name} with value {self.value}: {self.exc}"
|
||||
|
||||
|
||||
class CmdRunner(object):
|
||||
class CmdRunner:
|
||||
"""
|
||||
Wrapper for ``AnsibleModule.run_command()``.
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ class CmdRunner(object):
|
|||
context = __call__
|
||||
|
||||
|
||||
class _CmdRunnerContext(object):
|
||||
class _CmdRunnerContext:
|
||||
def __init__(self, runner, args_order, output_process, check_mode_skip, check_mode_return, **kwargs):
|
||||
self.runner = runner
|
||||
self.args_order = tuple(args_order)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ def _ensure_list(value):
|
|||
return list(value) if is_sequence(value) else [value]
|
||||
|
||||
|
||||
class _ArgFormat(object):
|
||||
class _ArgFormat:
|
||||
def __init__(self, func, ignore_none=True, ignore_missing_value=False):
|
||||
self.func = func
|
||||
self.ignore_none = ignore_none
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ from ansible.module_utils.basic import missing_required_lib
|
|||
_deps = dict()
|
||||
|
||||
|
||||
class _Dependency(object):
|
||||
class _Dependency:
|
||||
_states = ["pending", "failure", "success"]
|
||||
|
||||
def __init__(self, name, reason=None, url=None, msg=None):
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ except ImportError:
|
|||
MCP_2_LOCATION_NAME_PATTERN = re.compile(r".*MCP\s?2.*")
|
||||
|
||||
|
||||
class DimensionDataModule(object):
|
||||
class DimensionDataModule:
|
||||
"""
|
||||
The base class containing common functionality used by Dimension Data modules for Ansible.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ from ansible.module_utils.common.text.converters import to_text
|
|||
from ansible.module_utils.urls import fetch_url
|
||||
|
||||
|
||||
class GandiLiveDNSAPI(object):
|
||||
class GandiLiveDNSAPI:
|
||||
|
||||
api_endpoint = 'https://api.gandi.net/v5/livedns'
|
||||
changed = False
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ def _create_regex_group_complement(s):
|
|||
return re.compile(group)
|
||||
|
||||
|
||||
class HomebrewValidate(object):
|
||||
class HomebrewValidate:
|
||||
# class regexes ------------------------------------------------ {{{
|
||||
VALID_PATH_CHARS = rf"""
|
||||
\w # alphanumeric characters (i.e., [a-zA-Z0-9_])
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ def session_method_wrapper(f):
|
|||
return _wrap
|
||||
|
||||
|
||||
class _ServiceClient(object):
|
||||
class _ServiceClient:
|
||||
def __init__(self, client, endpoint, product):
|
||||
self._client = client
|
||||
self._endpoint = endpoint
|
||||
|
|
@ -140,7 +140,7 @@ class _ServiceClient(object):
|
|||
return header
|
||||
|
||||
|
||||
class Config(object):
|
||||
class Config:
|
||||
def __init__(self, module, product):
|
||||
self._project_client = None
|
||||
self._domain_client = None
|
||||
|
|
@ -252,7 +252,7 @@ class HwcModule(AnsibleModule):
|
|||
super(HwcModule, self).__init__(*args, **kwargs)
|
||||
|
||||
|
||||
class _DictComparison(object):
|
||||
class _DictComparison:
|
||||
''' This class takes in two dictionaries `a` and `b`.
|
||||
These are dictionaries of arbitrary depth, but made up of standard
|
||||
Python types only.
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ def is_struct_included(struct1, struct2, exclude=None):
|
|||
return to_text(struct1, 'utf-8') == to_text(struct2, 'utf-8')
|
||||
|
||||
|
||||
class KeycloakAPI(object):
|
||||
class KeycloakAPI:
|
||||
""" Keycloak API access; Keycloak uses OAuth 2.0 to protect its API, an access token for which
|
||||
is obtained through OpenID connect
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ def _env_then_dns_fallback(*args, **kwargs):
|
|||
raise AnsibleFallbackNotFound
|
||||
|
||||
|
||||
class IPAClient(object):
|
||||
class IPAClient:
|
||||
def __init__(self, module, host, port, protocol):
|
||||
self.host = host
|
||||
self.port = port
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ def ldap_required_together():
|
|||
return [['client_cert', 'client_key']]
|
||||
|
||||
|
||||
class LdapGeneric(object):
|
||||
class LdapGeneric:
|
||||
def __init__(self, module):
|
||||
# Shortcuts
|
||||
self.module = module
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class LXDClientException(Exception):
|
|||
self.kwargs = kwargs
|
||||
|
||||
|
||||
class LXDClient(object):
|
||||
class LXDClient:
|
||||
def __init__(self, url, key_file=None, cert_file=None, debug=False, server_cert_file=None, server_check_hostname=True):
|
||||
"""LXD Client.
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ def manageiq_entities():
|
|||
}
|
||||
|
||||
|
||||
class ManageIQ(object):
|
||||
class ManageIQ:
|
||||
"""
|
||||
class encapsulating ManageIQ API client.
|
||||
"""
|
||||
|
|
@ -177,7 +177,7 @@ class ManageIQ(object):
|
|||
self.module.fail_json(msg=msg)
|
||||
|
||||
|
||||
class ManageIQPolicies(object):
|
||||
class ManageIQPolicies:
|
||||
"""
|
||||
Object to execute policies management operations of manageiq resources.
|
||||
"""
|
||||
|
|
@ -329,7 +329,7 @@ class ManageIQPolicies(object):
|
|||
msg=f"Successfully {action}ed profiles: {profiles}")
|
||||
|
||||
|
||||
class ManageIQTags(object):
|
||||
class ManageIQTags:
|
||||
"""
|
||||
Object to execute tags management operations of manageiq resources.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ from ansible.module_utils.basic import json
|
|||
import urllib.error as urllib_error
|
||||
|
||||
|
||||
class Response(object):
|
||||
class Response:
|
||||
'''
|
||||
Create a response object to mimic that of requests.
|
||||
'''
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ from ansible_collections.community.general.plugins.module_utils.mh.exceptions im
|
|||
from ansible_collections.community.general.plugins.module_utils.mh.deco import module_fails_on_exception
|
||||
|
||||
|
||||
class ModuleHelperBase(object):
|
||||
class ModuleHelperBase:
|
||||
module: dict[str, t.Any] | None = None # TODO: better spec using t.TypedDict
|
||||
ModuleHelperException = _MHE
|
||||
_delegated_to_module: tuple[str, ...] = (
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ from __future__ import annotations
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class DeprecateAttrsMixin(object):
|
||||
class DeprecateAttrsMixin:
|
||||
|
||||
def _deprecate_setup(self, attr, target, module):
|
||||
if target is None:
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
|
||||
class StateMixin(object):
|
||||
class StateMixin:
|
||||
state_param: str = 'state'
|
||||
default_state: str | None = None
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ DELETE_HEADERS = {'accept': 'application/json'}
|
|||
HEALTH_OK = 5
|
||||
|
||||
|
||||
class OcapiUtils(object):
|
||||
class OcapiUtils:
|
||||
|
||||
def __init__(self, creds, base_uri, proxy_slot_number, timeout, module):
|
||||
self.root_uri = base_uri
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from __future__ import annotations
|
|||
import os
|
||||
|
||||
|
||||
class OnePasswordConfig(object):
|
||||
class OnePasswordConfig:
|
||||
_config_file_paths = (
|
||||
"~/.op/config",
|
||||
"~/.config/op/config",
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ class OneViewModuleResourceNotFound(OneViewModuleException):
|
|||
pass
|
||||
|
||||
|
||||
class OneViewModuleBase(object, metaclass=abc.ABCMeta):
|
||||
class OneViewModuleBase(metaclass=abc.ABCMeta):
|
||||
MSG_CREATED = 'Resource created successfully.'
|
||||
MSG_UPDATED = 'Resource updated successfully.'
|
||||
MSG_DELETED = 'Resource deleted successfully.'
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class OnlineException(Exception):
|
|||
self.message = message
|
||||
|
||||
|
||||
class Response(object):
|
||||
class Response:
|
||||
|
||||
def __init__(self, resp, info):
|
||||
self.body = None
|
||||
|
|
@ -55,7 +55,7 @@ class Response(object):
|
|||
return self.status_code in (200, 201, 202, 204)
|
||||
|
||||
|
||||
class Online(object):
|
||||
class Online:
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue