mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-30 07:28:52 +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
|
|
@ -98,7 +98,7 @@ from ansible.module_utils.urls import fetch_url, basic_auth_header
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class AlertaInterface(object):
|
||||
class AlertaInterface:
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ class AlternativeState:
|
|||
return [cls.PRESENT, cls.SELECTED, cls.ABSENT, cls.AUTO]
|
||||
|
||||
|
||||
class AlternativesModule(object):
|
||||
class AlternativesModule:
|
||||
_UPDATE_ALTERNATIVES = None
|
||||
|
||||
def __init__(self, module):
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ def regexp_extraction(string, _regexp, groups=1):
|
|||
return None
|
||||
|
||||
|
||||
class BalancerMember(object):
|
||||
class BalancerMember:
|
||||
""" Apache 2.4 mod_proxy LB balancer member.
|
||||
attributes:
|
||||
read-only:
|
||||
|
|
@ -322,7 +322,7 @@ class BalancerMember(object):
|
|||
}
|
||||
|
||||
|
||||
class Balancer(object):
|
||||
class Balancer:
|
||||
""" Apache httpd 2.4 mod_proxy balancer object"""
|
||||
|
||||
def __init__(self, module, host, suffix, tls=False):
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ def _to_native_ascii(s):
|
|||
return to_native(s, errors='surrogate_or_strict', encoding='ascii')
|
||||
|
||||
|
||||
class Archive(object, metaclass=abc.ABCMeta):
|
||||
class Archive(metaclass=abc.ABCMeta):
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ import os
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class BE(object):
|
||||
class BE:
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ import os
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class Bower(object):
|
||||
class Bower:
|
||||
def __init__(self, module, **kwargs):
|
||||
self.module = module
|
||||
self.name = kwargs['name']
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ import os
|
|||
import tempfile
|
||||
|
||||
|
||||
class BtrfsSubvolumeModule(object):
|
||||
class BtrfsSubvolumeModule:
|
||||
|
||||
__BTRFS_ROOT_SUBVOLUME = '/'
|
||||
__BTRFS_ROOT_SUBVOLUME_ID = 5
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ import re
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class Bzr(object):
|
||||
class Bzr:
|
||||
def __init__(self, module, parent, dest, version, bzr_path):
|
||||
self.module = module
|
||||
self.parent = parent
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
OPS = ('=', '-', '+')
|
||||
|
||||
|
||||
class CapabilitiesModule(object):
|
||||
class CapabilitiesModule:
|
||||
platform = 'Linux'
|
||||
distribution = None
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ import re
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class Cargo(object):
|
||||
class Cargo:
|
||||
def __init__(self, module, **kwargs):
|
||||
self.module = module
|
||||
self.executable = [kwargs["executable"] or module.get_bin_path("cargo", True)]
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@ def join_str(sep, *args):
|
|||
return sep.join([str(arg) for arg in args])
|
||||
|
||||
|
||||
class CloudflareAPI(object):
|
||||
class CloudflareAPI:
|
||||
|
||||
cf_api_endpoint = 'https://api.cloudflare.com/client/v4'
|
||||
changed = False
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ def parse_service(module):
|
|||
)
|
||||
|
||||
|
||||
class ConsulService(object):
|
||||
class ConsulService:
|
||||
|
||||
def __init__(self, service_id=None, name=None, address=None, port=-1,
|
||||
tags=None, loaded=None):
|
||||
|
|
@ -458,7 +458,7 @@ class ConsulService(object):
|
|||
return data
|
||||
|
||||
|
||||
class ConsulCheck(object):
|
||||
class ConsulCheck:
|
||||
|
||||
def __init__(self, check_id, name, node=None, host='localhost',
|
||||
script=None, interval=None, ttl=None, notes=None, tcp=None, http=None, timeout=None, service_id=None):
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ def _respawn_dnf():
|
|||
respawn.respawn_module(interpreter)
|
||||
|
||||
|
||||
class CoprModule(object):
|
||||
class CoprModule:
|
||||
"""The class represents a copr module.
|
||||
|
||||
The class contains methods that take care of the repository state of a project,
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class CronVarError(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class CronVar(object):
|
||||
class CronVar:
|
||||
"""
|
||||
CronVar object to write variables to crontabs.
|
||||
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ def main():
|
|||
module.exit_json(changed=changed, msg=reason, **module.params)
|
||||
|
||||
|
||||
class Crypttab(object):
|
||||
class Crypttab:
|
||||
_lines: list[str]
|
||||
|
||||
def __init__(self, path):
|
||||
|
|
@ -207,7 +207,7 @@ class Crypttab(object):
|
|||
return crypttab
|
||||
|
||||
|
||||
class Line(object):
|
||||
class Line:
|
||||
def __init__(self, line=None, name=None, backing_device=None, password=None, opts=None):
|
||||
self.line = line
|
||||
self.name = name
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ with deps.declare("psutil"):
|
|||
import psutil
|
||||
|
||||
|
||||
class DBusWrapper(object):
|
||||
class DBusWrapper:
|
||||
"""
|
||||
Helper class that can be used for running a command with a working D-Bus
|
||||
session.
|
||||
|
|
@ -248,7 +248,7 @@ class DBusWrapper(object):
|
|||
return rc, out, err
|
||||
|
||||
|
||||
class DconfPreference(object):
|
||||
class DconfPreference:
|
||||
|
||||
def __init__(self, module, check_mode=False):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ import traceback
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class DeployHelper(object):
|
||||
class DeployHelper:
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ class InvalidVlanChangeError(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class VlanDiff(object):
|
||||
class VlanDiff:
|
||||
"""
|
||||
Represents differences between VLAN information (from CloudControl) and module parameters.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible.module_utils.urls import fetch_url
|
||||
|
||||
|
||||
class DME2(object):
|
||||
class DME2:
|
||||
|
||||
def __init__(self, apikey, secret, domain, sandbox, module):
|
||||
self.module = module
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt
|
||||
|
||||
|
||||
class EjabberdUser(object):
|
||||
class EjabberdUser:
|
||||
""" This object represents a user resource for an ejabberd server. The
|
||||
object manages user creation and deletion using ejabberdctl. The following
|
||||
commands are currently supported:
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
|
||||
|
||||
class Device(object):
|
||||
class Device:
|
||||
def __init__(self, module, path):
|
||||
self.module = module
|
||||
self.path = path
|
||||
|
|
@ -199,7 +199,7 @@ class Device(object):
|
|||
return self.path
|
||||
|
||||
|
||||
class Filesystem(object):
|
||||
class Filesystem:
|
||||
|
||||
MKFS: str | None = None
|
||||
MKFS_FORCE_FLAGS: list[str] | None = []
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ from ansible.module_utils.urls import fetch_url
|
|||
from re import findall
|
||||
|
||||
|
||||
class GithubDeployKey(object):
|
||||
class GithubDeployKey:
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ from ansible_collections.community.general.plugins.module_utils.datetime import
|
|||
)
|
||||
|
||||
|
||||
class GitHubResponse(object):
|
||||
class GitHubResponse:
|
||||
def __init__(self, response, info):
|
||||
self.content = response.read()
|
||||
self.info = info
|
||||
|
|
@ -158,7 +158,7 @@ class GitHubResponse(object):
|
|||
return links
|
||||
|
||||
|
||||
class GitHubSession(object):
|
||||
class GitHubSession:
|
||||
def __init__(self, module, token, api_url):
|
||||
self.module = module
|
||||
self.token = token
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitlabBranch(object):
|
||||
class GitlabBranch:
|
||||
|
||||
def __init__(self, module, project, gitlab_instance):
|
||||
self.repo = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitLabDeployKey(object):
|
||||
class GitLabDeployKey:
|
||||
def __init__(self, module, gitlab_instance):
|
||||
self._module = module
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitLabGroup(object):
|
||||
class GitLabGroup:
|
||||
def __init__(self, module, gitlab_instance):
|
||||
self._module = module
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
ACCESS_LEVELS = dict(guest=10, planner=15, reporter=20, developer=30, maintainer=40, owner=50)
|
||||
|
||||
|
||||
class GitLabGroupAccessToken(object):
|
||||
class GitLabGroupAccessToken:
|
||||
def __init__(self, module, gitlab_instance):
|
||||
self._module = module
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitLabGroup(object):
|
||||
class GitLabGroup:
|
||||
def __init__(self, module, gl):
|
||||
self._module = module
|
||||
self._gitlab = gl
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitlabGroupVariables(object):
|
||||
class GitlabGroupVariables:
|
||||
|
||||
def __init__(self, module, gitlab_instance):
|
||||
self.repo = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitLabHook(object):
|
||||
class GitLabHook:
|
||||
def __init__(self, module, gitlab_instance):
|
||||
self._module = module
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitlabInstanceVariables(object):
|
||||
class GitlabInstanceVariables:
|
||||
|
||||
def __init__(self, module, gitlab_instance):
|
||||
self.instance = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitlabIssue(object):
|
||||
class GitlabIssue:
|
||||
|
||||
def __init__(self, module, project, gitlab_instance):
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitlabLabels(object):
|
||||
class GitlabLabels:
|
||||
|
||||
def __init__(self, module, gitlab_instance, group_id, project_id):
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitlabMergeRequest(object):
|
||||
class GitlabMergeRequest:
|
||||
|
||||
def __init__(self, module, project, gitlab_instance):
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
from datetime import datetime
|
||||
|
||||
|
||||
class GitlabMilestones(object):
|
||||
class GitlabMilestones:
|
||||
|
||||
def __init__(self, module, gitlab_instance, group_id, project_id):
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
|
||||
|
||||
class GitLabProject(object):
|
||||
class GitLabProject:
|
||||
def __init__(self, module, gitlab_instance):
|
||||
self._module = module
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
ACCESS_LEVELS = dict(guest=10, planner=15, reporter=20, developer=30, maintainer=40, owner=50)
|
||||
|
||||
|
||||
class GitLabProjectAccessToken(object):
|
||||
class GitLabProjectAccessToken:
|
||||
def __init__(self, module, gitlab_instance):
|
||||
self._module = module
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitLabProjectMembers(object):
|
||||
class GitLabProjectMembers:
|
||||
def __init__(self, module, gl):
|
||||
self._module = module
|
||||
self._gitlab = gl
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitlabProjectVariables(object):
|
||||
class GitlabProjectVariables:
|
||||
|
||||
def __init__(self, module, gitlab_instance):
|
||||
self.repo = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitlabProtectedBranch(object):
|
||||
class GitlabProtectedBranch:
|
||||
|
||||
def __init__(self, module, project, gitlab_instance):
|
||||
self.repo = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
from ansible_collections.community.general.plugins.module_utils.version import LooseVersion
|
||||
|
||||
|
||||
class GitLabRunner(object):
|
||||
class GitLabRunner:
|
||||
def __init__(self, module, gitlab_instance, group=None, project=None):
|
||||
self._module = module
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ from ansible_collections.community.general.plugins.module_utils.gitlab import (
|
|||
)
|
||||
|
||||
|
||||
class GitLabUser(object):
|
||||
class GitLabUser:
|
||||
def __init__(self, module, gitlab_instance):
|
||||
self._module = module
|
||||
self._gitlab = gitlab_instance
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ class TimeoutException(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class HAProxy(object):
|
||||
class HAProxy:
|
||||
"""
|
||||
Used for communicating with HAProxy through its local UNIX socket interface.
|
||||
Perform common tasks in Haproxy related to enable server and
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
class Hg(object):
|
||||
class Hg:
|
||||
def __init__(self, module, dest, repo, revision, hg_path):
|
||||
self.module = module
|
||||
self.dest = dest
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ def _check_package_in_json(json_output, package_type):
|
|||
# /utils ------------------------------------------------------------------ }}}
|
||||
|
||||
|
||||
class Homebrew(object):
|
||||
class Homebrew:
|
||||
'''A class to manage Homebrew packages.'''
|
||||
|
||||
# class validations -------------------------------------------- {{{
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ def _create_regex_group_complement(s):
|
|||
# /utils ------------------------------------------------------------------ }}}
|
||||
|
||||
|
||||
class HomebrewCask(object):
|
||||
class HomebrewCask:
|
||||
'''A class to manage Homebrew casks.'''
|
||||
|
||||
# class regexes ------------------------------------------------ {{{
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ else:
|
|||
LEGACYCRYPT_IMPORT_ERROR = None
|
||||
|
||||
|
||||
class Homectl(object):
|
||||
class Homectl:
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
self.state = module.params['state']
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ def wait_for_delete(module, client, link):
|
|||
module.fail_json(msg=str(ex))
|
||||
|
||||
|
||||
class VpcRoutesArray(object):
|
||||
class VpcRoutesArray:
|
||||
def __init__(self, request, module):
|
||||
self.module = module
|
||||
if request:
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
# the stacktrace, which breaks the parsers.
|
||||
|
||||
|
||||
class Imgadm(object):
|
||||
class Imgadm:
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
self.params = module.params
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ from ansible.module_utils.basic import AnsibleModule, json
|
|||
from ansible.module_utils.urls import open_url
|
||||
|
||||
|
||||
class Infinity(object):
|
||||
class Infinity:
|
||||
"""
|
||||
Class for manage REST API calls with the Infinity.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
|
||||
class Namespace(object):
|
||||
class Namespace:
|
||||
"""Interface to network namespaces. """
|
||||
|
||||
def __init__(self, module):
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt
|
||||
|
||||
|
||||
class IPAKeytab(object):
|
||||
class IPAKeytab:
|
||||
def __init__(self, module, **kwargs):
|
||||
self.module = module
|
||||
self.path = kwargs['path']
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ USER_AGENT = 'ansible-community.general.ipbase_info/0.1.0'
|
|||
BASE_URL = 'https://api.ipbase.com/v2/info'
|
||||
|
||||
|
||||
class IpbaseInfo(object):
|
||||
class IpbaseInfo:
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ from ansible.module_utils.urls import fetch_url
|
|||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
|
||||
class IpifyFacts(object):
|
||||
class IpifyFacts:
|
||||
|
||||
def __init__(self):
|
||||
self.api_url = module.params.get('api_url')
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ from ansible.module_utils.urls import fetch_url
|
|||
USER_AGENT = 'ansible-ipinfoio-module/0.0.1'
|
||||
|
||||
|
||||
class IpinfoioFacts(object):
|
||||
class IpinfoioFacts:
|
||||
|
||||
def __init__(self, module):
|
||||
self.url = 'https://ipinfo.io/json'
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ record:
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class ResourceRecord(object):
|
||||
class ResourceRecord:
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
|||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
class JenkinsJob(object):
|
||||
class JenkinsJob:
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ class FailedInstallingWithPluginManager(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class JenkinsPlugin(object):
|
||||
class JenkinsPlugin:
|
||||
def __init__(self, module):
|
||||
# To be able to call fail_json
|
||||
self.module = module
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||
|
||||
|
||||
class TemporaryDirectory(object):
|
||||
class TemporaryDirectory:
|
||||
"""Basic backport of tempfile.TemporaryDirectory"""
|
||||
|
||||
def __init__(self, suffix="", prefix="tmp", dir=None):
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ from ansible.module_utils.basic import AnsibleModule, env_fallback
|
|||
from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt
|
||||
|
||||
|
||||
class IPAKeytab(object):
|
||||
class IPAKeytab:
|
||||
def __init__(self, module, **kwargs):
|
||||
self.module = module
|
||||
self.password = kwargs['password']
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ argument_spec = dict(
|
|||
)
|
||||
|
||||
|
||||
class LvgRename(object):
|
||||
class LvgRename:
|
||||
def __init__(self, module):
|
||||
'''
|
||||
Orchestrates the lvg_rename module logic.
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@ def create_script(command):
|
|||
os.remove(script_file)
|
||||
|
||||
|
||||
class LxcContainerManagement(object):
|
||||
class LxcContainerManagement:
|
||||
def __init__(self, module):
|
||||
"""Management of LXC containers via Ansible.
|
||||
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ CONFIG_PARAMS = [
|
|||
CONFIG_CREATION_PARAMS = ['source', 'type']
|
||||
|
||||
|
||||
class LXDContainerManagement(object):
|
||||
class LXDContainerManagement:
|
||||
def __init__(self, module):
|
||||
"""Management of LXC containers via Ansible.
|
||||
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ CONFIG_PARAMS = [
|
|||
]
|
||||
|
||||
|
||||
class LXDProfileManagement(object):
|
||||
class LXDProfileManagement:
|
||||
def __init__(self, module):
|
||||
"""Management of LXC profiles via Ansible.
|
||||
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ CONFIG_PARAMS = [
|
|||
]
|
||||
|
||||
|
||||
class LXDProjectManagement(object):
|
||||
class LXDProjectManagement:
|
||||
def __init__(self, module):
|
||||
"""Management of LXC projects via Ansible.
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
||||
|
||||
|
||||
class ManageIQAlertProfiles(object):
|
||||
class ManageIQAlertProfiles:
|
||||
""" Object to execute alert profile management operations in manageiq.
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
||||
|
||||
|
||||
class ManageIQAlert(object):
|
||||
class ManageIQAlert:
|
||||
""" Represent a ManageIQ alert. Can be initialized with both the format
|
||||
we receive from the server and the format we get from the user.
|
||||
"""
|
||||
|
|
@ -159,7 +159,7 @@ class ManageIQAlert(object):
|
|||
return self.__dict__ == other.__dict__
|
||||
|
||||
|
||||
class ManageIQAlerts(object):
|
||||
class ManageIQAlerts:
|
||||
""" Object to execute alert management operations in manageiq.
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
||||
|
||||
|
||||
class ManageIQgroup(object):
|
||||
class ManageIQgroup:
|
||||
"""
|
||||
Object to execute group management operations in manageiq.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -596,7 +596,7 @@ def delete_nulls(h):
|
|||
return h
|
||||
|
||||
|
||||
class ManageIQProvider(object):
|
||||
class ManageIQProvider:
|
||||
"""
|
||||
Object to execute provider management operations in manageiq.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
||||
|
||||
|
||||
class ManageIQTenant(object):
|
||||
class ManageIQTenant:
|
||||
"""
|
||||
Object to execute tenant management operations in manageiq.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible_collections.community.general.plugins.module_utils.manageiq import ManageIQ, manageiq_argument_spec
|
||||
|
||||
|
||||
class ManageIQUser(object):
|
||||
class ManageIQUser:
|
||||
"""
|
||||
Object to execute user management operations in manageiq.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ import platform
|
|||
NOT_WORKING_MAC_VERSION_MAS_ACCOUNT = '12.0'
|
||||
|
||||
|
||||
class Mas(object):
|
||||
class Mas:
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ def adjust_recursive_directory_permissions(pre_existing_dir, new_directory_list,
|
|||
return changed
|
||||
|
||||
|
||||
class Artifact(object):
|
||||
class Artifact:
|
||||
def __init__(self, group_id, artifact_id, version, version_by_spec, classifier='', extension='jar'):
|
||||
if not group_id:
|
||||
raise ValueError("group_id must be set")
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ MODULES_LOAD_LOCATION = '/etc/modules-load.d'
|
|||
PARAMETERS_FILES_LOCATION = '/etc/modprobe.d'
|
||||
|
||||
|
||||
class Modprobe(object):
|
||||
class Modprobe:
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class StatusValue(namedtuple("Status", "value, is_pending")):
|
|||
return f"{self.value}{' (pending)' if self.is_pending else ''}"
|
||||
|
||||
|
||||
class Status(object):
|
||||
class Status:
|
||||
MISSING = StatusValue(StatusValue.MISSING)
|
||||
OK = StatusValue(StatusValue.OK)
|
||||
RUNNING = StatusValue(StatusValue.OK)
|
||||
|
|
@ -105,7 +105,7 @@ class Status(object):
|
|||
EXECUTION_FAILED = StatusValue(StatusValue.EXECUTION_FAILED)
|
||||
|
||||
|
||||
class Monit(object):
|
||||
class Monit:
|
||||
def __init__(self, module, monit_bin_path, service_name, timeout):
|
||||
self.module = module
|
||||
self.monit_bin_path = monit_bin_path
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ def main():
|
|||
ansible_nagios.act()
|
||||
|
||||
|
||||
class Nagios(object):
|
||||
class Nagios:
|
||||
"""
|
||||
Perform common tasks in Nagios related to downtime and
|
||||
notifications.
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ from ansible.module_utils.urls import fetch_url
|
|||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
|
||||
class NginxStatusInfo(object):
|
||||
class NginxStatusInfo:
|
||||
|
||||
def __init__(self):
|
||||
self.url = module.params.get('url')
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible.module_utils.common.network import is_mac
|
||||
|
||||
|
||||
class NicTag(object):
|
||||
class NicTag:
|
||||
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
|
|
|||
|
|
@ -1690,7 +1690,7 @@ class NmcliModuleError(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class Nmcli(object):
|
||||
class Nmcli:
|
||||
"""
|
||||
This is the generic nmcli manipulation class that is subclassed based on platform.
|
||||
A subclass may wish to override the following action methods:-
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt
|
||||
|
||||
|
||||
class Npm(object):
|
||||
class Npm:
|
||||
def __init__(self, module, **kwargs):
|
||||
self.module = module
|
||||
self.glbl = kwargs['glbl']
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ except ImportError:
|
|||
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
|
||||
|
||||
|
||||
class RecordManager(object):
|
||||
class RecordManager:
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ class AnsibleModuleError(Exception):
|
|||
return self.results
|
||||
|
||||
|
||||
class OnePasswordInfo(object):
|
||||
class OnePasswordInfo:
|
||||
|
||||
def __init__(self):
|
||||
self.cli_path = module.params.get('cli_path')
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ RETURN = r"""
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class BackendProp(object):
|
||||
class BackendProp:
|
||||
|
||||
def __init__(self, module):
|
||||
self._module = module
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class OSXDefaultsException(Exception):
|
|||
# /exceptions -------------------------------------------------------------- }}}
|
||||
|
||||
# class MacDefaults -------------------------------------------------------- {{{
|
||||
class OSXDefaults(object):
|
||||
class OSXDefaults:
|
||||
""" Class to manage Mac OS user defaults """
|
||||
|
||||
# init ---------------------------------------------------------------- {{{
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from collections import defaultdict, namedtuple
|
||||
|
||||
|
||||
class Package(object):
|
||||
class Package:
|
||||
def __init__(self, name, source, source_is_URL=False):
|
||||
self.name = name
|
||||
self.source = source
|
||||
|
|
@ -267,7 +267,7 @@ class Package(object):
|
|||
VersionTuple = namedtuple("VersionTuple", ["current", "latest"])
|
||||
|
||||
|
||||
class Pacman(object):
|
||||
class Pacman:
|
||||
def __init__(self, module):
|
||||
self.m = module
|
||||
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ from ansible.module_utils.urls import fetch_url
|
|||
from ansible.module_utils.common.text.converters import to_native
|
||||
|
||||
|
||||
class GpgListResult(object):
|
||||
class GpgListResult:
|
||||
"""Wraps gpg --list-* output."""
|
||||
|
||||
def __init__(self, line):
|
||||
|
|
@ -176,7 +176,7 @@ def gpg_get_all_attrs_of_kind(lines, kind, attr):
|
|||
return result
|
||||
|
||||
|
||||
class PacmanKey(object):
|
||||
class PacmanKey:
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
# obtain binary paths for gpg & pacman-key
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ from ansible_collections.community.general.plugins.module_utils.datetime import
|
|||
)
|
||||
|
||||
|
||||
class PagerDutyRequest(object):
|
||||
class PagerDutyRequest:
|
||||
def __init__(self, module, name, user, token):
|
||||
self.module = module
|
||||
self.name = name
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ with deps.declare("pdpyras", url="https://github.com/PagerDuty/pdpyras"):
|
|||
from pdpyras import APISession, PDClientError
|
||||
|
||||
|
||||
class PagerDutyUser(object):
|
||||
class PagerDutyUser:
|
||||
def __init__(self, module, session):
|
||||
self._module = module
|
||||
self._apisession = session
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ RULE_ARG_REGEX = re.compile(r"(\[.*\]|\S*)")
|
|||
VALID_TYPES = ['account', '-account', 'auth', '-auth', 'password', '-password', 'session', '-session']
|
||||
|
||||
|
||||
class PamdLine(object):
|
||||
class PamdLine:
|
||||
|
||||
def __init__(self, line):
|
||||
self.line = line
|
||||
|
|
@ -403,7 +403,7 @@ class PamdRule(PamdLine):
|
|||
|
||||
# PamdService encapsulates an entire service and contains one or more rules. It seems the best way is to do this
|
||||
# as a doubly linked list.
|
||||
class PamdService(object):
|
||||
class PamdService:
|
||||
|
||||
def __init__(self, content):
|
||||
self._head = None
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class PSAdapterError(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class PSAdapter(object, metaclass=abc.ABCMeta):
|
||||
class PSAdapter(metaclass=abc.ABCMeta):
|
||||
NAME_ATTRS = ('name', 'cmdline')
|
||||
PATTERN_ATTRS = ('name', 'exe', 'cmdline')
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ def compare_lower(a, b):
|
|||
return a.lower() == b.lower()
|
||||
|
||||
|
||||
class Pids(object):
|
||||
class Pids:
|
||||
def __init__(self, module):
|
||||
|
||||
deps.validate(module)
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ import re
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class PackageState(object):
|
||||
class PackageState:
|
||||
PRESENT = 1
|
||||
NOT_INSTALLED = 2
|
||||
OUTDATED = 4
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ else:
|
|||
XMLTODICT_LIBRARY_IMPORT_ERROR = None
|
||||
|
||||
|
||||
class PersistentMemory(object):
|
||||
class PersistentMemory:
|
||||
def __init__(self):
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ import os
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class Pnpm(object):
|
||||
class Pnpm:
|
||||
def __init__(self, module, **kwargs):
|
||||
self.module = module
|
||||
self.name = kwargs["name"]
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ from ansible.module_utils.urls import fetch_url
|
|||
from ansible.module_utils.urls import url_argument_spec
|
||||
|
||||
|
||||
class pulp_server(object):
|
||||
class pulp_server:
|
||||
"""
|
||||
Class to interact with a Pulp server
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
from ansible.module_utils.urls import fetch_url
|
||||
|
||||
|
||||
class Pushover(object):
|
||||
class Pushover:
|
||||
''' Instantiates a pushover object, use it to send notifications '''
|
||||
base_uri = 'https://api.pushover.net'
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ from ansible.module_utils import distro
|
|||
SUBMAN_CMD = None
|
||||
|
||||
|
||||
class Rhsm(object):
|
||||
class Rhsm:
|
||||
|
||||
REDHAT_REPO = "/etc/yum.repos.d/redhat.repo"
|
||||
|
||||
|
|
@ -831,7 +831,7 @@ class Rhsm(object):
|
|||
rc, stdout, stderr = self.module.run_command(args, check_rc=False)
|
||||
|
||||
|
||||
class RhsmPool(object):
|
||||
class RhsmPool:
|
||||
'''
|
||||
Convenience class for housing subscription information
|
||||
'''
|
||||
|
|
@ -859,7 +859,7 @@ class RhsmPool(object):
|
|||
return False
|
||||
|
||||
|
||||
class RhsmPools(object):
|
||||
class RhsmPools:
|
||||
"""
|
||||
This class is used for manipulating pools subscriptions with RHSM
|
||||
"""
|
||||
|
|
@ -928,7 +928,7 @@ class RhsmPools(object):
|
|||
yield product
|
||||
|
||||
|
||||
class SysPurpose(object):
|
||||
class SysPurpose:
|
||||
"""
|
||||
This class is used for reading and writing to syspurpose.json file
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ changed = False
|
|||
failed = False
|
||||
|
||||
|
||||
class RHEVConn(object):
|
||||
class RHEVConn:
|
||||
'Connection to RHEV-M'
|
||||
|
||||
def __init__(self, module):
|
||||
|
|
@ -998,7 +998,7 @@ class RHEVConn(object):
|
|||
return True
|
||||
|
||||
|
||||
class RHEV(object):
|
||||
class RHEV:
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ from copy import deepcopy
|
|||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
class Rhsm(object):
|
||||
class Rhsm:
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
self.rhsm_bin = self.module.get_bin_path('subscription-manager', required=True)
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ from ansible_collections.community.general.plugins.module_utils.rundeck import (
|
|||
)
|
||||
|
||||
|
||||
class RundeckJobExecutionsInfo(object):
|
||||
class RundeckJobExecutionsInfo:
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
self.url = self.module.params["url"]
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ from ansible_collections.community.general.plugins.module_utils.rundeck import (
|
|||
)
|
||||
|
||||
|
||||
class RundeckJobRun(object):
|
||||
class RundeckJobRun:
|
||||
def __init__(self, module):
|
||||
self.module = module
|
||||
self.url = self.module.params["url"]
|
||||
|
|
|
|||
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