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 eos_l2_interface invalid command #50644

Merged
merged 1 commit into from Jan 8, 2019

Conversation

trishnaguha
Copy link
Member

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

SUMMARY

fixes #50639

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

modules/network/eos/eos_l2_interface.py

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
@ansibot
Copy link
Contributor

ansibot commented Jan 8, 2019

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. 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 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 Jan 8, 2019
@trishnaguha trishnaguha merged commit 1400d16 into ansible:devel Jan 8, 2019
@trishnaguha trishnaguha deleted the eos_l2_interface_bug branch January 8, 2019 11:57
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Jan 8, 2019
@@ -176,9 +176,9 @@ def map_obj_to_commands(updates, module):
commands.append('switchport trunk allowed vlan {0}'.format(trunk_allowed_vlans))
else:
if obj_in_have['native_vlan']:
commands.append('not switchport trunk native vlan {0}'.format(obj_in_have['native_vlan']))
commands.append('no switchport trunk native vlan {0}'.format(obj_in_have['native_vlan']))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For EOS, following line is also required after this line:

commands.append( 'no switchport mode trunk')

if obj_in_have['trunk_allowed_vlans']:
commands.append('not switchport trunk allowed vlan {0}'.format(obj_in_have['trunk_allowed_vlans']))
commands.append('no switchport trunk allowed vlan {0}'.format(obj_in_have['trunk_allowed_vlans']))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For EOS, following line is also required after this line:

commands.append( 'no switchport mode trunk')

@tetsuyasodo
Copy link
Contributor

Line172 should be modified as follows:

commands.append('no switchport access vlan {0}'.format(obj_in_have['access_vlan']))
+ commands.append('switchport mode trunk')

@trishnaguha trishnaguha added this to Needs Triage in Networking via automation Jan 10, 2019
kbreit pushed a commit to kbreit/ansible that referenced this pull request Jan 11, 2019
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
trishnaguha added a commit to trishnaguha/ansible that referenced this pull request Apr 1, 2019
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 1400d16)
abadger pushed a commit that referenced this pull request Apr 4, 2019
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 1400d16)
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. 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 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.
Projects
No open projects
Networking
  
Needs Triage
Development

Successfully merging this pull request may close these issues.

eos_l2_interface unable to change port mode between access and trunk
4 participants