From f2017c764d7c0f67aee0e7d112c71bc2e3998e62 Mon Sep 17 00:00:00 2001 From: Weilue Luo Date: Fri, 8 Dec 2023 12:32:14 +0000 Subject: [PATCH] fix: delete FTD check deployment status complete (#119) --- client/device/cloudftd/delete.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/device/cloudftd/delete.go b/client/device/cloudftd/delete.go index fa0def4..8b96f94 100644 --- a/client/device/cloudftd/delete.go +++ b/client/device/cloudftd/delete.go @@ -100,9 +100,8 @@ func Delete(ctx context.Context, client http.Client, deleteInp DeleteInput) (*De return false, err } client.Logger.Printf("current deployment status=%s\n", ftdDeviceRecord.DeploymentStatus) - if ftdDeviceRecord.DeploymentStatus == "DEPLOYED" { // no idea what this deployment status could be, so it is a string + if ftdDeviceRecord.DeploymentStatus != "DEPLOYMENT_PENDING" { // no idea what this deployment status could be, so it is a string test, other known values: "DEPLOYED", "" return true, nil - // TODO: check for error here: like if ftdDeviceRecord.DeploymentStatus == "DEPLOY_ERROR" {, not sure what is the error deployment status so I did not do it for now } else { return false, nil }