<commit_before><?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "REST_API_Guide.ent">
%BOOK_ENTITIES;
]>
<chapter id="chap-REST_API_Guide-Capabilities">
  <title>Capabilities</title>
  <para>
    The <literal>rel="cpus"</literal> link obtained from the entry point URI (see <xref linkend="chap-REST_API_Guide-Entry_Point"/>) allows the information about the supported capabilities of this instance of RHEV-M to be queried. The <literal>capabilities</literal> element may contain the following information:

    <informaltable frame="none">
      <tgroup cols="2">
        <colspec colwidth="2*"/>
        <colspec colwidth="5*"/>
        <tbody>
          <row>
            <entry><literal>cpus</literal></entry>
            <entry>The list of supported CPU types. See <xref linkend="sect-REST_API_Guide-Capabilities-CPUs"/></entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>

    For example:
  </para>

  <screen>
GET /capabilities HTTP/1.1
Accept: application/xml

HTTP/1.1 200 OK
Content-Type: application/xml

&lt;capabilities&gt;
  &lt;cpus&gt;
    ...
  &lt;/cpus&gt;
  ...
&lt;/capabilities&gt;
  </screen>

  <section id="sect-REST_API_Guide-Capabilities-CPUs">
    <title>
      CPUs
    </title>

    <para>
      Each cluster is configured with a minimal CPU type which all hosts in that cluster must support. Guests running on hosts within the cluster all run on this CPU type, ensuring that every guest can be live migrated to any host within the cluster.
    </para>

    <para>
      RHEV has a set of supported CPU types to choose from when configuring a cluster. Each CPU has the following properties:

      <informaltable frame="none">
        <tgroup cols="2">
          <colspec colwidth="2*"/>
          <colspec colwidth="5*"/>
          <tbody>
            <row>
              <entry><literal>id</literal></entry>
              <entry>An opaque identifier for the CPU model</entry><commit_msg>docs: add versions to capabilities<commit_after><?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "REST_API_Guide.ent">
%BOOK_ENTITIES;
]>
<chapter id="chap-REST_API_Guide-Capabilities">
  <title>Capabilities</title>
  <para>
    The <literal>rel="capabilities"</literal> link obtained from the entry point URI (see <xref linkend="chap-REST_API_Guide-Entry_Point"/>) allows information about the supported capabilities of this instance of RHEV-M to be queried. The <literal>capabilities</literal> element contains any number of <literal>version</literal> elements which describe capabilities which are dependent on the cluster version level. The <literal>version</literal> element may contain the following information:

    <informaltable frame="none">
      <tgroup cols="2">
        <colspec colwidth="2*"/>
        <colspec colwidth="5*"/>
        <tbody>
          <row>
            <entry><literal>major</literal></entry>
            <entry>The major version number</entry>
          </row>
          <row>
            <entry><literal>minor</literal></entry>
            <entry>The minor version number</entry>
          </row>
          <row>
            <entry><literal>current</literal></entry>
            <entry>Whether this is the most recent supported cluster version level</entry>
          </row>
          <row>
            <entry><literal>cpus</literal></entry>
            <entry>The list of supported CPU types. See <xref linkend="sect-REST_API_Guide-Capabilities-CPUs"/></entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>

    For example:
  </para>

  <screen>
GET /capabilities HTTP/1.1
Accept: application/xml

HTTP/1.1 200 OK
Content-Type: application/xml

&lt;capabilities&gt;
  &lt;version major="2" minor="2"&gt;
    &lt;current/&gt;
    &lt;cpus&gt;
      ...
    &lt;/cpus&gt;
    ...
  &lt;/version&gt;
  &lt;version major="2" minor="1"&gt;
    &lt;cpus&gt;
      ...
    &lt;/cpus&gt;
    ...
  &lt;/version&gt;
&lt;/capabilities&gt;
  </screen>

  <section id="sect-REST_API_Guide-Capabilities-CPUs">
    <title>
      CPUs
    </title>

    <para>
      Each cluster is configured with a minimal CPU type which all hosts in that cluster must support. Guests running on hosts within the cluster all run on this CPU type, ensuring that every guest can be live migrated to any host within the cluster.
    </para>

    <para>
      RHEV has a set of supported CPU types to choose from when configuring a cluster. Each CPU has the following properties:

      <informaltable frame="none">
        <tgroup cols="2">
          <colspec colwidth="2*"/>
          <colspec colwidth="5*"/>
          <tbody>
            <row>
              <entry><literal>id</literal></entry>
              <entry>An opaque identifier for the CPU model</entry>
{'fraction_non_alphanumeric': 0.13123881487373235, 'fraction_numerical': 0.00874925432491549, 'mean_word_length': 2.8250950570342206, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 2, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7029134', 'n_tokens_mistral': 1598, 'n_tokens_neox': 1523, 'n_words': 438}