diff --git a/quads/tools/create_input_assignments.py b/quads/tools/create_input_assignments.py index 9e0659c45..f62d0b96e 100755 --- a/quads/tools/create_input_assignments.py +++ b/quads/tools/create_input_assignments.py @@ -31,7 +31,7 @@ def print_header(): def print_summary(): _summary = [] - _headers = ["**NAME**", "**SUMMARY**", "**OWNER**", "**REQUEST**"] + _headers = ["**NAME**", "**SUMMARY**", "**OWNER**", "**REQUEST**", "**STATUS**"] if conf["openstack_management"]: _headers.append("**INSTACKENV**") if conf["gather_ansible_facts"]: @@ -60,10 +60,16 @@ def print_summary(): style_tag_start = '' instack_link = os.path.join(conf["quads_url"], "cloud", "%s_instackenv.json" % cloud_name) instack_text = "download" + status = '' else: + cloud_obj = Cloud.objects(name=cloud_name).first() + scheduled_hosts = Schedule.current_schedule(cloud=cloud_obj).count() + moved_hosts = Host.objects(cloud=cloud_obj).count() + percent = moved_hosts / scheduled_hosts * 100 style_tag_start = '' - instack_link = os.path.join(conf["quads_url"], "underconstruction") + instack_link = "#" instack_text = "validating" + status = '' % percent _data = ["[%s%s%s](#%s)" % (style_tag_start, cloud_name, style_tag_end, cloud_name), desc, owner, link] @@ -81,20 +87,24 @@ def print_summary(): ansible_facts_link = os.path.join(conf["quads_url"], "underconstruction") if cloud_name == "cloud01": _data.append("") + _data.append(status) _data.append("") else: _data.append( "%s%s%s" % (instack_link, style_tag_start, instack_text, style_tag_end) ) + _data.append(status) _data.append( "%sinventory%s" % (ansible_facts_link, factstyle_tag_start, factstyle_tag_end) ) else: if cloud_name == "cloud01": + _data.append(status) _data.append("") else: + _data.append(status) _data.append( "%s%s%s" % (instack_link, style_tag_start, instack_text, style_tag_end)