Revert "Support global progress for tasks"
This reverts commit 3f21d35f35
.
Change-Id: If0cf99129fdc38c40ee8322c872f6b4f9b83c0b5
Partial-bug: #1633212
This commit is contained in:
parent
bca595a964
commit
1ab30505b7
|
@ -72,7 +72,7 @@ module Astute
|
|||
) if task.failed?
|
||||
end
|
||||
|
||||
@ctx.report('nodes' => [node_status], 'progress' => cluster_progress)
|
||||
@ctx.report('nodes' => [node_status])
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -106,14 +106,6 @@ module Astute
|
|||
end
|
||||
end
|
||||
|
||||
def cluster_progress
|
||||
if cluster.tasks_total_count != 0
|
||||
100 * cluster.tasks_finished_count / cluster.tasks_total_count
|
||||
else
|
||||
100
|
||||
end
|
||||
end
|
||||
|
||||
def select_task_engine(data)
|
||||
noop_prefix = noop_run? && not_noop_type?(data) ? "Noop" : ""
|
||||
task_class_name = noop_prefix + data['type'].split('_').collect(&:capitalize).join
|
||||
|
|
|
@ -100,8 +100,7 @@ describe Astute::TaskNode do
|
|||
'deployment_graph_task_name' => 'openstack-haproxy-mysqld',
|
||||
'task_status' => 'running',
|
||||
'summary' => {}
|
||||
}],
|
||||
'progress' => 0)
|
||||
}])
|
||||
task_node.run(task)
|
||||
end
|
||||
|
||||
|
@ -328,8 +327,7 @@ describe Astute::TaskNode do
|
|||
'deployment_graph_task_name' => task.name,
|
||||
'summary' => {},
|
||||
'task_status' => 'successful',
|
||||
'progress' => 100}],
|
||||
'progress' => 100
|
||||
'progress' => 100}]
|
||||
})
|
||||
task_node.poll
|
||||
end
|
||||
|
@ -358,8 +356,7 @@ describe Astute::TaskNode do
|
|||
'status' => 'ready',
|
||||
'summary' => {},
|
||||
'task_status' => 'skipped',
|
||||
'progress' => 100}],
|
||||
'progress' => 100
|
||||
'progress' => 100}]
|
||||
})
|
||||
task_node.poll
|
||||
end
|
||||
|
@ -377,8 +374,7 @@ describe Astute::TaskNode do
|
|||
'deployment_graph_task_name' => task.name,
|
||||
'summary' => {},
|
||||
'task_status' => 'skipped',
|
||||
'progress' => 50}],
|
||||
'progress' => 50
|
||||
'progress' => 50}]
|
||||
})
|
||||
task_node.poll
|
||||
end
|
||||
|
@ -392,14 +388,6 @@ describe Astute::TaskNode do
|
|||
|
||||
Astute::Puppet.any_instance.expects(:status).returns(:failed)
|
||||
|
||||
ctx.expects(:report).with(
|
||||
'nodes' => [{
|
||||
'uid' => 'node_id',
|
||||
'progress' => 0,
|
||||
'deployment_graph_task_name' => 'test-task',
|
||||
'task_status' => 'running',
|
||||
'summary' => {}}],
|
||||
'progress' => 0)
|
||||
task_node.run(task)
|
||||
ctx.expects(:report).with({
|
||||
'nodes' => [{
|
||||
|
@ -410,8 +398,7 @@ describe Astute::TaskNode do
|
|||
'task_status' => 'failed',
|
||||
'error_type' => 'deploy',
|
||||
'error_msg' => "Task #{task.name} failed on node node_id",
|
||||
'progress' => 100}],
|
||||
'progress' => 100
|
||||
'progress' => 100}]
|
||||
})
|
||||
task_node.poll
|
||||
end
|
||||
|
@ -429,8 +416,7 @@ describe Astute::TaskNode do
|
|||
'deployment_graph_task_name' => task.name,
|
||||
'summary' => {},
|
||||
'task_status' => 'successful',
|
||||
'progress' => 50}],
|
||||
'progress' => 50
|
||||
'progress' => 50}]
|
||||
})
|
||||
task_node.poll
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue