diff --git a/api/wiring/v1alpha2/switch_types.go b/api/wiring/v1alpha2/switch_types.go index 8c3127ba..8a289508 100644 --- a/api/wiring/v1alpha2/switch_types.go +++ b/api/wiring/v1alpha2/switch_types.go @@ -38,6 +38,16 @@ const ( SwitchRoleBorderLeaf SwitchRole = "border-leaf" ) +var SwitchRoles = []SwitchRole{ + SwitchRoleSpine, + SwitchRoleServerLeaf, + SwitchRoleBorderLeaf, +} + +func (r SwitchRole) IsSpine() bool { + return r == SwitchRoleSpine +} + func (r SwitchRole) IsLeaf() bool { return r == SwitchRoleServerLeaf || r == SwitchRoleBorderLeaf }