コード例 #1
0
ファイル: info_server.py プロジェクト: andpol/cloud-scheduler
 def get_cluster_vm_resources(self):
     output = VM.get_vm_info_header()
     clusters = 0
     vm_count = 0
     for cluster in cloud_resources.resources:
         clusters += 1
         vm_count += len(cluster.vms)
         output += cluster.get_cluster_vms_info()
     output += '\nTotal VMs: %i. Total Clouds: %i' % (vm_count, clusters)
     return output
コード例 #2
0
ファイル: info_server.py プロジェクト: CoEPP/cloud-scheduler
 def get_cluster_vm_resources(self):
     output = []
     output.append(VM.get_vm_info_header())
     clusters = 0
     vm_count = 0
     for cluster in cloud_resources.resources:
         clusters += 1
         vm_count += len(cluster.vms)
         output.append(cluster.get_cluster_vms_info())
     output.append('\nTotal VMs: %i. Total Clouds: %i' % (vm_count, clusters))
     return ''.join(output)
コード例 #3
0
 def get_cluster_vm_resources(self):
     output = []
     output.append(VM.get_vm_info_header())
     clusters = 0
     vm_count = 0
     for cluster in cloud_resources.resources:
         clusters += 1
         vm_count += len(cluster.vms)
         output.append(cluster.get_cluster_vms_info())
     output.append('\nTotal VMs: %i. Total Clouds: %i' %
                   (vm_count, clusters))
     return ''.join(output)
コード例 #4
0
ファイル: info_server.py プロジェクト: hep-gc/cloud-scheduler
 def view_vm_resources(self):
     output = []
     output.append(VM.get_vm_info_header())
     clusters = 0
     vm_count = 0
     for cluster in web.cloud_resources.resources:
         clusters += 1
         vm_count += len(cluster.vms)
         output.append(cluster.get_cluster_vms_info())
     output.append('\nTotal VMs: %i. Total Clouds: %i' % (vm_count, clusters))
     extra_output = []
     for cluster in web.cloud_resources.retired_resources:
         extra_output.append(cluster.get_cluster_vms_info())
     if len(extra_output) > 0:
         output.append('\n\nRetiring VMs from removing resources:\n')
         output.extend(extra_output)
     return ''.join(output)