-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update cli_parse plugins and testcase (#182)
Update cli_parse plugins and testcase Reviewed-by: https://github.com/apps/ansible-zuul
- Loading branch information
Showing
38 changed files
with
460 additions
and
618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
extends: default | ||
|
||
ignore: | | ||
.tox | ||
\.tox | ||
changelogs/* | ||
|
||
rules: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
deprecated_features: | ||
- Deprecate cli_parse module and textfsm, ttp, xml, json parser plugins as they | ||
are moved to ansible.utils collection (https://github.com/ansible-collections/ansible.netcommon/pull/182 | ||
https://github.com/ansible-collections/ansible.utils/pull/28) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.. _ansible.netcommon.native_cli_parsers: | ||
|
||
|
||
************************ | ||
ansible.netcommon.native | ||
************************ | ||
|
||
**Define configurable options for ``native`` sub-plugin of ``cli_parse`` module** | ||
|
||
|
||
Version added: 1.0.0 | ||
|
||
.. contents:: | ||
:local: | ||
:depth: 1 | ||
|
||
|
||
Synopsis | ||
-------- | ||
- This plugin documentation provides the configurable options that can be passed to the *ansible.utils.cli_parse* plugins when *ansible.netcommon.native* is used as a value for *name* option. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Examples | ||
-------- | ||
|
||
.. code-block:: yaml | ||
- name: "Run command and parse with native" | ||
ansible.utils.cli_parse: | ||
command: "show interface" | ||
parser: | ||
name: ansible.netcommon.native | ||
set_fact: POpqMQoJWTiDpEW | ||
register: nxos_native_command | ||
- name: "Pass text and template_path" | ||
ansible.utils.cli_parse: | ||
text: "{{ nxos_native_command['stdout'] }}" | ||
parser: | ||
name: ansible.netcommon.native | ||
template_path: "/home/user/templates/nxos_show_interface.yaml" | ||
register: nxos_native_text | ||
Status | ||
------ | ||
|
||
|
||
Authors | ||
~~~~~~~ | ||
|
||
- Bradley Thornton (@cidrblock) | ||
|
||
|
||
.. hint:: | ||
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
.. _ansible.netcommon.ntc_templates_cli_parsers: | ||
|
||
|
||
******************************* | ||
ansible.netcommon.ntc_templates | ||
******************************* | ||
|
||
**Define configurable options for ``ntc_templates`` sub-plugin of ``cli_parse`` module** | ||
|
||
|
||
Version added: 1.0.0 | ||
|
||
.. contents:: | ||
:local: | ||
:depth: 1 | ||
|
||
|
||
Synopsis | ||
-------- | ||
- This plugin documentation provides the configurable options that can be passed to the *ansible.utils.cli_parse* plugins when *ansible.netcommon.ntc_templates* is used as a value for *name* option. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Examples | ||
-------- | ||
|
||
.. code-block:: yaml | ||
- name: "Run command and parse with ntc_templates" | ||
ansible.utils.cli_parse: | ||
command: "show interface" | ||
parser: | ||
name: ansible.netcommon.ntc_templates | ||
register: nxos_ntc_templates_command | ||
- name: "Pass text and command" | ||
ansible.utils.cli_parse: | ||
text: "{{ nxos_ntc_templates_command['stdout'] }}" | ||
parser: | ||
name: ansible.netcommon.ntc_templates | ||
command: show interface | ||
register: nxos_ntc_templates_text | ||
Status | ||
------ | ||
|
||
|
||
Authors | ||
~~~~~~~ | ||
|
||
- Bradley Thornton (@cidrblock) | ||
|
||
|
||
.. hint:: | ||
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
.. _ansible.netcommon.pyats_cli_parsers: | ||
|
||
|
||
*********************** | ||
ansible.netcommon.pyats | ||
*********************** | ||
|
||
**Define configurable options for ``pyats`` sub-plugin of ``cli_parse`` module** | ||
|
||
|
||
Version added: 1.0.0 | ||
|
||
.. contents:: | ||
:local: | ||
:depth: 1 | ||
|
||
|
||
Synopsis | ||
-------- | ||
- This plugin documentation provides the configurable options that can be passed to the *ansible.utils.cli_parse* plugins when *ansible.netcommon.pyats* is used as a value for *name* option. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
Examples | ||
-------- | ||
|
||
.. code-block:: yaml | ||
- name: "Run command and parse with pyats" | ||
ansible.utils.cli_parse: | ||
command: "show interface" | ||
parser: | ||
name: ansible.netcommon.pyats | ||
register: nxos_pyats_command | ||
- name: "Pass text and command" | ||
ansible.utils.cli_parse: | ||
text: "{{ nxos_pyats_command['stdout'] }}" | ||
parser: | ||
name: ansible.netcommon.pyats | ||
command: show interface | ||
register: nxos_pyats_text | ||
Status | ||
------ | ||
|
||
|
||
Authors | ||
~~~~~~~ | ||
|
||
- Bradley Thornton (@cidrblock) | ||
|
||
|
||
.. hint:: | ||
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.