Skip to content

Commit

Permalink
fix: delete FTD check deployment status complete (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
weilueluo authored Dec 8, 2023
1 parent 1c2cbd2 commit f2017c7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client/device/cloudftd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f2017c7

Please sign in to comment.