Merge "Readability fixes for cleaning_reboot code"

This commit is contained in:
Jenkins 2016-03-30 19:14:58 +00:00 committed by Gerrit Code Review
commit cdfa120e06

View File

@ -300,8 +300,8 @@ class BaseAgentVendor(base.VendorInterface):
manual_clean = node.target_provision_state == states.MANAGEABLE manual_clean = node.target_provision_state == states.MANAGEABLE
agent_commands = self._client.get_commands_status(task.node) agent_commands = self._client.get_commands_status(task.node)
if (not agent_commands and if not agent_commands:
task.node.driver_internal_info.get('cleaning_reboot')): if task.node.driver_internal_info.get('cleaning_reboot'):
# Node finished a cleaning step that requested a reboot, and # Node finished a cleaning step that requested a reboot, and
# this is the first heartbeat after booting. Continue cleaning. # this is the first heartbeat after booting. Continue cleaning.
info = task.node.driver_internal_info info = task.node.driver_internal_info
@ -309,8 +309,7 @@ class BaseAgentVendor(base.VendorInterface):
task.node.driver_internal_info = info task.node.driver_internal_info = info
self.notify_conductor_resume_clean(task) self.notify_conductor_resume_clean(task)
return return
else:
if not agent_commands:
# Agent has no commands whatsoever # Agent has no commands whatsoever
return return