Add idempotency when stopping a VM and some tests
When deleting a VM, we try to force stop it. If the VM is already stopped, LXD will return an error. Unfortunately, we can't import the drivers package from LXD without also pulling in a bunch of linux specific CGO dependencies which we want to avoid. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
b4e9af13d5
commit
f52accc47f
13 changed files with 340 additions and 27 deletions
|
|
@ -76,6 +76,10 @@ func (s *sqlDatabase) sqlToCommonOrganization(org Organization) params.Organizat
|
|||
Pools: make([]params.Pool, len(org.Pools)),
|
||||
}
|
||||
|
||||
for idx, pool := range org.Pools {
|
||||
ret.Pools[idx] = s.sqlToCommonPool(pool)
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue