mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Set destroy=True in opts when destroying cloud instance
This allows for LXC cloud implementation to properly return instance(s) from `list_nodes` to check if instance exists and can be destroyed. `list_nodes` uses tricky filtering to avoid showing some running LXC containers when in creation mode. However sometimes it filters too much hence the need to pass destroy=True via opts. Additionally LXC cloud implementation will refuse to destroy container if destroy=True is not present in opts. This change is safe for all the rest of cloud implementations because they don't use __opts__['destroy'].
This commit is contained in:
parent
9e1311a7cd
commit
c4047d2a71
1 changed files with 1 additions and 1 deletions
|
@ -355,7 +355,7 @@ class CloudClient(object):
|
|||
'''
|
||||
Destroy the named VMs
|
||||
'''
|
||||
mapper = salt.cloud.Map(self._opts_defaults())
|
||||
mapper = salt.cloud.Map(self._opts_defaults(destroy=True))
|
||||
if isinstance(names, str):
|
||||
names = names.split(',')
|
||||
return salt.utils.cloud.simple_types_filter(
|
||||
|
|
Loading…
Add table
Reference in a new issue