- table.add_row([cluster['name'], cluster['_id'], cluster['k8s_version'], cluster['vim_account'],
- json.dumps(cluster['nets']), cluster["_admin"]["operationalState"],
- trunc_text(cluster.get('description') or '', 40)])
+ op_state_details = "Helm: {}\nJuju: {}".format(
+ cluster["_admin"].get("helm-chart", "-").get("operationalState", "-"),
+ cluster["_admin"].get("juju-bundle", "-").get("operationalState", "-"))
+ if long:
+ logger.debug('Cluster details: {}'.format(yaml.safe_dump(cluster)))
+ project_id, project_name = get_project(project_list, cluster)
+ #project_info = '{} ({})'.format(project_name, project_id)
+ project_info = project_name
+ detailed_status = cluster["_admin"].get("detailed-status","-")
+ table.add_row([cluster['name'], cluster['_id'], project_info,
+ cluster['k8s_version'], cluster['vim_account'],
+ json.dumps(cluster['nets']), cluster["_admin"]["operationalState"],
+ op_state_details, trunc_text(cluster.get('description') or '', 40),
+ wrap_text(text=detailed_status, width=40)])
+ else:
+ table.add_row([cluster['name'], cluster['_id'], cluster['vim_account'],
+ cluster["_admin"]["operationalState"], op_state_details])