diff --git a/internal/bmc/bmc.go b/internal/bmc/bmc.go index b0480256..7fa4baa7 100644 --- a/internal/bmc/bmc.go +++ b/internal/bmc/bmc.go @@ -27,7 +27,7 @@ type Credentials struct { } type Info struct { - Type string + Type Typ Manufacturer string SerialNumber string FirmwareVersion string @@ -35,6 +35,14 @@ type Info struct { Machines []Machine } +type Typ string + +const ( + TypeMachine Typ = "Machine" + TypeSwitch Typ = "Switch" + TypeRouter Typ = "Router" +) + type Machine struct { UUID string Manufacturer string @@ -44,9 +52,12 @@ type Machine struct { LocatorLED LED } -type LEDControl interface { - SetLocatorLED(ctx context.Context, state LED) (LED, error) -} +type Power string + +const ( + PowerOn Power = "On" + PowerOff Power = "Off" +) type LED string @@ -56,18 +67,15 @@ const ( LEDBlinking LED = "Blinking" ) +type LEDControl interface { + SetLocatorLED(ctx context.Context, state LED) (LED, error) +} + type PowerControl interface { PowerOn(ctx context.Context) error PowerOff(ctx context.Context, force bool) error } -type Power string - -const ( - PowerOn Power = "On" - PowerOff Power = "Off" -) - type RestartControl interface { Restart(ctx context.Context, force bool) error }