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

nxos_vlan: vlan names containing regex ctl chars should be escaped #55463

Merged
merged 1 commit into from May 2, 2019

Conversation

chrisvanheuveln
Copy link
Contributor

SUMMARY

The nxos_vlan module may raise with regex error sre_constants.error: multiple repeat in the non_structured codepath if the device has existing vlan names with certain regex control characters; e.g. trailing asterisks:

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Eth1/3
14   my-vlan-name-is-***              active

The problem only occurs in the non_structured output codepath.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

modules/network/nxos/nxos_vlan.py

The `nxos_vlan` module may raise with regex error `sre_constants.error: multiple repeat` in the non_structured codepath if the device has existing vlan names with certain regex control characters; e.g.

```
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Eth1/3
14   my-vlan-name-is-***              active
```
@ansibot
Copy link
Contributor

ansibot commented Apr 17, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. cisco Cisco technologies core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. networking Network category nxos Cisco NXOS community owner_pr This PR is made by the module's maintainer. small_patch support:network This issue/PR relates to code supported by the Ansible Network Team. labels Apr 17, 2019
@trishnaguha trishnaguha self-assigned this Apr 24, 2019
@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Apr 24, 2019
@chrisvanheuveln
Copy link
Contributor Author

Please cherry-pick to stable2.8

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Apr 26, 2019
@trishnaguha trishnaguha merged commit de8ce08 into ansible:devel May 2, 2019
trishnaguha pushed a commit to trishnaguha/ansible that referenced this pull request May 8, 2019
…nsible#55463)

The `nxos_vlan` module may raise with regex error `sre_constants.error: multiple repeat` in the non_structured codepath if the device has existing vlan names with certain regex control characters; e.g.

```
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Eth1/3
14   my-vlan-name-is-***              active
```

(cherry picked from commit de8ce08)
abadger pushed a commit that referenced this pull request May 21, 2019
* nxos_vlan: vlan names containing regex ctl chars should be escaped (#55463)

The `nxos_vlan` module may raise with regex error `sre_constants.error: multiple repeat` in the non_structured codepath if the device has existing vlan names with certain regex control characters; e.g.

```
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Eth1/3
14   my-vlan-name-is-***              active
```

(cherry picked from commit de8ce08)

* fix nxos_vlan mode idempotence bug (#55144)

* fix nxos_vlan mode idempotence bug

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* Fix CI failure

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 57e0567)

* nxos_vlan fix 2.8 backport

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
@chrisvanheuveln chrisvanheuveln deleted the devel-nxos_vlan branch October 30, 2019 12:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. cisco Cisco technologies core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. networking Network category nxos Cisco NXOS community owner_pr This PR is made by the module's maintainer. small_patch stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:network This issue/PR relates to code supported by the Ansible Network Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants