Specific exception for stale cluster state was added.
Specific exception should be thrown when cluster state is stale. Current usage is to raise this exception if compute_model.state is True. Bug was describeid by Jean-Emile DARTOIS. Change-Id: Iaddb4cc8007c51bb14759c9da829751e834499d0 Closes-Bug: #1621855
This commit is contained in:
@@ -185,6 +185,9 @@ class BaseStrategy(loadable.Loadable):
|
||||
if not self._compute_model:
|
||||
raise exception.ClusterStateNotDefined()
|
||||
|
||||
if self._compute_model.stale:
|
||||
raise exception.ClusterStateStale()
|
||||
|
||||
return self._compute_model
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user