Don't call Stack.has_cache_data() in Functions

This check was added in 0638030671 because
originally the Resource objects other than the one we were checking were
not initialised with any data during a convergence resource check.
Therefore they would be in the INIT_COMPLETE state, but would return valid
attribute values from the cache data.

It was made redundant by 1956ddd2a6, which
loaded the resource state in the Resource objects. The state will never be
INIT_COMPLETE.

This code requires the Function's 'stack' member to be a Stack object, so
we have to get rid of it in order to be able to start using a
StackDefinition object in its place.

Change-Id: I1a97401bf126a3ec10cc420bbb0786b785035d48
This commit is contained in:
Zane Bitter 2017-07-19 17:35:40 -04:00
parent cc3c60647b
commit 0bd3c307e1
1 changed files with 0 additions and 5 deletions

View File

@ -233,11 +233,6 @@ class GetAttThenSelect(function.Function):
r.UPDATE, r.ROLLBACK, r.SNAPSHOT, r.CHECK):
return True
# NOTE(sirushtim): Add r.INIT to states above once convergence
# is the default.
if r.stack.has_cache_data(r.name) and r.action == r.INIT:
return True
return False
def result(self):