Skip to content

Commit

Permalink
Keeping previous order of structured config
Browse files Browse the repository at this point in the history
  • Loading branch information
Laxmikant Chintakindi authored and Laxmikant Chintakindi committed Nov 11, 2024
1 parent e5527d3 commit 0c43724
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -721,10 +721,10 @@ vlan_interfaces:
vrf: TENANT_D_WAN_ZONE
router_ospf:
process_ids:
- router_id: 192.168.255.14
id: 14
- id: 14
vrf: Tenant_A_WAN_Zone
passive_interface_default: true
router_id: 192.168.255.14
no_passive_interfaces:
- Ethernet7
- Vlan150
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,10 @@ vlan_interfaces:
vrf: TENANT_D_WAN_ZONE
router_ospf:
process_ids:
- router_id: 192.168.255.15
id: 14
- id: 14
vrf: Tenant_A_WAN_Zone
passive_interface_default: true
router_id: 192.168.255.15
no_passive_interfaces:
- Vlan150
max_lsa: 15000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -566,10 +566,10 @@ vlan_interfaces:
vrf: '12345678'
router_ospf:
process_ids:
- router_id: 192.168.42.42
id: 9
- id: 9
vrf: Tenant_A_OP_Zone
passive_interface_default: true
router_id: 192.168.42.42
no_passive_interfaces:
- Vlan113
redistribute:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1223,10 +1223,10 @@ ipv6_static_routes:
vrf: Tenant_D_OP_Zone
router_ospf:
process_ids:
- router_id: 192.168.255.10
id: 16
- id: 16
vrf: Tenant_A_OSPF
passive_interface_default: true
router_id: 192.168.255.10
no_passive_interfaces:
- Ethernet22
- Ethernet23
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1163,10 +1163,10 @@ ipv6_static_routes:
vrf: Tenant_D_OP_Zone
router_ospf:
process_ids:
- router_id: 192.168.255.11
id: 16
- id: 16
vrf: Tenant_A_OSPF
passive_interface_default: true
router_id: 192.168.255.11
no_passive_interfaces:
- Ethernet24
redistribute:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,10 @@ vlan_interfaces:
ospf_network_point_to_point: false
router_ospf:
process_ids:
- router_id: 192.168.255.1
id: 1
- id: 1
vrf: svi_profile_tests_vrf
passive_interface_default: true
router_id: 192.168.255.1
no_passive_interfaces:
- Vlan510
- Vlan511
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,10 @@ vlan_interfaces:
ospf_network_point_to_point: false
router_ospf:
process_ids:
- router_id: 192.168.255.1
id: 1
- id: 1
vrf: svi_profile_tests_vrf
passive_interface_default: true
router_id: 192.168.255.1
no_passive_interfaces:
- Vlan510
- Vlan511
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ loopback_interfaces:
node_segment:
ipv4_index: 206
router_isis:
router_id: 192.168.255.114
instance: CORE
log_adjacency_changes: true
net: 49.0001.1921.6825.5114.00
router_id: 192.168.255.114
is_type: level-1-2
address_family_ipv4:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ loopback_interfaces:
ipv4_index: 203
ipv6_index: 203
router_isis:
router_id: 10.0.0.3
instance: CORE
log_adjacency_changes: true
net: 49.0001.0100.0000.0003.00
router_id: 10.0.0.3
is_type: level-2
address_family_ipv4:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -993,9 +993,9 @@ vlan_interfaces:
vrf: TENANT_D_WAN_ZONE
router_ospf:
process_ids:
- router_id: 192.168.255.109
id: 123
- id: 123
passive_interface_default: true
router_id: 192.168.255.109
no_passive_interfaces:
- Vlan1234
redistribute:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ loopback_interfaces:
node_segment:
ipv4_index: 199
router_isis:
router_id: 172.28.4.99
instance: CORE
log_adjacency_changes: true
net: 49.0001.0000.0001.0099.00
router_id: 172.28.4.99
is_type: level-2
address_family_ipv4:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ loopback_interfaces:
node_segment:
ipv4_index: 199
router_isis:
router_id: 172.28.4.99
instance: CORE
log_adjacency_changes: true
net: 49.0001.1720.2800.4099.00
router_id: 172.28.4.99
is_type: level-2
address_family_ipv4:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ loopback_interfaces:
isis_enable: EVPN_UNDERLAY
isis_passive: true
router_isis:
router_id: 1.2.3.1
instance: EVPN_UNDERLAY
log_adjacency_changes: true
net: 49.0001.0010.0200.3001.00
router_id: 1.2.3.1
is_type: level-2
address_family_ipv4:
enabled: true
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ type: dict
keys:
use_router_general_for_router_id:
type: bool
description: This setting allows to use `router_id` set under `router_general_settings` as BGP router-id.
description: Use `router general` to set router ID for all routing protocols and VRFs.
default: false
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,23 @@ def router_ospf(self: AvdStructuredConfigNetworkServices) -> dict | None:
raise AristaAvdInvalidInputsError(msg)

process = {}
if self.shared_utils.use_router_general_for_router_id is False:
process["router_id"] = default(get(vrf, "ospf.router_id"), self.shared_utils.router_id)

process.update(
{
"id": process_id,
"vrf": vrf["name"] if vrf["name"] != "default" else None,
"passive_interface_default": True,
}
)
if self.shared_utils.use_router_general_for_router_id is False:
process["router_id"] = default(get(vrf, "ospf.router_id"), self.shared_utils.router_id)

process.update(
{
"no_passive_interfaces": ospf_interfaces,
"bfd_enable": get(vrf, "ospf.bfd"),
"max_lsa": get(vrf, "ospf.max_lsa"),
}
}
)

process_redistribute = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,23 @@ def router_isis(self: AvdStructuredConfigUnderlay) -> dict | None:
return None

router_isis = {}
if self.shared_utils.use_router_general_for_router_id is False:
router_isis["router_id"] = self.shared_utils.router_id

router_isis.update(
{
"instance": self.shared_utils.isis_instance_name,
"log_adjacency_changes": True,
"net": self._isis_net,
}
)

if self.shared_utils.use_router_general_for_router_id is False:
router_isis["router_id"] = self.shared_utils.router_id

router_isis.update(
{
"is_type": self._is_type,
"address_family_ipv4": {"enabled": True, "maximum_paths": get(self._hostvars, "isis_maximum_paths", default=4)},
}
}
)

if self.shared_utils.underlay_ldp is True:
Expand Down

0 comments on commit 0c43724

Please sign in to comment.