Add socket type and construct correct xname

This commit is contained in:
Ben McDonald 2025-06-13 09:26:10 -07:00
parent dc09b7051d
commit 940e7fee2a
No known key found for this signature in database
3 changed files with 8 additions and 5 deletions

View file

@ -25,6 +25,7 @@ type JawsOutlet struct {
ID string `json:"id"`
Name string `json:"name"`
State string `json:"state"`
SocketType string `json:"socket_type"`
Current float32 `json:"current"`
Voltage float32 `json:"voltage"`
ActivePower int `json:"active_power"`
@ -85,6 +86,7 @@ func CrawlPDU(config CrawlerConfig) (*pdu.PDUInventory, error) {
ID: rawOutlet.ID,
Name: rawOutlet.Name,
PowerState: rawOutlet.State,
SocketType: rawOutlet.SocketType,
}
inventory.Outlets = append(inventory.Outlets, outlet)
}

View file

@ -4,6 +4,7 @@ type PDUOutlet struct {
ID string `json:"id"` // e.g., "35" or "BA35"
Name string `json:"name"` // e.g., "Link1_Outlet_35"
PowerState string `json:"power_state"` // e.g., "ON" or "OFF"
SocketType string `json:"socket_type"`
}
type PDUInventory struct {