Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Parser filter plugins #682

Conversation

rohitthakur2590
Copy link
Contributor

@rohitthakur2590 rohitthakur2590 commented Jan 15, 2025

Summary

This PR deprecates the following filter plugins in the ansible.netcommon collection:

  • parse_cli
  • parse_cli_textfsm
  • parse_xml

These plugins are replaced by their respective counterparts in the ansible.utils collection:

  • parse_clicli_parse
  • parse_cli_textfsmtextfsm_parser
  • parse_xmlxml_parser

Changes

  • Updated documentation with deprecation notices.
  • Updated plugin code to display deprecation warnings.

Impact

  • These plugins will remain functional .
  • They will be removed in a future release after 2027-02-01.

Migration

Users are encouraged to switch to the ansible.utils plugins:

  • Example for parse_cli:
Old usage:
 - name: Parse CLI output with TextFSM
      ansible.builtin.set_fact:
        parsed_output: "{{ cli_output | parse_cli_textfsm('templates/show_ip_interface_brief.textfsm') }}""
  New usage:
    - name: "Pass text and command"
      ansible.utils.cli_parse:
        text: "{{ lookup('ansible.builtin.file', 'show_ip_interface_brief.txt') }}"
        parser:
          name: ansible.utils.textfsm
          template_path: "templates/show_ip_interface_brief.textfsm"
      register: nxos_textfsm_text

@rohitthakur2590 rohitthakur2590 force-pushed the dprecate_parsing_filter_plugins branch from 54de698 to 896f04a Compare January 16, 2025 12:02
@rohitthakur2590 rohitthakur2590 force-pushed the dprecate_parsing_filter_plugins branch from 3749f79 to 9fb3248 Compare January 16, 2025 12:11
@rohitthakur2590 rohitthakur2590 added the deprecated This PR deprecates some feature(s). label Jan 16, 2025
@rohitthakur2590 rohitthakur2590 force-pushed the dprecate_parsing_filter_plugins branch from 8409972 to bff2532 Compare January 16, 2025 12:17
@rohitthakur2590 rohitthakur2590 force-pushed the dprecate_parsing_filter_plugins branch from 3ad8059 to a6c4831 Compare January 16, 2025 12:23
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
@rohitthakur2590 rohitthakur2590 merged commit 3185a94 into ansible-collections:main Jan 17, 2025
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecated This PR deprecates some feature(s).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants