Skip to content

Commit

Permalink
outscale_oapi: fix vm cache
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Jutteau <[email protected]>
  • Loading branch information
jerome-jutteau committed Sep 27, 2022
1 parent b0bee1e commit 23ce7c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/providers/outscale_oapi/outscale_oapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,11 @@ func (provider *OutscaleOAPI) readVms() []Object {
}
return vms
}
for _, vm := range *read.Vms {
for i, vm := range *read.Vms {
switch *vm.State {
case "pending", "running", "stopping", "stopped", "shutting-down", "quarantine":
vms = append(vms, *vm.VmId)
provider.cache.vms[*vm.VmId] = &vm
provider.cache.vms[*vm.VmId] = &(*read.Vms)[i]
}
}
return vms
Expand Down

0 comments on commit 23ce7c0

Please sign in to comment.