Product SiteDocumentation Site

7.4. Capabilities Example

The following example demonstrates a sample representation of capabilities.
Example 7.1. XML representation of capabilities
An API user performs the following request:
GET /rhevm-api/capabilities HTTP/1.1
Accept: application/xml
The API returns the following representation:
HTTP/1.1 200 OK
Content-Type: application/xml

<capabilities>
    <version minor="0" major="3">
        <current>true</current>
        <features>
            <transparent_hugepages>true</transparent_hugepages>
        </features>
        <cpus>
            <cpu id="Intel Conroe Family">
                <level>3</level>
            </cpu>
            <cpu id="Intel Penryn Family">
                <level>4</level>
            </cpu>
            ...
        </cpus>
        <power_managers>
            <power_management type="alom">
                <options>
                    <option type="bool" name="secure"/>
                    <option type="int" name="port"/>
                </options>
            </power_management>
            <power_management type="apc">
                <options>
                    <option type="bool" name="secure"/>
                    <option type="int" name="port"/>
                    <option type="int" name="slot"/>
                </options>
            </power_management>
            ...
        </power_managers>
        <fence_types>
            <fence_type>manual</fence_type>
            <fence_type>restart</fence_type>
            <fence_type>start</fence_type>
            <fence_type>stop</fence_type>
            <fence_type>status</fence_type>
        </fence_types>
        <storage_types>
            <storage_type>iscsi</storage_type>
            <storage_type>fcp</storage_type>
            <storage_type>nfs</storage_type>
            <storage_type>local</storage_type>
        </storage_types>
        <storage_domain_types>
            <storage_domain_type>data</storage_domain_type>
            <storage_domain_type>iso</storage_domain_type>
            <storage_domain_type>export</storage_domain_type>
        </storage_domain_types>
        <vm_types>
            <vm_type>desktop</vm_type>
            <vm_type>server</vm_type>
        </vm_types>
        <boot_devices>
            <boot_device>cdrom</boot_device>
            <boot_device>hd</boot_device>
            <boot_device>network</boot_device>
        </boot_devices>
        <display_types>
            <display_type>vnc</display_type>
            <display_type>spice</display_type>
        </display_types>
        <nic_types>
            <nic_type>e1000</nic_type>
            <nic_type>virtio</nic_type>
            <nic_type>rtl8139</nic_type>
            <nic_type>rtl8139_virtio</nic_type>
        </nic_types>
        <disk_types>
            <disk_type>data</disk_type>
            <disk_type>shared</disk_type>
            <disk_type>swap</disk_type>
            <disk_type>system</disk_type>
            <disk_type>temp</disk_type>
        </disk_types>
        <disk_formats>
            <disk_format>cow</disk_format>
            <disk_format>raw</disk_format>
        </disk_formats>
        <disk_interfaces>
            <disk_interface>ide</disk_interface>
            <disk_interface>scsi</disk_interface>
            <disk_interface>virtio</disk_interface>
        </disk_interfaces>
        <vm_affinities>
            <affinity>migratable</affinity>
            <affinity>user_migratable</affinity>
            <affinity>pinned</affinity>
        </vm_affinities>
       <custom_properties>
            <custom_property name="sap_agent" regexp="^(true|false)$"/>
            <custom_property name="sndbuf" regexp="^[0-9]+$"/>
            ...
        </custom_properties>
        <boot_protocols>
            <boot_protocol>dhcp</boot_protocol>
            <boot_protocol>static</boot_protocol>
        </boot_protocols>
        <error_handling>
            <on_error>migrate</on_error>
            <on_error>do_not_migrate</on_error>
            <on_error>migrate_highly_available</on_error>
        </error_handling>
        <storage_formats>
            <format>v1</format>
            <format>v2</format>
        </storage_formats>
    </version>
    <permits>
        <permit id="1">
            <name>CREATE_VM</name>
            <administrative>false</administrative>
        </permit>
        <permit id="2">
            <name>DELETE_VM</name>
            <administrative>false</administrative>
        </permit>
        ...
    </permits>
    <scheduling_policies>
        <policy>evenly_distributed</policy>
        <policy>power_saving</policy>
    </scheduling_policies>
</capabilities>