Skip to content

Commit

Permalink
chore: remove planned deprecations for bumping 3.5.0
Browse files Browse the repository at this point in the history
- RHINENG-14089
- remove the relevant tests and doc entries
- and commit update done by black pre-commit hooks
- it will break some exiting tests in rules,
  hence, tests need to be updated accordingly

Signed-off-by: Xiangce Liu <[email protected]>
  • Loading branch information
xiangce committed Dec 16, 2024
1 parent 08fd76a commit a4c0b02
Show file tree
Hide file tree
Showing 108 changed files with 414 additions and 6,168 deletions.
26 changes: 13 additions & 13 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ that are executed. Contexts enable different collection methods for data for
each unique context, and also provide a default set of data sources that are
common among one or more contexts. All available contexts are defined in the
module :py:mod:`insights.core.context`.

.. _datasources-ref:

Data Sources
Expand All @@ -115,7 +115,7 @@ The Insights client stores that information as a file in an archive.
When the client uploads that information to the Red Hat Insights
service it is processed in the :py:class:`insights.core.context.HostArchiveContext`.
Because the ``fdisk -l`` data is now in a file in the archive the data sources
defined in :py:class:`insights.specs.insights_archive.InsightsArchiveSpecs` are
defined in :py:class:`insights.specs.insights_archive.InsightsArchiveSpecs` are
used instead. In this case Insights will collect the data from a file
named ``insights_commands/fdisk_-l``.

Expand Down Expand Up @@ -163,13 +163,13 @@ of data sources are listed below.

:py:func:`insights.core.spec_factory.simple_file`
simple_file collects the contents of files, for example::

auditd_conf = simple_file("/etc/audit/auditd.conf")
audit_log = simple_file("/var/log/audit/audit.log")

:py:func:`insights.core.spec_factory.simple_command`
simple_command collects the output from a command, for example::

blkid = simple_command("/sbin/blkid -c /dev/null")
brctl_show = simple_command("/usr/sbin/brctl show")

Expand All @@ -178,7 +178,7 @@ of data sources are listed below.
glob_file also can take a list of patterns as well as an ignore keyword
arg that is a regular expression telling it which of the matching files to throw out,
for example::

httpd_conf = glob_file(["/etc/httpd/conf/httpd.conf", "/etc/httpd/conf.d/*.conf"])
ifcfg = glob_file("/etc/sysconfig/network-scripts/ifcfg-*")
rabbitmq_logs = glob_file("/var/log/rabbitmq/rabbit@*.log", ignore=".*rabbit@.*(?<!-sasl).log$")
Expand All @@ -187,7 +187,7 @@ of data sources are listed below.
:py:func:`insights.core.spec_factory.first_file`
first_file collects the contents of the first readable file from a list
of files, for example::

meminfo = first_file(["/proc/meminfo", "/meminfo"])
postgresql_conf = first_file([
"/var/lib/pgsql/data/postgresql.conf",
Expand All @@ -198,7 +198,7 @@ of data sources are listed below.
:py:func:`insights.core.spec_factory.listdir`
listdir collects a simple directory listing of all the files and
directories in a path, for example::

block_devices = listdir("/sys/block")
ethernet_interfaces = listdir("/sys/class/net", context=HostContext)

Expand All @@ -208,7 +208,7 @@ of data sources are listed below.
elements or a list of tuples. This spec factory is typically utilized
in combination with a simple_file, simple_command or listdir spec factory
to generate the input elements, for example::

ceph_socket_files = listdir("/var/run/ceph/ceph-*.*.asok", context=HostContext)
ceph_config_show = foreach_execute(ceph_socket_files, "/usr/bin/ceph daemon %s config show")
ethernet_interfaces = listdir("/sys/class/net", context=HostContext)
Expand All @@ -219,7 +219,7 @@ of data sources are listed below.
the files at the resulting paths. This spec factory is typically utilized
in combination with a simple_command or listdir spec factory to generate
the input elements, for example::

httpd_pid = simple_command("/usr/bin/pgrep -o httpd")
httpd_limits = foreach_collect(httpd_pid, "/proc/%s/limits")
block_devices = listdir("/sys/block")
Expand All @@ -231,7 +231,7 @@ of data sources are listed below.
one must be present, or this component won't fire. This spec factory is
typically utilized in combination with other spec factories to generate
the input list, for example::

postgresql_log = first_of([glob_file("/var/lib/pgsql/data/pg_log/postgresql-*.log"),
glob_file("/opt/rh/postgresql92/root/var/lib/pgsql/data/pg_log/postgresql-*.log"),
glob_file("/database/postgresql-*.log")])
Expand Down Expand Up @@ -371,7 +371,7 @@ in the ``@rule`` decorator. This is best demonstrated by an example:
@rule(InstalledRpms, Lsof, Netstat)
def heartburn(installed_rpms, lsof, netstat):
# Rule implementation
Line 1 of this example indicates that the rule depends on 3 parsers,
``InstalledRpms``, ``Lsof``, and ``Netstat``. The signature for the
rule function on line 2 contains the parameters that correspond respectively
Expand Down Expand Up @@ -525,11 +525,11 @@ Insights-core release timeline
======= =====================
Version Expected release date
======= =====================
3.2.0 June 2023
3.3.0 December 2023
3.4.0 June 2024
3.5.0 December 2024
3.6.0 June 2025
3.7.0 December 2025
3.8.0 June 2026
======= =====================

.. note::
Expand Down
3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/dse_ldif_simple.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ldif_config.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_disk.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_docker_volumes.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_edac_mc.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_etc.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_ipa_idoverride_memberof.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_krb5_sssd.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_lib_firmware.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_ocp_cni_openshift_sdn.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_origin_local_volumes_pods.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_osroot.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_rsyslog_errorfile.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_systemd_units.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_tmp.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_usr_bin.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_usr_lib64.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_usr_sbin.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_cache_pulp.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_lib_mongodb.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_lib_nova_instances.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_lib_pcp.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_lib_rpm.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_lib_rsyslog.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_log.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_opt_mssql.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_opt_mssql_log.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_run.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_spool_clientmq.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_spool_postfix_maildrop.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_tmp.rst

This file was deleted.

3 changes: 0 additions & 3 deletions docs/shared_parsers_catalog/ls_var_www_perms.rst

This file was deleted.

7 changes: 4 additions & 3 deletions insights/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
from collections import defaultdict
from contextlib import contextmanager

from insights.core import (CommandParser, ContainerParser, FileListing, IniConfigFile, JSONParser, LegacyItemAccess, # noqa: F401
LogFileOutput, Parser, Scannable, SysconfigOptions, Syslog, XMLParser, YAMLParser, dr, # noqa: F401
taglang)
from insights.core import (CommandParser, ContainerParser, IniConfigFile, JSONParser, LegacyItemAccess, # noqa: F401
LogFileOutput, Parser, Scannable, SysconfigOptions, Syslog, XMLParser, YAMLParser, # noqa: F401
dr, taglang)
from insights.core.archives import COMPRESSION_TYPES, extract
from insights.core.context import (ClusterArchiveContext, ExecutionContext, HostContext, # noqa: F401
HostArchiveContext, SerializedArchiveContext)
Expand All @@ -42,6 +42,7 @@
from insights.core.spec_factory import RawFileProvider, TextFileProvider
from insights.formats import Formatter as FormatterClass, get_formatter
from insights.parsers import get_active_lines # noqa: F401
from insights.parsers.ls import FileListing # noqa: F401
from insights.util import defaults # noqa: F401

log = logging.getLogger(__name__)
Expand Down
Loading

0 comments on commit a4c0b02

Please sign in to comment.