Allow to delete private flavors
As they can be created now we should also be able to delete them.
Related-issue: https://mirantis.jira.com/browse/PROD-35763
Change-Id: I46e832b196803c77c85ab6d54d1bea2d52987dd0
diff --git a/_states/novav21.py b/_states/novav21.py
index dbc5170..5b1448f 100644
--- a/_states/novav21.py
+++ b/_states/novav21.py
@@ -116,9 +116,10 @@
@_error_handler
def flavor_absent(name, cloud_name):
"""Ensure flavor is absent"""
- # There is no way to query flavors by name
+ # There is no way to query flavors by name. And we always list both
+ # public and private flavors
flavors = _call_nova_salt_module('flavor_list', name)(
- detail=True, cloud_name=cloud_name)
+ detail=True, is_public=None, cloud_name=cloud_name)
flavor = [flavor for flavor in flavors if flavor['name'] == name]
# Flavor names are unique, there is either 1 or 0 with requested name
if flavor: