From 31f5507595fd3751cd3c9a3064556ca7446311b0 Mon Sep 17 00:00:00 2001 From: Russel Vela Date: Sat, 11 May 2024 07:59:19 -0600 Subject: [PATCH] feat(cloud-provisioning): Adds functions to cloudproviders web client Closes VC-33251 --- .../datasource/webclient/cloudproviders/cloudproviders.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/datasource/webclient/cloudproviders/cloudproviders.go b/internal/datasource/webclient/cloudproviders/cloudproviders.go index f4505e03..c8a4fce7 100644 --- a/internal/datasource/webclient/cloudproviders/cloudproviders.go +++ b/internal/datasource/webclient/cloudproviders/cloudproviders.go @@ -35,12 +35,17 @@ func (c *CloudProvidersClient) GetCloudProviderByName(ctx context.Context, name cp := resp.GetCloudProviders().Nodes[0] + statusDetails := "" + if cp.GetStatusDetails() != nil { + statusDetails = *cp.GetStatusDetails() + } + return &CloudProvider{ ID: uuid.MustParse(cp.GetId()), Name: cp.GetName(), Type: string(cp.GetType()), Status: string(cp.GetStatus()), - StatusDetails: *cp.GetStatusDetails(), + StatusDetails: statusDetails, KeystoresCount: cp.GetKeystoresCount(), }, nil }