Skip to content

Commit

Permalink
Refactor(eos_designs): Add wan_circuit_id in metadata (#3598)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc authored Feb 7, 2024
1 parent ce39b50 commit aea8072
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,4 +397,5 @@ metadata:
interfaces:
- name: Ethernet1
carrier: Inmrasat
circuit_id: S512
pathgroup: Satellite
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,15 @@ metadata:
interfaces:
- name: Ethernet1
carrier: ATT
circuit_id: '666'
pathgroup: INET
- name: Ethernet2
carrier: Colt
circuit_id: '10555'
pathgroup: MPLS
- name: Ethernet3
carrier: Comcast-5G
circuit_id: AF830
pathgroup: LTE
pathfinders:
- vtep_ip: 192.168.144.1
Original file line number Diff line number Diff line change
Expand Up @@ -495,12 +495,15 @@ metadata:
interfaces:
- name: Ethernet1
carrier: ATT
circuit_id: '666'
pathgroup: INET
- name: Ethernet2
carrier: Colt
circuit_id: '10555'
pathgroup: MPLS
- name: Ethernet3
carrier: Comcast-5G
circuit_id: AF830
pathgroup: LTE
pathfinders:
- vtep_ip: 192.168.144.1
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,17 @@ metadata:
interfaces:
- name: Ethernet1
carrier: Bouygues_Telecom
circuit_id: '777'
pathgroup: INET
public_ip: 10.7.7.7
- name: Ethernet2
carrier: Colt
circuit_id: '10000'
pathgroup: MPLS
public_ip: 172.16.0.1
- name: Ethernet3
carrier: Another-ISP
circuit_id: '999'
pathgroup: INET
public_ip: 10.9.9.9
pathgroups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ metadata:
interfaces:
- name: Ethernet1
carrier: Orange
circuit_id: '888'
pathgroup: INET
public_ip: 10.8.8.8
pathgroups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,12 @@ metadata:
interfaces:
- name: Ethernet1
carrier: SFR
circuit_id: '999'
pathgroup: INET
public_ip: 10.9.9.9
- name: Ethernet2
carrier: ATT-MPLS
circuit_id: '10999'
pathgroup: MPLS
public_ip: 172.19.9.9
pathgroups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ metadata:
pathgroup: INET
- name: Ethernet2.42
carrier: Colt
circuit_id: '10666'
pathgroup: MPLS
pathfinders:
- vtep_ip: 192.168.144.1
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ wan_transit:
l3_interfaces:
- name: Ethernet1.42
wan_carrier: Comcast
wan_circuit_id: 667
set_default_route: true
ip_address: dhcp
- name: Ethernet2.42
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,14 @@ def wan_local_carriers(self: SharedUtils) -> list:
local_carriers_dict[interface_carrier]["interfaces"] = []

local_carriers_dict[interface_carrier]["interfaces"].append(
{
"name": get(interface, "name", required=True),
"ip_address": self.get_public_ip_for_wan_interface(interface),
"connected_to_pathfinder": get(interface, "connected_to_pathfinder", default=True),
}
strip_empties_from_dict(
{
"name": get(interface, "name", required=True),
"ip_address": self.get_public_ip_for_wan_interface(interface),
"connected_to_pathfinder": get(interface, "connected_to_pathfinder", default=True),
"wan_circuit_id": get(interface, "wan_circuit_id"),
}
)
)

return list(local_carriers_dict.values())
Expand Down

0 comments on commit aea8072

Please sign in to comment.