-
Neda Moeini authoredNeda Moeini authored
device_info.py 976 B
from pydantic import BaseModel
class ModuleInfo(BaseModel):
device_type: str
module_bays_slots: list[int]
module_type: str
breakout_interfaces_per_slot: list[int]
total_10g_interfaces: int
class TierInfo:
def __init__(self) -> None:
self.Tier1 = ModuleInfo(
device_type="7750-SR7s",
module_bays_slots=[1, 2],
module_type="XCM2s-XMA2s-36p-800g",
breakout_interfaces_per_slot=[36, 35, 34, 33],
total_10g_interfaces=80,
)
self.Tier2 = ModuleInfo(
device_type="7750-SR7s",
module_bays_slots=[1, 2],
module_type="XCM2s-XMA2s-36p-400g",
breakout_interfaces_per_slot=[36, 35, 34, 33],
total_10g_interfaces=60,
)
def get_module_by_name(self, name: str) -> ModuleInfo:
return getattr(self, name)
# Ranges of LAGs that are feasible for a given device type.
FEASIBLE_LAG_RANGE = range(1, 11)