Nova/HypervisorExtendedAttributes

= Extended Hypervisor Attributes =

This extension applies to the Nova API and exists for the purpose of defining additional hypervisor location information needed to support making placement decisions with respect to a more detailed datacenter model than has been possible heretofore. These decisions might be made by the nova scheduler or an authorized client that is making placement decisions with a bigger picture in mind.

We suppose that the hypervisors of a datacenter are arranged in a tree; all details of the shape of the tree can vary from datacenter to datacenter. The root of the tree corresponds to the whole datacenter, and the leaves are the individual hypervisors. The tree does not necessarily have uniform depth. Each vertex of the tree is labeled with a level, which identifies the kind of thing to which the vertex corresponds. For example, a leaf might be labeled with level=machine and have ancestors with labels like chassis, rack, row, and room. The labels are used consistently: you can not have label X appearing on an ancestor of a vertex labeled Y and also have label Y appearing on an ancestor of a vertex labeled X. Each vertex of the tree, possibly excepting the root, is also labeled with a name. For a given parent vertex, all its children have distinct names.

This extension adds one attribute to a hypervisor, named location. The value of this attribute is a list of (level,name) pairs identifying the path from the root of the hypervisor tree to the hypervisor itself (in root-to-leaf order). Inclusion of the root is optional, it adds no ability to discriminate. Inclusion of the hypervisor itself is optional, since it is already named even without this extension.

The XML namespace of this extension shall be http://docs.openstack.org/compute/ext/extended_hypervisor/api/v1.0 and the JSON prefix shall be OS-EXT-HYP-ATTR.

Example Extended JSON Output
{      "hypervisor": {          "service": {              "host": "r2c2n5", "id": 7 },          "vcpus_used": 50, "hypervisor_type": "QEMU", "local_gb_used": 1200, "hypervisor_hostname": "r2c2n5", "memory_mb_used": 102912, "memory_mb": 96661, "current_workload": 0, "vcpus": 32, "cpu_info": "{"vendor": "Intel", "model": "SandyBridge", "arch": "x86_64", "features": ["pdpe1gb", "osxsave", "dca", "pcid", "pdcm", "xtpr", "tm2", "est", "smx", "vmx", "ds_cpl", "monitor", "dtes64", "pbe", "tm", "ht", "ss", "acpi", "ds", "vme"], "topology": {"cores": 8, "threads": 2, "sockets": 1}}", "running_vms": 8, "free_disk_gb": 1016, "hypervisor_version": 1000000, "disk_available_least": 864, "local_gb": 2216, "free_ram_mb": -6251, "id": 3, "OS-EXT-HYP-ATTR:location": [ {"rack":"r2"}, {"chassis":"c2"}, {"machine":"n5"} ] }   }

Example Extended XML Output
 <hypervisor vcpus_used="50" hypervisor_type="QEMU" local_gb_used="1200" hypervisor_hostname="r2c2n5" memory_mb_used="102912" memory_mb="96661" current_workload="0" vcpus="32" cpu_info="{&quot;vendor&quot;: &quot;Intel&quot;, &quot;model&quot;: &quot;SandyBridge&quot;, &quot;arch&quot;: &quot;x86_64&quot;, &quot;features&quot;: [&quot;pdpe1gb&quot;, &quot;osxsave&quot;, &quot;dca&quot;, &quot;pcid&quot;, &quot;pdcm&quot;, &quot;xtpr&quot;, &quot;tm2&quot;, &quot;est&quot;, &quot;smx&quot;, &quot;vmx&quot;, &quot;ds_cpl&quot;, &quot;monitor&quot;, &quot;dtes64&quot;, &quot;pbe&quot;, &quot;tm&quot;, &quot;ht&quot;, &quot;ss&quot;, &quot;acpi&quot;, &quot;ds&quot;, &quot;vme&quot;], &quot;topology&quot;: {&quot;cores&quot;: 8, &quot;threads&quot;: 2, &quot;sockets&quot;: 1}}" running_vms="8" free_disk_gb="1016" hypervisor_version="1000000" disk_available_least="864" local_gb="2216" free_ram_mb="-6251" id="3">       

Acquisition of This Extended Information
this section to describe how nova knows what to say in this extension