commit 1a741e49058fdbe46f0646d413184fba1ba72930 Author: W. David Ashley w.david.ashley@gmail.com Date: Wed Jul 8 10:35:45 2015 -0500
Connections chapter - added index entries to the chapter
en-US/Connections.xml | 76 ++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 69 insertions(+), 7 deletions(-) --- diff --git a/en-US/Connections.xml b/en-US/Connections.xml index e6ab7e8..f46cfcb 100644 --- a/en-US/Connections.xml +++ b/en-US/Connections.xml @@ -5,6 +5,7 @@ ]> <chapter id="libvirt_application_development_guide_using_python-Connections"> <title>Connections</title> + <indexterm><primary>Connections</primary></indexterm> <para> In libvirt, a connection is the underpinning of every action and object in the system. Every entity that wants to interact with @@ -48,6 +49,9 @@ conn = libvirt.openReadOnly(name)</programlisting>
<section> <title>open</title> + <indexterm><primary>open, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>open</secondary></indexterm> <para> The <literal>open</literal> function will attempt to open a connection for full read-write access. It does not have any scope for @@ -69,6 +73,9 @@ conn = libvirt.openReadOnly(name)</programlisting>
<section> <title>openReadOnly</title> + <indexterm><primary>openReadOnly, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>openReadOnly</secondary></indexterm> <para> The <literal>openReadOnly</literal> function will attempt to open a connection for read-only access. Such a connection has a restricted set of method @@ -91,6 +98,9 @@ conn = libvirt.openReadOnly(name)</programlisting>
<section> <title>openAuth</title> + <indexterm><primary>openAuth, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>openAuth</secondary></indexterm> <para> The <literal>openAuth</literal> function is the most flexible, and effectively obsoletes the previous two cunctions. It takes an extra parameter providing @@ -139,6 +149,9 @@ auth_tcp = "sasl"</screen>
<section> <title>close</title> + <indexterm><primary>close, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>close</secondary></indexterm> <para> A connection must be released by calling the <literal>close</literal> method of the <literal>virConnection</literal> class when no @@ -160,6 +173,9 @@ auth_tcp = "sasl"</screen>
<section id="libvirt_application_development_guide_using_python-Connections-URI_Formats"> <title>URI formats</title> + <indexterm><primary>URI format, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>URI format</secondary></indexterm> <para> Libvirt uses Uniform Resource Identifiers (URIs) to identify hypervisor connections. Both local and remote hypervisors are addressed by libvirt using URIs. @@ -184,6 +200,9 @@ driver+unix:///session</screen> </para> <table id='supporteddrivers' frame='all'> <title>Supported Drivers</title> + <indexterm><primary>Supported drivers, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>Supported drivers</secondary></indexterm> <tgroup cols='2' align='left' colsep='1' rowsep='1'> <colspec colname='c1' /> <colspec colname='c2' /> @@ -308,6 +327,9 @@ driver+unix:///session</screen>
<section id="libvirt_application_development_guide_using_python-Connections-Remote_URIs"> <title>Remote URIs</title> + <indexterm><primary>Remote URIs, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>Remote URIs</secondary></indexterm>
<para> Remote URIs have the general form ("[...]" meaning an optional part): @@ -593,6 +615,9 @@ command -p port [-l username] hostname netcat -U socket
<section id="libvirt_application_development_guide_using_python-Connections-Capability_Info"> <title>Capability information</title> + <indexterm><primary>Capability information, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>Capability information</secondary></indexterm> <para> The <literal>getCapabilities</literal> method call can be used to obtain information about the capabilities of the virtualization host. If @@ -602,8 +627,8 @@ command -p port [-l username] hostname netcat -U socket The following code demonstrates the use of the <literal>getCapabilities</literal> method: </para> - <example id="Example-ConnectGetCapabilities"> - <title>Using virConnectGetCapabilities</title> + <example id="Example-getCapabilities"> + <title>Using getCapabilities</title> <programlisting language="Python"><xi:include href="extras/Connections-Example-8.py" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting> </example> <para> @@ -870,6 +895,9 @@ command -p port [-l username] hostname netcat -U socket
<section id="libvirt_application_development_guide_using_python-Connections-Host_Info"> <title>Host information</title> + <indexterm><primary>Host information, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>Host information</secondary></indexterm> <para> There are various Python <literal>virConnection</literal> methods that can be used to get information about the virtualization host, including the hostname, maximum support guest @@ -878,6 +906,9 @@ command -p port [-l username] hostname netcat -U socket
<section> <title>getHostname</title> + <indexterm><primary>getHost, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>getHost</secondary></indexterm> <para> The <command>getHostname</command> method can be used to obtain the hostname of the virtualization host as returned by gethostname(2). It takes a @@ -894,9 +925,12 @@ command -p port [-l username] hostname netcat -U socket </section>
<section> - <title>virConnectGetMaxVcpus</title> + <title>getMaxVcpus</title> + <indexterm><primary>getMaxVcpus, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>getMaxVcpus</secondary></indexterm> <para> - The <command>virConnectGetMaxVcpus</command> API call can be used to obtain the maximum + The <command>getMaxVcpus</command> method can be used to obtain the maximum number of virtual CPUs per-guest the underlying virtualization technology supports. It takes a virtualization "type" as input (which can be <literal>None</literal>), and if successful, @@ -912,13 +946,16 @@ command -p port [-l username] hostname netcat -U socket
<section> <title>getInfo</title> + <indexterm><primary>getInfo, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>getInfo</secondary></indexterm> <para> The <command>getInfo</command> method can be used to obtain various information about the virtualization host. The method returns a Python <literal>list</literal> if successful and <literal>None</literal> if and error occurred. The Python <literal>list</literal> contains the following members: </para> - <table id='virNodeInfo-structure-mem' frame='all'> + <table id='virNodeInfo-class-mem' frame='all'> <title>virNodeInfo structure members</title> <tgroup cols='2' align='left' colsep='1' rowsep='1'> <colspec colname='c1' /> @@ -1016,14 +1053,17 @@ command -p port [-l username] hostname netcat -U socket <para> The following code demonstrates the use of <command>virNodeGetInfo</command>: </para> - <example id="Example-NodeGetInfo"> - <title>Using virNodeGetInfo</title> + <example id="Example-getInfo"> + <title>Using getInfo</title> <programlisting language="Python"><xi:include href="extras/Connections-Example-12.py" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting> </example> </section>
<section> <title>getCellsFreeMemory</title> + <indexterm><primary>getCellsFreeMemory, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>getCellsFreeMemory</secondary></indexterm> <para> The <command>getCellsFreeMemory</command> method can be used to obtain the amount of free memory (in kilobytes) in some or all of the NUMA @@ -1042,6 +1082,9 @@ command -p port [-l username] hostname netcat -U socket
<section> <title>getType</title> + <indexterm><primary>getType, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>getType</secondary></indexterm> <para> The <command>getType</command> method can be used to obtain the type of virtualization in use on this connection. @@ -1058,6 +1101,9 @@ command -p port [-l username] hostname netcat -U socket
<section> <title>getVersion</title> + <indexterm><primary>getVersion, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>getVersion</secondary></indexterm> <para> The <command>getVersion</command> method can be used to obtain the version of the host virtualization software in use. If successful it returns a Python string @@ -1072,6 +1118,9 @@ command -p port [-l username] hostname netcat -U socket
<section> <title>getLibVersion</title> + <indexterm><primary>getLibVersion, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>getLibVersion</secondary></indexterm> <para> The <command>getLibVersion</command> method can be used to obtain the version of the libvirt software in use on the host. @@ -1087,6 +1136,9 @@ command -p port [-l username] hostname netcat -U socket
<section> <title>getURI</title> + <indexterm><primary>getURI, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>getURI</secondary></indexterm> <para> The <command>getURI</command> method can be used to obtain the URI for the current connection. While this is typically the same string that @@ -1104,6 +1156,9 @@ command -p port [-l username] hostname netcat -U socket
<section> <title>isEncrypted</title> + <indexterm><primary>isEncrypted, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>isEncrypted</secondary></indexterm> <para> The <command>isEncrypted</command> method can be used to find out if a given connection is encrypted. @@ -1119,6 +1174,9 @@ command -p port [-l username] hostname netcat -U socket
<section> <title>isSecure</title> + <indexterm><primary>isSecure, Connection</primary></indexterm> + <indexterm><primary>Connections</primary> + <secondary>isSecure</secondary></indexterm> <para> The <command>isSecure</command> method can be used to find out if a given connection is encrypted. A connection will be classified secure if @@ -1139,6 +1197,7 @@ command -p port [-l username] hostname netcat -U socket
<section id="libvirt_application_development_guide_using_python-Connections-Event_Loop"> <title>Event loop integration</title> + <indexterm><primary>Event loop integration</primary></indexterm> <para> Unlike the libvirt C interface, the Python libvirt module does not provide a mechanism for event loop integration. This is a known problem and may be addressed @@ -1148,6 +1207,7 @@ command -p port [-l username] hostname netcat -U socket
<section id="libvirt_application_development_guide_using_python-Connections-Security"> <title>Security model</title> + <indexterm><primary>Security model</primary></indexterm> <para> Unlike the libvirt C interface, the Python libvirt module does not provide a mechanism for accessing the security model. This is a known problem and may be addressed @@ -1157,6 +1217,8 @@ command -p port [-l username] hostname netcat -U socket
<section id="libvirt_application_development_guide_using_python-Connections-Debug"> <title>Debugging / logging</title> + <indexterm><primary>Debugging</primary></indexterm> + <indexterm><primary>Logging</primary></indexterm> <para> Libvirt includes logging facilities to facilitate the tracing of library execution. These logs will frequently be requested when trying to
docs-commits@lists.fedoraproject.org