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

Fix invalid src option return response for network config modules #56076

Merged
merged 1 commit into from May 4, 2019

Conversation

ganeshrn
Copy link
Member

@ganeshrn ganeshrn commented May 4, 2019

SUMMARY
  • Add changed key in a failure case to maintain backward compatibility
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ios_config
junos_config
eos_config
iosxr_config

ADDITIONAL INFORMATION

Network integration test failures

test/integration/targets/junos_config/tests/netconf/src_invalid.yaml:13
Task

  - name: configure with invalid src
    junos_config:
      src: basic/foobar.j2
      #provider: "{{ netconf }}"
    register: result
    ignore_errors: yes
  
- assert:
      that:
        - "result.changed == false"
        - "result.failed == true"
        - "result.msg == 'path specified in src not found'"

Before

{
"msg": "The conditional check 'result.changed == false' failed. The error was: error while evaluating conditional (result.changed == false): 'dict object' has no attribute 'changed'"
}

After:

ok: [junos01] => {
    "changed": false,
    "msg": "All assertions passed"
}

*  Add changed key in faliure case to maintain backward compatibility
@ansibot
Copy link
Contributor

ansibot commented May 4, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. networking Network category small_patch support:network This issue/PR relates to code supported by the Ansible Network Team. labels May 4, 2019
@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label May 4, 2019
@ganeshrn ganeshrn merged commit 1a66121 into ansible:devel May 4, 2019
@ganeshrn ganeshrn deleted the src_changed_fix branch May 4, 2019 11:23
ganeshrn added a commit to ganeshrn/ansible that referenced this pull request May 4, 2019
…sible#56076)

*  Add changed key in faliure case to maintain backward compatibility

(cherry picked from commit 1a66121)
mattclay pushed a commit that referenced this pull request May 9, 2019
…6076)

*  Add changed key in faliure case to maintain backward compatibility

(cherry picked from commit 1a66121)
amuraleedhar pushed a commit to amuraleedhar/ansible that referenced this pull request May 21, 2019
…sible#56076)

*  Add changed key in faliure case to maintain backward compatibility

(cherry picked from commit 1a66121)
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
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. core_review In order to be merged, this PR must follow the core review workflow. networking Network category small_patch 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

4 participants