Merge "Remove deprecated Template.validate_resource_definitions"
This commit is contained in:
@@ -18,7 +18,6 @@ import functools
|
|||||||
import queue
|
import queue
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import warnings
|
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
@@ -941,19 +940,6 @@ class Stack(collections.abc.Mapping):
|
|||||||
parameter_groups = param_groups.ParameterGroups(self.t)
|
parameter_groups = param_groups.ParameterGroups(self.t)
|
||||||
parameter_groups.validate()
|
parameter_groups.validate()
|
||||||
|
|
||||||
# Continue to call this function, since old third-party Template
|
|
||||||
# plugins may depend on it being called to validate the resource
|
|
||||||
# definitions before actually generating them.
|
|
||||||
if (type(self.t).validate_resource_definitions !=
|
|
||||||
tmpl.Template.validate_resource_definitions):
|
|
||||||
warnings.warn("The Template.validate_resource_definitions() "
|
|
||||||
"method is deprecated and will no longer be called "
|
|
||||||
"in future versions of Heat. Template subclasses "
|
|
||||||
"should validate resource definitions in the "
|
|
||||||
"resource_definitions() method.",
|
|
||||||
DeprecationWarning)
|
|
||||||
self.t.validate_resource_definitions(self)
|
|
||||||
|
|
||||||
self.t.conditions(self).validate()
|
self.t.conditions(self).validate()
|
||||||
|
|
||||||
# Load the resources definitions (success of which implies the
|
# Load the resources definitions (success of which implies the
|
||||||
|
@@ -229,17 +229,6 @@ class Template(collections.abc.Mapping):
|
|||||||
"""Return a parameters.Parameters object for the stack."""
|
"""Return a parameters.Parameters object for the stack."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def validate_resource_definitions(self, stack):
|
|
||||||
"""Check validity of resource definitions.
|
|
||||||
|
|
||||||
This method is deprecated. Subclasses should validate the resource
|
|
||||||
definitions in the process of generating them when calling
|
|
||||||
resource_definitions(). However, for now this method is still called
|
|
||||||
in case any third-party plugins are relying on this for validation and
|
|
||||||
need time to migrate.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def conditions(self, stack):
|
def conditions(self, stack):
|
||||||
"""Return a dictionary of resolved conditions."""
|
"""Return a dictionary of resolved conditions."""
|
||||||
return conditions.Conditions({})
|
return conditions.Conditions({})
|
||||||
|
Reference in New Issue
Block a user