def cxm_infos(cluster): """Print the status of the cluster.""" print '%-40s %3s %3s %8s %4s' % ("Node name","VM", "IRQ","Free-RAM","Load") for node in cluster.get_nodes(): metrics=node.get_metrics() print '%-40s %3d %3d %8d %3d%%' % (node.get_hostname(),node.get_vm_started(), metrics.get_used_irq(),metrics.get_free_ram(),metrics.get_load())
def getNodeMetrics(node): metrics=node.get_metrics() return '%-40s %3d %3d %8d %3d%%' % (node.get_hostname(),node.get_vm_started(), metrics.get_used_irq(),metrics.get_free_ram(),metrics.get_load())