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

Disable nxapi test for nxos_banner #29088

Merged
merged 1 commit into from Sep 7, 2017

Conversation

Projects
None yet
1 participant
@trishnaguha
Member

trishnaguha commented Sep 7, 2017

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

SUMMARY

Disable nxapi test as multiline string idempotence fails there with strange reason.
\n gets replaced with the string hostname.
Ref: #28607

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

test/integration/targets/nxos_banner/tasks/main.yaml

ANSIBLE VERSION
2.4
Disable nxapi test for nxos_banner
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

@trishnaguha trishnaguha added this to the 2.4.0 milestone Sep 7, 2017

@trishnaguha trishnaguha merged commit 757983d into ansible:devel Sep 7, 2017

1 check was pending

Shippable Run 36397 status is WAITING.
Details

@trishnaguha trishnaguha deleted the trishnaguha:nxos_banner_disable_nxapi_test branch Sep 7, 2017

trishnaguha added a commit to trishnaguha/ansible that referenced this pull request Sep 11, 2017

Disable nxapi test for nxos_banner (ansible#29088)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 757983d)

abadger added a commit that referenced this pull request Sep 11, 2017

Disable nxapi test for nxos_banner (#29088)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 757983d)

prasadkatti pushed a commit to prasadkatti/ansible that referenced this pull request Oct 1, 2017

Disable nxapi test for nxos_banner (ansible#29088)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
@trishnaguha

This comment has been minimized.

Show comment
Hide comment
@trishnaguha

trishnaguha Jan 10, 2018

Member

@mikewiebe NXOS 7K. Image version: 7.3(0)D1(1).
Playbook:

    - name: nxos_banner test
      nxos_banner: &exec
        banner: exec
        text: |
          this is my exec banner
          that has a multiline
          string
        state: present
        provider: "{{ nxapi }}"

    - name: Set exec again (idempotent)
      nxos_banner: *exec

What actually happens during play:

&exec: Works as expected
 1.9s main: 
      want={'banner': 'exec', 'state': 'present', 'text': 'this is my exec banner\nthat has a multiline\nstring'}
 1.9s main: have={'banner': 'exec', 'state': 'absent'}
commands=["banner exec @\nthis is my exec banner\nthat has a multiline\nstring\n@"]

When we fetch the banner text from the device to make it idempotent, what we get:

*exec:
 1.5s main: 
      want={'banner': 'exec', 'state': 'present', 'text': 'this is my exec banner\nthat has a multiline\nstring'}
 1.5s main: 
      have={'banner': 'exec', 'state': 'present', 'text': u'\\$(hostname)this is my exec banner\\$(hostnam... has a multiline\\$(hostname)string\\$(hostname)'

have['text'] string \n gets replaced by the string hostname which I have no idea why.
This makes idempotence test fail.

Member

trishnaguha commented Jan 10, 2018

@mikewiebe NXOS 7K. Image version: 7.3(0)D1(1).
Playbook:

    - name: nxos_banner test
      nxos_banner: &exec
        banner: exec
        text: |
          this is my exec banner
          that has a multiline
          string
        state: present
        provider: "{{ nxapi }}"

    - name: Set exec again (idempotent)
      nxos_banner: *exec

What actually happens during play:

&exec: Works as expected
 1.9s main: 
      want={'banner': 'exec', 'state': 'present', 'text': 'this is my exec banner\nthat has a multiline\nstring'}
 1.9s main: have={'banner': 'exec', 'state': 'absent'}
commands=["banner exec @\nthis is my exec banner\nthat has a multiline\nstring\n@"]

When we fetch the banner text from the device to make it idempotent, what we get:

*exec:
 1.5s main: 
      want={'banner': 'exec', 'state': 'present', 'text': 'this is my exec banner\nthat has a multiline\nstring'}
 1.5s main: 
      have={'banner': 'exec', 'state': 'present', 'text': u'\\$(hostname)this is my exec banner\\$(hostnam... has a multiline\\$(hostname)string\\$(hostname)'

have['text'] string \n gets replaced by the string hostname which I have no idea why.
This makes idempotence test fail.

@trishnaguha trishnaguha referenced this pull request Jan 10, 2018

Merged

fix nxos_banner #34695

@trishnaguha

This comment has been minimized.

Show comment
Hide comment
@trishnaguha

trishnaguha Jan 11, 2018

Member

Turns out this is NXOS issue.

Member

trishnaguha commented Jan 11, 2018

Turns out this is NXOS issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment