

@staticmethod
def _get_resource_totals_from_instances(host_name, instances):
    cpu_sum = 0
    mem_sum = 0
    hdd_sum = 0
    for instance in instances:
        cpu_sum += instance['vcpus']
        mem_sum += instance['memory_mb']
        hdd_sum += (instance['root_gb'] + instance['ephemeral_gb'])
    return {
        'resource': {
            'host': host_name,
            'project': '(used_max)',
            'cpu': instances,
            'memory_mb': mem_sum,
            'disk_gb': hdd_sum,
        },
    }

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/hosts.py HostController._get_resource_totals_from_instances/VarMisuse@82/135 `cpu_sum`->`instances`