From af1b89d1d4f975c904789cf73fe35ae0c659282a Mon Sep 17 00:00:00 2001
From: Martin Kletzander
tag, because page.xsl has no idea where to point the link that's found.
Signed-off-by: Martin Kletzander
virConnectPtr
, which
represents the connection to a hypervisor. Any application using libvirt
is likely to start using the
- API by calling one of the virConnectOpen functions. You will note that those functions take
a name argument which is actually a connection URI
to select the right hypervisor to open.
@@ -26,7 +26,10 @@
name will default to a preselected hypervisor, but it's probably not a
wise thing to do in most cases. See the connection
URI page for a full descriptions of the values allowed.
- Once the application obtains a virConnectPtr
+
OnDevice the application obtains a
+
+ virConnectPtr
+
connection to the hypervisor it can then use it to manage the hypervisor's
available domains and related virtualization
resources, such as storage and networking. All those are
@@ -38,33 +41,61 @@
The figure above shows the five main objects exported by the API:
virConnectPtr
+ virConnectPtr
+
Represents the connection to a hypervisor. Use one of the - virConnectOpen + virConnectOpen functions to obtain connection to the hypervisor which is then used as a parameter to other connection API's.
virDomainPtr
+ virDomainPtr
+
Represents one domain either active or defined (i.e. existing as
permanent config file and storage but not currently running on that
- node). The function virConnectListAllDomains
+ node). The function
+
+ virConnectListAllDomains
+
lists all the domains for the hypervisor.
virNetworkPtr
+ virNetworkPtr
+
Represents one network either active or defined (i.e. existing
as permanent config file and storage but not currently activated).
- The function virConnectListAllNetworks
+ The function
+
+ virConnectListAllNetworks
+
lists all the virtualization networks for the hypervisor.
virStorageVolPtr
+ virStorageVolPtr
+
Represents one storage volume generally used
as a block device available to one of the domains. The function
- virStorageVolLookupByPath
finds
- the storage volume object based on its path on the node.
virStoragePoolPtr
+
+ virStorageVolLookupByPath
+
+ finds the storage volume object based on its path on the node.virStoragePoolPtr
+
Represents a storage pool, which is a logical area
used to allocate and store storage volumes. The function
- virConnectListAllStoragePools
lists
- all of the virtualization storage pools on the hypervisor. The function
- virStoragePoolLookupByVolume
finds
- the storage pool containing a given storage volume.
virConnectListAllStoragePools
+
+ lists all of the virtualization storage pools on the hypervisor.
+ The function
+
+ virStoragePoolLookupByVolume
+
+ finds the storage pool containing a given storage volume.
Most objects manipulated by the library can also be represented using XML descriptions. This is used primarily to create those object, but is @@ -101,42 +132,114 @@
Used to perform lookups on objects by some type of identifier, such as:
virDomainLookupByID
virDomainLookupByName
virDomainLookupByUUID
virDomainLookupByUUIDString
virDomainLookupByID
+
+ virDomainLookupByName
+
+ virDomainLookupByUUID
+
+ virDomainLookupByUUIDString
+
+ Used to enumerate a set of object available to an given hypervisor connection such as:
virConnectListDomains
virConnectNumOfDomains
virConnectListNetworks
virConnectListStoragePools
virConnectListDomains
+
+ virConnectNumOfDomains
+
+ virConnectListNetworks
+
+ virConnectListStoragePools
+
+ Generic accessor providing a set of generic information about an object, such as:
virNodeGetInfo
virDomainGetInfo
virStoragePoolGetInfo
virStorageVolGetInfo
virNodeGetInfo
+
+ virDomainGetInfo
+
+ virStoragePoolGetInfo
+
+ virStorageVolGetInfo
+
+ Specific accessors used to query or modify data for the given object, such as:
virConnectGetType
virDomainGetMaxMemory
virDomainSetMemory
virDomainGetVcpus
virStoragePoolSetAutostart
virNetworkGetBridgeName
virConnectGetType
+
+ virDomainGetMaxMemory
+
+ virDomainSetMemory
+
+ virDomainGetVcpus
+
+ virStoragePoolSetAutostart
+
+ virNetworkGetBridgeName
+
+ virDomainCreate
virDomainCreateXML
virNetworkCreate
virNetworkCreateXML
virDomainCreate
+
+ virDomainCreateXML
+
+ virNetworkCreate
+
+ virNetworkCreateXML
+
+ Used to shutdown or deactivate and destroy objects, such as:
virDomainDestroy
virNetworkDestroy
virStoragePoolDestroy
virDomainDestroy
+
+ virNetworkDestroy
+
+ virStoragePoolDestroy
+
+ Drivers are the basic building block for libvirt functionality
to support the capability to handle specific hypervisor driver calls.
Drivers are discovered and registered during connection processing as
- part of the virInitialize
API. Each driver
+ part of the
+
+ virInitialize
+
+ API. Each driver
has a registration API which loads up the driver specific function
references for the libvirt APIs to call. The following is a simplistic
view of the hypervisor driver mechanism. Consider the stacked list of
@@ -199,7 +334,10 @@
The libvirtd daemon service is started on the host at system boot
time and can also be restarted at any time by a properly privileged
user, such as root. The libvirtd daemon uses the same libvirt API
- virInitialize
sequence as applications
+
+ virInitialize
+
+ sequence as applications
for client-side driver registrations, but then extends the registered
driver list to encompass all known drivers supported for all driver
types supported on the host.
and then extra raw information about the error which may be initialized
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index d05912e51e..8fcbd29549 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -190,7 +190,7 @@
"emulate" (let the hypervisor generate all values), "host" (copy
all of Block 0 and Block 1, except for the UUID, from the host's
SMBIOS values;
- the
+ the
virConnectGetSysinfo
call can be
used to see what values are copied), or "sysinfo" (use the values in
the sysinfo element). If not
@@ -1196,9 +1196,16 @@
It is sometimes necessary to override the default actions taken
on various events. Not all hypervisors support all events and actions.
The actions may be taken as a result of calls to libvirt APIs
- virDomainReboot
,
- virDomainShutdown
, or
- virDomainShutdownFlags
.
+
+ virDomainReboot
+ ,
+
+ virDomainShutdown
+ ,
+ or
+
+ virDomainShutdownFlags
+ .
Using virsh reboot
or virsh shutdown
would
also trigger the event.
The main difference between virConnectGetCapabilities
and the emulator
- capabilities API is, the former one aims more on the host capabilities
- (e.g. NUMA topology, security models in effect, etc.) while the latter one
- specializes on the hypervisor capabilities.
The main difference between
+
+ virConnectGetCapabilities
+
+ and the emulator capabilities API is, the former one aims more on
+ the host capabilities (e.g. NUMA topology, security models in
+ effect, etc.) while the latter one specializes on the hypervisor
+ capabilities.
While the Driver Capabilities provides the host capabilities (e.g NUMA topology, security models in effect, etc.), the @@ -41,7 +44,9 @@ 1.2.7):
-virConnectGetDomainCapabilities
+ +virConnectGetDomainCapabilities
+
The root element that emulator capability XML document starts with has
diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl
index 6bbd44a818..44a30ce45a 100755
--- a/docs/hvsupport.pl
+++ b/docs/hvsupport.pl
@@ -4,6 +4,8 @@ use strict;
use warnings;
use File::Find;
+use XML::XPath;
+use XML::XPath::XMLParser;
die "syntax: $0 SRCDIR\n" unless int(@ARGV) == 1;
@@ -52,6 +54,7 @@ open FILE, "<$symslibvirt"
my $vers;
my $prevvers;
+my $apixpath = XML::XPath->new(filename => "$srcdir/../docs/libvirt-api.xml");
while (defined($line = The bindings are articulated around a few
classes in the
-
- become
-
- become
-The URI is passed as the $api
+
+EOF
+
+ if (defined $htmlgrp) {
+ print < $vers
EOF
diff --git a/docs/java.html.in b/docs/java.html.in
index daa7b769b2..659c0b90f4 100644
--- a/docs/java.html.in
+++ b/docs/java.html.in
@@ -98,18 +98,18 @@ the code you can build the code with
org/libvirt
package, notably the
Connect
, Domain
and Network
-ones. Functions in the C API
+ones. Functions in the C API
taking virConnectPtr
, virDomainPtr
or
virNetworkPtr
as their first argument usually become
methods for the classes, their name is just stripped from the
virConnect or virDomain(Get) prefix and the first letter gets converted to
lower case, for example the C functions:int virConnectNumOfDomains
+
int virConnectNumOfDomains
(virConnectPtr conn);
int virDomainSetMaxMemory
+
int virDomainSetMaxMemory
(virDomainPtr domain, unsigned long memory);
- int virConnectNumOfDomains
+
int virConnectNumOfDomains
(virConnectPtr conn);
int virDomainSetMaxMemory
+
int virDomainSetMaxMemory
(virDomainPtr domain, unsigned long memory);
-
diff --git a/docs/uri.html.in b/docs/uri.html.in
index 73c3e88f3e..7702ccc6e6 100644
--- a/docs/uri.html.in
+++ b/docs/uri.html.in
@@ -19,7 +19,15 @@ documents libvirt URIs.
virConnectListDomains
+ virConnectListDomains
is replaced by virDomain::listDomainsID(self)
which returns
a list of the integer ID for the currently running domainsvirDomainGetInfo
+ virDomainGetInfo
is replaced by virDomain::info()
which returns a list of
Specifying URIs to libvirt
name
parameter to virConnectOpen
or virConnectOpenReadOnly
. For example:
+ The URI is passed as the name
parameter to
+
+ virConnectOpen
+
+ or
+
+ virConnectOpenReadOnly
+ .
+ For example:
virConnectPtr conn = virConnectOpenReadOnly ("test:///default");
@@ -291,7 +299,7 @@ Notes: