Skip to content

Commit

Permalink
fix: better attribute retrieval from the generated SDK struct
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mk committed Sep 21, 2023
1 parent 6803f53 commit 53a91ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions equinix/helpers_device.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,13 @@ func getDeviceMap(device metalv1.Device) map[string]interface{} {

return map[string]interface{}{
"hostname": device.GetHostname(),
"project_id": *device.GetProject().Id,
"project_id": device.Project.GetId(),
"description": device.GetDescription(),
"device_id": device.GetId(),
"facility": *device.GetFacility().Code,
"metro": *device.GetMetro().Code,
"plan": *device.GetPlan().Slug,
"operating_system": *device.GetOperatingSystem().Slug,
"facility": device.Facility.GetCode(),
"metro": device.Metro.GetCode(),
"plan": device.Plan.GetSlug(),
"operating_system": device.OperatingSystem.GetSlug(),
"state": device.GetState(),
"billing_cycle": device.GetBillingCycle(),
"ipxe_script_url": device.GetIpxeScriptUrl(),
Expand Down

0 comments on commit 53a91ca

Please sign in to comment.