Comment 1 for bug 1224921

Revision history for this message
Jake Liu (jake-liu) wrote :

Hi Phil, can you please give more detail on the problem.

Do you mean that we need change the following to instance_ref.get()?

instance_info = dict(
        # Owner properties
        tenant_id=instance_ref['project_id'],
        user_id=instance_ref['user_id'],

        # Identity properties
        instance_id=instance_ref['uuid'],
        display_name=instance_ref['display_name'],
        reservation_id=instance_ref['reservation_id'],
        hostname=instance_ref['hostname'],

        # Type properties
        instance_type=instance_type_name,
        instance_type_id=instance_ref['instance_type_id'],
        architecture=instance_ref['architecture'],

        # Capacity properties
        memory_mb=instance_ref['memory_mb'],
        disk_gb=instance_ref['root_gb'] + instance_ref['ephemeral_gb'],
        vcpus=instance_ref['vcpus'],
        # Note(dhellmann): This makes th
        ...............

I'm not clear about the following:
notification.info_from_instance() reads many values from the instance structure, including capacity vales that are populated from the instance_system_metadata table.
>>>>>>>>> How does capacity vales get from system metadata in this function?

Thanks.