def update(self, n_total, n_lc_updated, n_scaling_out, n_scaled_out, n_services_installed, n_scaling_in, n_complete, *args):
msg = '[Patching {0} ASGs]: '.format(n_total)
stages = []
if n_lc_updated is not 0:
stages.append('{0} Launch Configs Updated'.format(n_lc_updated))
if n_scaling_out is not 0:
stages.append('{0} Scaling Out'.format(n_scaling_out))
if n_scaled_out is not 0:
stages.append('{0} Installing Services'.format(n_scaled_out))
if n_scaling_in is not 0:
stages.append('{0} Scaling In'.format(n_scaling_in))
if n_complete is not 0:
stages.append('{0} Complete'.format(n_complete))
msg += ', '.join(stages)
self.widgets[4] = FormatLabel(msg)
t1 = (5 / n_total) * n_lc_updated
t2 = (10 / n_total) * n_scaling_out
t3 = (30 / n_total) * n_scaled_out
t4 = (70 / n_total) * n_services_installed
t5 = (75 / n_total) * n_scaling_in
t6 = (100 / n_total) * n_complete
self.total_progress = t1 + t2 + t3 + t4 + t5 + t6
评论列表
文章目录