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_designs): Empty description under network-ports #3445

Merged
merged 5 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ interface Port-Channel42
switchport
mlag 42
!
interface Port-Channel43
no shutdown
switchport
mlag 43
!
interface Port-Channel101
description MLAG_PEER_network-ports-tests.1_Po101
no shutdown
Expand Down Expand Up @@ -559,6 +564,14 @@ interface Ethernet12
switchport mode trunk phone
switchport
!
interface Ethernet51
no shutdown
channel-group 43 mode active
!
interface Ethernet52
no shutdown
channel-group 43 mode active
!
interface Vlan4094
description MLAG_PEER
no shutdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,22 @@ interface Ethernet14
no shutdown
switchport
!
interface Ethernet51
shutdown
switchport
!
interface Ethernet52
shutdown
switchport
!
interface Ethernet53
shutdown
switchport
!
interface Ethernet54
shutdown
switchport
!
interface Vlan4094
description MLAG_PEER
no shutdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ port_channel_interfaces:
type: switched
shutdown: false
mlag: 42
- name: Port-Channel43
type: switched
shutdown: false
mlag: 43
ethernet_interfaces:
- name: Ethernet10/1
peer: network-ports-tests.1
Expand Down Expand Up @@ -710,6 +714,20 @@ ethernet_interfaces:
channel_group:
id: 42
mode: active
- name: Ethernet51
peer_type: network_port
shutdown: false
type: port-channel-member
channel_group:
id: 43
mode: active
- name: Ethernet52
peer_type: network_port
shutdown: false
type: port-channel-member
channel_group:
id: 43
mode: active
mlag_configuration:
domain_id: mlag
local_interface: Vlan4094
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,22 @@ ethernet_interfaces:
description: CONNECTED_ENDPOINT_OVERWRITING_NETWORK_PORT_Eth42
shutdown: false
type: switched
- name: Ethernet51
peer_type: network_port
shutdown: true
type: switched
- name: Ethernet52
peer_type: network_port
shutdown: true
type: switched
- name: Ethernet53
peer_type: network_port
shutdown: true
type: switched
- name: Ethernet54
peer_type: network_port
shutdown: true
type: switched
mlag_configuration:
domain_id: mlag
local_interface: Vlan4094
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,20 @@ network_ports:
- Ethernet12
description: Config overwriting base config

# Test no description
- switches:
- network-ports-tests.1
switch_ports:
- Ethernet51-54
enabled: false
- switches:
- network-ports-tests.2
switch_ports:
- Ethernet51-52
port_channel:
channel_id: 43
mode: "active"

servers:
- name: CONNECTED_ENDPOINT_OVERWRITING_NETWORK_PORT
adapters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ def _get_ethernet_interface_cfg(self, adapter: dict, node_index: int, connected_
if (flowcontrol_received := get(adapter, "flowcontrol.received")) is not None:
ethernet_interface["flowcontrol"] = {"received": flowcontrol_received}

return strip_null_from_data(ethernet_interface)
return strip_null_from_data(ethernet_interface, strip_values_tuple=(None, ""))
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def _get_port_channel_interface_cfg(self, adapter: dict, port_channel_interface_
}
)

return strip_null_from_data(port_channel_interface)
return strip_null_from_data(port_channel_interface, strip_values_tuple=(None, ""))

def _get_port_channel_subinterface_cfg(self, subinterface: dict, adapter: dict, port_channel_subinterface_name: str, channel_group_id: int) -> dict:
"""
Expand Down Expand Up @@ -215,4 +215,4 @@ def _get_port_channel_subinterface_cfg(self, subinterface: dict, adapter: dict,
"route_target": generate_route_target(short_esi),
}

return strip_null_from_data(port_channel_interface)
return strip_null_from_data(port_channel_interface, strip_values_tuple=(None, ""))