When action plan is empty, its state is incorrect

When the action plan is empty,its state is still 'RECOMMENDED'.
I think it's should be 'SUCCEED'.
Closes-Bug: #1619155

Change-Id: Icd10707c7892089999f8b37775ca62bde47db0c4
This commit is contained in:
licanwei
2016-09-01 16:58:56 +08:00
parent 8a38c4f479
commit a684e70b61

View File

@@ -94,6 +94,7 @@ class DefaultPlanner(base.BasePlanner):
if len(scheduled) == 0:
LOG.warning(_LW("The action plan is empty"))
action_plan.first_action_id = None
action_plan.state = objects.action_plan.State.SUCCEEDED
action_plan.save()
else:
# create the first action