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

Improve performance of the NOS driver #74

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Make other functions faster the same way we did in the previous commit.
naved001 committed Jan 30, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 85c91ce8bc6d39e8d3c31849ff62255af8dc166b
Original file line number Diff line number Diff line change
@@ -5,4 +5,5 @@
- "switchport trunk allowed vlan add {{ _vlan_id }}"
parents:
- "interface {{ port_name }}"
match: none
connection: network_cli
Original file line number Diff line number Diff line change
@@ -1,48 +1,28 @@
---
- name: "nos: reset interface to default"
- name: "nos: reset interface to default and then configure it in trunk mode with native-vlan"
community.network.nos_config:
lines:
- "no switchport"
- "shutdown"
parents:
- "interface {{ port_name }}"
connection: network_cli

- name: "nos: enable switchport in trunk mode and disable tagging of native-vlan"
community.network.nos_config:
lines:
- "switchport"
- "switchport mode trunk"
- "no switchport trunk tag native-vlan"
- "no shutdown"
parents:
- "interface {{ port_name }}"
connection: network_cli

- name: "nos: enable rstp"
community.network.nos_config:
lines:
- "no spanning-tree shutdown"
parents:
- "interface {{ port_name }}"
connection: network_cli
when: stp_edge

- name: "nos: set native vlan"
community.network.nos_config:
lines:
- "switchport trunk allowed vlan add {{ _vlan_id }}"
- "switchport trunk native-vlan {{ _vlan_id }}"
parents:
- "interface {{ port_name }}"
match: none
connection: network_cli

- name: "nos: add trunk vlan(s)"
- name: "nos: add the remainder of trunk vlan(s)"
community.network.nos_config:
lines:
- "switchport trunk allowed vlan add {{ t_vlan }}"
parents:
- "interface {{ port_name }}"
match: none
loop: "{{ trunked_vlans }}"
loop_control:
loop_var: t_vlan
Original file line number Diff line number Diff line change
@@ -5,4 +5,5 @@
- "name {{ _vlan_name }}"
parents:
- "interface vlan {{ _vlan_id }}"
match: none
connection: network_cli
Original file line number Diff line number Diff line change
@@ -6,4 +6,5 @@
- "shutdown"
parents:
- "interface {{ port_name }}"
match: none
connection: network_cli
Original file line number Diff line number Diff line change
@@ -5,4 +5,5 @@
- "switchport trunk allowed vlan remove {{ _vlan_id }}"
parents:
- "interface {{ port_name }}"
match: none
connection: network_cli
Original file line number Diff line number Diff line change
@@ -3,4 +3,5 @@
community.network.nos_config:
lines:
- "no interface vlan {{ _vlan_id }}"
match: none
connection: network_cli