From 53a91ca071bd53b2c1fb36b6d83c36f30cffa31e Mon Sep 17 00:00:00 2001 From: Tomas Karasek Date: Tue, 5 Sep 2023 15:41:59 +0200 Subject: [PATCH] fix: better attribute retrieval from the generated SDK struct --- equinix/helpers_device.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/equinix/helpers_device.go b/equinix/helpers_device.go index cc3218dd0..d7a1903f5 100644 --- a/equinix/helpers_device.go +++ b/equinix/helpers_device.go @@ -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(),