Minor fix for senlin cluster update

Use check_action_status from senlin plugin to check status.

Change-Id: I143b7d1dfd3dbe1848a2af9c50224bd2934a8c37
This commit is contained in:
Ethan Lynn 2016-08-24 17:56:29 +08:00 committed by Ethan Lynn
parent 73a1eed1bc
commit 1e03e621ac
1 changed files with 3 additions and 13 deletions

View File

@ -59,12 +59,6 @@ class Cluster(resource.Resource):
'CREATING', 'DELETING', 'UPDATING'
)
_ACTION_STATUS = (
ACTION_SUCCEEDED, ACTION_FAILED,
) = (
'SUCCEEDED', 'FAILED',
)
properties_schema = {
PROFILE: properties.Schema(
properties.Schema.STRING,
@ -231,14 +225,10 @@ class Cluster(resource.Resource):
updater['action'] = action_id
updater['start'] = True
else:
action = self.client().get_action(updater['action'])
if action.status == self.ACTION_SUCCEEDED:
ret = self.client_plugin().check_action_status(
updater['action'])
if ret:
del updaters[k]
elif action.status == self.ACTION_FAILED:
raise exception.ResourceInError(
status_reason=action.status_reason,
resource_status=self.FAILED,
)
return False
def validate(self):