From: Daniel Veillard Date: Mon, 20 Feb 2006 20:50:48 +0000 (+0000) Subject: * docs/examples/examples.xsl docs/examples/index.html X-Git-Tag: LIBVIRT_0_0_5~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c5111b9c93a846dbbb04addce23d97c2778814a;p=thirdparty%2Flibvirt.git * docs/examples/examples.xsl docs/examples/index.html docs/site.xsl: integates the examples page in the web site * docs//* : fixed generator and rebuilt the docs * python/tests/basic.py python/tests/create.py: couple cleanups Daniel --- diff --git a/ChangeLog b/ChangeLog index b530336425..3cbe6a057a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Feb 20 21:48:55 CET 2006 Daniel Veillard + + * docs/examples/examples.xsl docs/examples/index.html + docs/site.xsl: integates the examples page in the web site + * docs//* : fixed generator and rebuilt the docs + * python/tests/basic.py python/tests/create.py: couple cleanups + Mon Feb 20 12:20:32 EST 2006 Daniel Veillard * TODO: updated diff --git a/docs/APIchunk0.html b/docs/APIchunk0.html index eb80b7a6bc..7370ed3ff1 100644 --- a/docs/APIchunk0.html +++ b/docs/APIchunk0.html @@ -5,7 +5,6 @@ s-z

Letter A:

ABI
_virDomainInfo
API
virDomainCreateLinux
-virDomainGetXMLDesc
APIs
virConnectOpenReadOnly
After
virDomainSave

Letter C:

CPU
virDomainSuspend
@@ -31,15 +30,13 @@

Letter L:

Launch
virDomainCreateLinux
Linux
virDomainCreateLinux

Letter M:

Macro
LIBVIR_VERSION_NUMBER
-

Letter N:

NOTE:
virDomainGetXMLDesc
-
NULL
virConnectGetType
+

Letter N:

NULL
virConnectGetType
virConnectOpen
virConnectOpenReadOnly
virDomainCreateLinux
virDomainGetMaxMemory
virDomainGetName
virDomainGetOSType
-virDomainGetXMLDesc
virDomainLookupByID
virDomainLookupByName
virDomainSetMaxMemory
@@ -48,8 +45,7 @@ virDomainShutdown

Letter O:

OUT
virConnectGetVersion
virGetVersion
-

Letter P:

Provide
virDomainGetXMLDesc
-
Provides
virConnectNumOfDomains
+

Letter P:

Provides
virConnectNumOfDomains
virGetVersion

Letter R:

Read-Only
virConnectGetVersion
Resume
virDomainResume
@@ -71,11 +67,9 @@ virDomainSuspend
Try
virDomainLookupByID
virDomainLookupByName
-

Letter U:

UTF-8
virDomainGetXMLDesc
-
Use
virDomainSave
+

Letter U:

Use
virDomainSave
virDomainSuspend

Letter X:

XML
virDomainCreateLinux
-virDomainGetXMLDesc
Xen
virGetVersion

Letter a:

about
virDomainGetInfo
access
_virDomainInfo
@@ -134,14 +128,12 @@
called
virConnectClose
virConnectOpen
virConnectOpenReadOnly
-
caller
virDomainGetXMLDesc
calling
virDomainResume
can
_virDomainInfo
virConnectGetVersion
virDomainGetInfo
capacities
virConnectGetVersion
change
virDomainSetMaxMemory
-
changes
virDomainGetXMLDesc
check
_virDomainInfo
clients
_virDomainInfo
closes
virConnectClose
@@ -171,7 +163,6 @@
deallocated
virDomainGetName
defined
virDomainCreateLinux
description
virDomainCreateLinux
-virDomainGetXMLDesc
device
_virDomainKernel
disk
virDomainRestore
virDomainSave
@@ -181,8 +172,7 @@ virConnectNumOfDomains
virConnectOpenReadOnly
down
virDomainDestroy
-

Letter e:

encoded
virDomainGetXMLDesc
-
error
virConnectClose
+

Letter e:

error
virConnectClose
virConnectGetType
virConnectGetVersion
virConnectListDomains
@@ -193,13 +183,11 @@ virDomainGetID
virDomainGetMaxMemory
virDomainGetOSType
-virDomainGetXMLDesc
virGetVersion
especially
virConnectClose
extracted
_virDomainInfo
virConnectGetVersion
virDomainGetInfo
-
extraction
virDomainGetXMLDesc

Letter f:

failure
virDomainCreateLinux
virDomainDestroy
virDomainFree
@@ -218,7 +206,6 @@
find
virDomainLookupByID
first
virConnectOpen
virConnectOpenReadOnly
-
flags
virDomainGetXMLDesc
for
_virDomainInfo
virConnectGetVersion
virDomainGetID
@@ -230,7 +217,6 @@
format
virGetVersion
found
virConnectListDomains
virConnectNumOfDomains
-
free
virDomainGetXMLDesc
freed
virDomainDestroy
virDomainFree
from
_virDomainInfo
@@ -252,4 +238,4 @@

A-f g-r s-z -

related links

Graphics and design by Diana Fong

+

diff --git a/docs/APIchunk1.html b/docs/APIchunk1.html index 9e82b77187..6092e4ab69 100644 --- a/docs/APIchunk1.html +++ b/docs/APIchunk1.html @@ -38,7 +38,6 @@
init
_virDomainKernel
instance
virDomainDestroy
virDomainFree
-virDomainGetXMLDesc
int
virDomainGetID
interaction
virConnectClose
its
virDomainGetName
@@ -87,7 +86,6 @@ virConnectGetVersion
virGetVersion
monitoring
virConnectClose
-
must
virDomainGetXMLDesc

Letter n:

name
virConnectGetType
virDomainGetName
virDomainLookupByName
@@ -103,7 +101,6 @@ virDomainDestroy
virDomainFree
virDomainGetName
-virDomainGetXMLDesc
virDomainSave
virDomainShutdown
virGetVersion
@@ -119,7 +116,6 @@ virDomainGetMaxMemory
virDomainGetName
virDomainGetOSType
-virDomainGetXMLDesc
virDomainLookupByID
virDomainLookupByName
virDomainResume
@@ -200,8 +196,7 @@
return
virConnectGetVersion
virDomainDestroy
virGetVersion
-
returned
virDomainGetXMLDesc
-virGetVersion
+
returned
virGetVersion
returns
virConnectGetVersion
root
_virDomainKernel
running
_virDomainInfo
@@ -215,4 +210,4 @@

A-f g-r s-z -

related links

Graphics and design by Diana Fong

+

diff --git a/docs/APIchunk2.html b/docs/APIchunk2.html index 245035d236..ef6756423a 100644 --- a/docs/APIchunk2.html +++ b/docs/APIchunk2.html @@ -10,7 +10,6 @@
set
virConnectOpenReadOnly
virDomainCreateLinux
virDomainGetInfo
-virDomainGetXMLDesc
should
virConnectClose
virConnectOpen
virConnectOpenReadOnly
@@ -37,7 +36,6 @@ virDomainDestroy
virDomainFree
virDomainGetInfo
-
subject
virDomainGetXMLDesc
success
virConnectClose
virDomainDestroy
virDomainFree
@@ -54,7 +52,6 @@
system
virDomainGetOSType

Letter t:

term
_virDomainInfo
terminated
virConnectGetType
-virDomainGetXMLDesc
that
virDomainGetInfo
virDomainGetName
virDomainShutdown
@@ -68,7 +65,6 @@ virDomainFree
this
_virDomainInfo
virDomainGetMaxMemory
-virDomainGetXMLDesc
virDomainSave
virDomainSetMaxMemory
two
virGetVersion
@@ -86,11 +82,9 @@ virDomainDestroy
virDomainFree
virDomainGetInfo
-virDomainGetXMLDesc
virDomainSuspend
user
virDomainGetInfo

Letter v:

value
virConnectGetVersion
-virDomainGetXMLDesc
virGetVersion
values
virGetVersion
version
LIBVIR_VERSION_NUMBER
@@ -122,13 +116,11 @@ virConnectGetVersion
without
virDomainSuspend
work
virConnectGetVersion
-
would
virDomainCreateLinux

Letter x:

xen
virConnectOpen
xenstore
_virDomainInfo

Letter y:

yet
virDomainCreateLinux
-virDomainGetXMLDesc

Letter z:

zero
virConnectGetType

A-f g-r s-z -

related links

Graphics and design by Diana Fong

+

diff --git a/docs/APIconstructors.html b/docs/APIconstructors.html index c403013292..2c4b7e7654 100644 --- a/docs/APIconstructors.html +++ b/docs/APIconstructors.html @@ -7,4 +7,4 @@

Type virDomainPtr:

virDomainCreateLinux
virDomainLookupByID
virDomainLookupByName
-

related links

Graphics and design by Diana Fong

+

diff --git a/docs/APIfiles.html b/docs/APIfiles.html index c5cca77767..d939e973fe 100644 --- a/docs/APIfiles.html +++ b/docs/APIfiles.html @@ -56,4 +56,4 @@ virDomainState
virDomainSuspend
virGetVersion
-

related links

Graphics and design by Diana Fong

+

diff --git a/docs/APIfunctions.html b/docs/APIfunctions.html index e695f402ef..dd24cec462 100644 --- a/docs/APIfunctions.html +++ b/docs/APIfunctions.html @@ -28,4 +28,4 @@ virDomainSetMaxMemory
virDomainShutdown
virDomainSuspend
-

related links

Graphics and design by Diana Fong

+

diff --git a/docs/APIsymbols.html b/docs/APIsymbols.html index 217054c150..ead255a998 100644 --- a/docs/APIsymbols.html +++ b/docs/APIsymbols.html @@ -56,4 +56,4 @@ virDomainState
virDomainSuspend
virGetVersion
-

related links

Graphics and design by Diana Fong

+

diff --git a/docs/FAQ.html b/docs/FAQ.html index b959fba840..adae05a20b 100644 --- a/docs/FAQ.html +++ b/docs/FAQ.html @@ -77,4 +77,4 @@ via the pkg-config command line tool, like:

pkg-config libvirt --libs

-

+

diff --git a/docs/apibuild.py b/docs/apibuild.py index 15c01ce85a..9cbd9f7ffb 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -26,6 +26,8 @@ ignored_files = { "xend_internal.c": "internal code", "sexpr.h": "internal includes and defines", "sexpr.c": "internal code", + "xml.h": "internal includes and defines", + "xml.c": "internal code", } ignored_words = { diff --git a/docs/architecture.html b/docs/architecture.html index b1bd83a5f3..98e729455b 100644 --- a/docs/architecture.html +++ b/docs/architecture.html @@ -24,4 +24,4 @@ connect to initialize the library. It will try to open the read-only socket /var/run/xenstored/socket_ro to connect to the Xen Store and also try to use the RPC to the Xen daemon. In this case use of hypervisor calls and write to the Xen Store will not be possible, restraining the amount -of APIs available and slowing down information gathering about domains.

+of APIs available and slowing down information gathering about domains.

diff --git a/docs/bugs.html b/docs/bugs.html index 3776e9fbfe..53923f0fe8 100644 --- a/docs/bugs.html +++ b/docs/bugs.html @@ -7,4 +7,4 @@ page and follow the instructions. Patches with explanations and provided as attachments are really appreciated and will be discussed on the mailing list. If possible generate the patches by using cvs diff -u in a CVS checkout.

We expect to use Red Hat Bugzilla to track bugs for libvirt, though there isn't a libvirt software -module defined yet, in the meantime use the mailing-list, thanks !.

+module defined yet, in the meantime use the mailing-list, thanks !.

diff --git a/docs/downloads.html b/docs/downloads.html index 5cc1c5947e..9ba8db73c9 100644 --- a/docs/downloads.html +++ b/docs/downloads.html @@ -6,4 +6,4 @@ tarballs updated from CVS head every hour

Anonymous

related links

Graphics and design by Diana Fong

+available except commiting to the base.

diff --git a/docs/examples/examples.xsl b/docs/examples/examples.xsl index 74aaaa20cb..912528a0c0 100644 --- a/docs/examples/examples.xsl +++ b/docs/examples/examples.xsl @@ -31,28 +31,28 @@ - +
  • - +
  • line : Type from
  • - +
  • line : Function from
  • - +
  • line : Macro from
  • @@ -60,12 +60,6 @@

    :

    -

    Includes:

    -
      - - - -

    Uses:

      @@ -101,9 +95,9 @@

    Getting the compilation options and libraries dependancies needed to generate binaries from the examples is best done on Linux/Unix by using -the xml2-config script which should have been installed as part of make -install step or when installing the libxml2 development package:

    -
    gcc -o example `xml2-config --cflags` example.c `xml2-config --libs`
    +the pkg-config data which should have been installed as part of make +install step or when installing the libvirt development package:

    +
    gcc -o example example.c `pkg-config libvirt --libs`
    @@ -115,58 +109,34 @@ install step or when installing the libxml2 development package:

    - Libxml2 set of examples + Libvirt set of C code examples - - - - + + + + - - - - - - - - -
    - - - - - -
    - - - - - - -
    - - - - -
    - - - - -
    - - -

    Daniel Veillard

    -
    -
    -
    -
    -
    - + +
    +
    +
    + + + +
    + diff --git a/docs/examples/index.html b/docs/examples/index.html new file mode 100644 index 0000000000..8cdeed7675 --- /dev/null +++ b/docs/examples/index.html @@ -0,0 +1,7 @@ + + +Libvirt set of C code examples

    Libvirt set of C code examples

    The examples are stored per section depending on the main focus + of the example:

    Getting the compilation options and libraries dependancies needed +to generate binaries from the examples is best done on Linux/Unix by using +the pkg-config data which should have been installed as part of make +install step or when installing the libvirt development package:

    gcc -o example example.c `pkg-config libvirt --libs`

    Informations Examples

    info1.c: Extract informations about Xen domain 0

    Demonstrate the basic use of the library to connect to the hypervisor and extract domain informations.

    Uses:

    Usage:

    info1

    Author: Daniel Veillard

    diff --git a/docs/html/book1.html b/docs/html/book1.html index 893b6f1e85..f857984bf6 100644 --- a/docs/html/book1.html +++ b/docs/html/book1.html @@ -1,3 +1,3 @@ -Reference Manual for libvirt

    Reference Manual for libvirt

    Table of Contents

    • libvirt: core interfaces for the libvirt library

    related links

    Graphics and design by Diana Fong

    +Reference Manual for libvirt

    Reference Manual for libvirt

    Table of Contents

    • libvirt: core interfaces for the libvirt library

    diff --git a/docs/html/index.html b/docs/html/index.html index 893b6f1e85..f857984bf6 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -1,3 +1,3 @@ -Reference Manual for libvirt

    Reference Manual for libvirt

    Table of Contents

    • libvirt: core interfaces for the libvirt library

    related links

    Graphics and design by Diana Fong

    +Reference Manual for libvirt

    Reference Manual for libvirt

    Table of Contents

    • libvirt: core interfaces for the libvirt library

    diff --git a/docs/html/libvir-lib.html b/docs/html/libvir-lib.html deleted file mode 100644 index 8782418738..0000000000 --- a/docs/html/libvir-lib.html +++ /dev/null @@ -1,3 +0,0 @@ - - -Reference Manual for libvir

    Reference Manual for libvir

    Table of Contents

    • libvir: core interfaces for the libvir library

    related links

    Graphics and design by Diana Fong

    diff --git a/docs/html/libvir-libvir.html b/docs/html/libvir-libvir.html deleted file mode 100644 index 76685609be..0000000000 --- a/docs/html/libvir-libvir.html +++ /dev/null @@ -1,141 +0,0 @@ - - -Module libvir from libvir

    Module libvir from libvir

    Provides the interfaces of the libvir library to handle Xen domains from a process running in domain 0

    Table of Contents

    #define LIBVIR_VERSION_NUMBER
    Structure virConnect
    struct _virConnect -The content of this structure is not made public by the API. -
    Typedef virConnect * virConnectPtr
    -
    Enum virDeviceMode
    -
    Structure virDomain
    struct _virDomain -The content of this structure is not made public by the API. -
    Enum virDomainCreateFlags
    -
    Structure virDomainInfo
    struct _virDomainInfo -
    Typedef virDomainInfo * virDomainInfoPtr
    -
    Structure virDomainKernel
    struct _virDomainKernel -
    Typedef virDomainKernel * virDomainKernelPtr
    -
    Typedef virDomain * virDomainPtr
    -
    Enum virDomainRestart
    -
    Enum virDomainState
    -
    int	virConnectClose			(virConnectPtr conn)
    -
    const char *	virConnectGetType	(virConnectPtr conn)
    -
    int	virConnectGetVersion		(virConnectPtr conn, 
    unsigned long * hvVer)
    -
    int	virConnectListDomains		(virConnectPtr conn, 
    int * ids,
    int maxids)
    -
    int	virConnectNumOfDomains		(virConnectPtr conn)
    -
    virConnectPtr	virConnectOpen		(const char * name)
    -
    virConnectPtr	virConnectOpenReadOnly	(const char * name)
    -
    virDomainPtr	virDomainCreateLinux	(virConnectPtr conn, 
    const char * kernel_path,
    const char * initrd_path,
    const char * cmdline,
    unsigned long memory,
    unsigned int flags)
    -
    int	virDomainDestroy		(virDomainPtr domain)
    -
    int	virDomainFree			(virDomainPtr domain)
    -
    unsigned int	virDomainGetID		(virDomainPtr domain)
    -
    int	virDomainGetInfo		(virDomainPtr domain, 
    virDomainInfoPtr info)
    -
    unsigned long	virDomainGetMaxMemory	(virDomainPtr domain)
    -
    const char *	virDomainGetName	(virDomainPtr domain)
    -
    char *	virDomainGetOSType		(virDomainPtr domain)
    -
    char *	virDomainGetXMLDesc		(virDomainPtr domain, 
    int flags)
    -
    virDomainPtr	virDomainLookupByID	(virConnectPtr conn, 
    int id)
    -
    virDomainPtr	virDomainLookupByName	(virConnectPtr conn, 
    const char * name)
    -
    int	virDomainRestore		(virConnectPtr conn, 
    const char * from)
    -
    int	virDomainResume			(virDomainPtr domain)
    -
    int	virDomainSave			(virDomainPtr domain, 
    const char * to)
    -
    int	virDomainSetMaxMemory		(virDomainPtr domain, 
    unsigned long memory)
    -
    int	virDomainShutdown		(virDomainPtr domain)
    -
    int	virDomainSuspend		(virDomainPtr domain)
    -
    int	virGetVersion			(unsigned long * libVer, 
    const char * type,
    unsigned long * typeVer)
    -

    Description

    -

    Macro: LIBVIR_VERSION_NUMBER

    #define LIBVIR_VERSION_NUMBER

    Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro

    -

    Structure virConnect

    Structure virConnect
    struct _virConnect { -The content of this structure is not made public by the API. -}
    - a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API. -

    Enum virDeviceMode

    Enum virDeviceMode {
    -    VIR_DEVICE_DEFAULT = 0 : Default mode
    -    VIR_DEVICE_RO = 1 : Access read-only
    -    VIR_DEVICE_RW = 2 : Access read-write
    -    VIR_DEVICE_RW_FORCE = 3 : Forced read-write even if already used
    -}
    -

    Structure virDomain

    Structure virDomain
    struct _virDomain { -The content of this structure is not made public by the API. -}

    Enum virDomainCreateFlags

    Enum virDomainCreateFlags {
    -    VIR_DOMAIN_NONE = 0
    -}
    -

    Structure virDomainInfo

    Structure virDomainInfo
    struct _virDomainInfo { - unsigned char state : the running state, one of virDomainFlag - unsigned long maxMem : the maximum memory in KBytes allowed - unsigned long memory : the memory in KBytes used by the domain - unsigned short nrVirtCpu : * Informations below are only available - unsigned long long cpuTime : * TODO: * - check what can be extracted -}
    - a virDomainInfoPtr is a pointer to a virDomainInfo structure. -

    Structure virDomainKernel

    Structure virDomainKernel
    struct _virDomainKernel { - const char * kernel : filename pointing to the kernel image - const char * ramdisk : an optional init ramdisk - const char * root : an optional root block device - const char * extra : optional kernel command line parameters -}
    - a virDomainKernelPtr is a pointer to a virDomainKernel structure. - - a virDomainPtr is pointer to a virDomain private structure, this is the type used to reference a Xen domain in the API. -

    Enum virDomainRestart

    Enum virDomainRestart {
    -    VIR_DOMAIN_DESTROY = 1 : destroy the domain
    -    VIR_DOMAIN_RESTART = 2 : restart the domain
    -    VIR_DOMAIN_PRESERVE = 3 : keep as is, need manual destroy, for debug
    -    VIR_DOMAIN_RENAME_RESTART = 4 : restart under an new unique name
    -}
    -

    Enum virDomainState

    Enum virDomainState {
    -    VIR_DOMAIN_NOSTATE = 0 : no state
    -    VIR_DOMAIN_RUNNING = 1 : the domain is running
    -    VIR_DOMAIN_BLOCKED = 2 : the domain is blocked on resource
    -    VIR_DOMAIN_PAUSED = 3 : the domain is paused by user
    -    VIR_DOMAIN_SHUTDOWN = 4 : the domain is being shut down
    -    VIR_DOMAIN_SHUTOFF = 5 : the domain is shut off
    -    VIR_DOMAIN_CRASHED = 6 : the domain is crashed
    -}
    -

    Function: virConnectClose

    int	virConnectClose			(virConnectPtr conn)
    -

    This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.

    -
    conn:pointer to the hypervisor connection
    Returns:0 in case of success or -1 in case of error.

    Function: virConnectGetType

    const char *	virConnectGetType	(virConnectPtr conn)
    -

    Get the name of the Hypervisor software used.

    -
    conn:pointer to the hypervisor connection
    Returns:NULL in case of error, a static zero terminated string otherwise.

    Function: virConnectGetVersion

    int	virConnectGetVersion		(virConnectPtr conn, 
    unsigned long * hvVer)
    -

    Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection.

    -
    conn:pointer to the hypervisor connection
    hvVer:return value for the version of the running hypervisor (OUT)
    Returns:-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release

    Function: virConnectListDomains

    int	virConnectListDomains		(virConnectPtr conn, 
    int * ids,
    int maxids)
    -

    Collect the list of active domains, and store their ID in @maxids

    -
    conn:pointer to the hypervisor connection
    ids:array to collect the list of IDs of active domains
    maxids:size of @ids
    Returns:the number of domain found or -1 in case of error

    Function: virConnectNumOfDomains

    int	virConnectNumOfDomains		(virConnectPtr conn)
    -

    Provides the number of active domains.

    -
    conn:pointer to the hypervisor connection
    Returns:the number of domain found or -1 in case of error

    Function: virConnectOpen

    virConnectPtr	virConnectOpen		(const char * name)
    -

    This function should be called first to get a connection to the Hypervisor and xen store

    -
    name:optional argument currently unused, pass NULL
    Returns:a pointer to the hypervisor connection or NULL in case of error

    Function: virConnectOpenReadOnly

    virConnectPtr	virConnectOpenReadOnly	(const char * name)
    -

    This function should be called first to get a restricted connection to the libbrary functionalities. The set of APIs usable are then restricted on the available methods to control the domains.

    -
    name:optional argument currently unused, pass NULL
    Returns:a pointer to the hypervisor connection or NULL in case of error

    Function: virDomainCreateLinux

    virDomainPtr	virDomainCreateLinux	(virConnectPtr conn, 
    const char * kernel_path,
    const char * initrd_path,
    const char * cmdline,
    unsigned long memory,
    unsigned int flags)
    -

    Launch a new Linux guest domain, unimplemented yet, API to be defined. This would function requires priviledged access to the hypervisor.

    -
    conn:pointer to the hypervisor connection
    kernel_path:the file path to the kernel image
    initrd_path:an optional file path to an initrd
    cmdline:optional command line parameters for the kernel
    memory:the memory size in kilobytes
    flags:an optional set of virDomainFlags
    Returns:a new domain object or NULL in case of failure

    Function: virDomainDestroy

    int	virDomainDestroy		(virDomainPtr domain)
    -

    Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires priviledged access

    -
    domain:a domain object
    Returns:0 in case of success and -1 in case of failure.

    Function: virDomainFree

    int	virDomainFree			(virDomainPtr domain)
    -

    Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.

    -
    domain:a domain object
    Returns:0 in case of success and -1 in case of failure.

    Function: virDomainGetID

    unsigned int	virDomainGetID		(virDomainPtr domain)
    -

    Get the hypervisor ID number for the domain

    -
    domain:a domain object
    Returns:the domain ID number or (unsigned int) -1 in case of error

    Function: virDomainGetInfo

    int	virDomainGetInfo		(virDomainPtr domain, 
    virDomainInfoPtr info)
    -

    Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the informations can be extracted.

    -
    domain:a domain object
    info:pointer to a virDomainInfo structure allocated by the user
    Returns:0 in case of success and -1 in case of failure.

    Function: virDomainGetMaxMemory

    unsigned long	virDomainGetMaxMemory	(virDomainPtr domain)
    -

    Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.

    -
    domain:a domain object or NULL
    Returns:the memory size in kilobytes or 0 in case of error.

    Function: virDomainGetName

    const char *	virDomainGetName	(virDomainPtr domain)
    -

    Get the public name for that domain

    -
    domain:a domain object
    Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.

    Function: virDomainGetOSType

    char *	virDomainGetOSType		(virDomainPtr domain)
    -

    Get the type of domain operation system.

    -
    domain:a domain object
    Returns:the new string or NULL in case of error

    Function: virDomainGetXMLDesc

    char *	virDomainGetXMLDesc		(virDomainPtr domain, 
    int flags)
    -

    Provide an XML description of the domain. NOTE: this API is subject to changes.

    -
    domain:a domain object
    flags:and OR'ed set of extraction flags, not used yet
    Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.

    Function: virDomainLookupByID

    virDomainPtr	virDomainLookupByID	(virConnectPtr conn, 
    int id)
    -

    Try to find a domain based on the hypervisor ID number

    -
    conn:pointer to the hypervisor connection
    id:the domain ID number
    Returns:a new domain object or NULL in case of failure

    Function: virDomainLookupByName

    virDomainPtr	virDomainLookupByName	(virConnectPtr conn, 
    const char * name)
    -

    Try to lookup a domain on the given hypervisor based on its name.

    -
    conn:pointer to the hypervisor connection
    name:name for the domain
    Returns:a new domain object or NULL in case of failure

    Function: virDomainRestore

    int	virDomainRestore		(virConnectPtr conn, 
    const char * from)
    -

    This method will restore a domain saved to disk by virDomainSave().

    -
    conn:pointer to the hypervisor connection
    from:path to the
    Returns:0 in case of success and -1 in case of failure.

    Function: virDomainResume

    int	virDomainResume			(virDomainPtr domain)
    -

    Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires priviledged access

    -
    domain:a domain object
    Returns:0 in case of success and -1 in case of failure.

    Function: virDomainSave

    int	virDomainSave			(virDomainPtr domain, 
    const char * to)
    -

    This method will suspend a domain and save its memory contents to a file on disk. After the call, if successful, the domain is not listed as running anymore (this may be a problem). Use virDomainRestore() to restore a domain after saving.

    -
    domain:a domain object
    to:path for the output file
    Returns:0 in case of success and -1 in case of failure.

    Function: virDomainSetMaxMemory

    int	virDomainSetMaxMemory		(virDomainPtr domain, 
    unsigned long memory)
    -

    Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires priviledged access to the hypervisor.

    -
    domain:a domain object or NULL
    memory:the memory size in kilobytes
    Returns:0 in case of success and -1 in case of failure.

    Function: virDomainShutdown

    int	virDomainShutdown		(virDomainPtr domain)
    -

    Shutdown a domain, the domain object is still usable there after but the domain OS is being stopped. Note that the guest OS may ignore the request. TODO: should we add an option for reboot, knowing it may not be doable in the general case ?

    -
    domain:a domain object
    Returns:0 in case of success and -1 in case of failure.

    Function: virDomainSuspend

    int	virDomainSuspend		(virDomainPtr domain)
    -

    Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use virDomainResume() to reactivate the domain. This function may requires priviledged access.

    -
    domain:a domain object
    Returns:0 in case of success and -1 in case of failure.

    Function: virGetVersion

    int	virGetVersion			(unsigned long * libVer, 
    const char * type,
    unsigned long * typeVer)
    -

    Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.

    -
    libVer:return value for the library version (OUT)
    type:hypervisor type
    typeVer:return value for the version of the hypervisor (OUT)
    Returns:-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.

    related links

    Graphics and design by Diana Fong

    diff --git a/docs/html/libvirt-lib.html b/docs/html/libvirt-lib.html index 893b6f1e85..f857984bf6 100644 --- a/docs/html/libvirt-lib.html +++ b/docs/html/libvirt-lib.html @@ -1,3 +1,3 @@ -Reference Manual for libvirt

    Reference Manual for libvirt

    Table of Contents

    • libvirt: core interfaces for the libvirt library

    related links

    Graphics and design by Diana Fong

    +Reference Manual for libvirt

    Reference Manual for libvirt

    Table of Contents

    • libvirt: core interfaces for the libvirt library

    diff --git a/docs/html/libvirt-libvirt.html b/docs/html/libvirt-libvirt.html index 9419c7e9ca..e405aa591e 100644 --- a/docs/html/libvirt-libvirt.html +++ b/docs/html/libvirt-libvirt.html @@ -103,7 +103,7 @@ The content of this structure is not made public by the API.
    name:optional argument currently unused, pass NULL
    Returns:a pointer to the hypervisor connection or NULL in case of error

    Function: virConnectOpenReadOnly

    virConnectPtr	virConnectOpenReadOnly	(const char * name)

    This function should be called first to get a restricted connection to the libbrary functionalities. The set of APIs usable are then restricted on the available methods to control the domains.

    name:optional argument currently unused, pass NULL
    Returns:a pointer to the hypervisor connection or NULL in case of error

    Function: virDomainCreateLinux

    virDomainPtr	virDomainCreateLinux	(virConnectPtr conn, 
    const char * xmlDesc,
    unsigned int flags)
    -

    Launch a new Linux guest domain, unimplemented yet, API to be defined. This would function requires priviledged access to the hypervisor.

    +

    Launch a new Linux guest domain, unimplemented yet, API to be defined. This function requires priviledged access to the hypervisor.

    conn:pointer to the hypervisor connection
    xmlDesc:an XML description of the domain
    flags:an optional set of virDomainFlags
    Returns:a new domain object or NULL in case of failure

    Function: virDomainDestroy

    int	virDomainDestroy		(virDomainPtr domain)

    Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires priviledged access

    domain:a domain object
    Returns:0 in case of success and -1 in case of failure.

    Function: virDomainFree

    int	virDomainFree			(virDomainPtr domain)
    @@ -119,8 +119,8 @@ The content of this structure is not made public by the API.
    domain:a domain object
    Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.

    Function: virDomainGetOSType

    char *	virDomainGetOSType		(virDomainPtr domain)

    Get the type of domain operation system.

    domain:a domain object
    Returns:the new string or NULL in case of error

    Function: virDomainGetXMLDesc

    char *	virDomainGetXMLDesc		(virDomainPtr domain, 
    int flags)
    -

    Provide an XML description of the domain. NOTE: this API is subject to changes.

    -
    domain:a domain object
    flags:and OR'ed set of extraction flags, not used yet
    Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.

    Function: virDomainLookupByID

    virDomainPtr	virDomainLookupByID	(virConnectPtr conn, 
    int id)
    +

    +
    domain:
    flags:
    Returns:

    Function: virDomainLookupByID

    virDomainPtr	virDomainLookupByID	(virConnectPtr conn, 
    int id)

    Try to find a domain based on the hypervisor ID number

    conn:pointer to the hypervisor connection
    id:the domain ID number
    Returns:a new domain object or NULL in case of failure

    Function: virDomainLookupByName

    virDomainPtr	virDomainLookupByName	(virConnectPtr conn, 
    const char * name)

    Try to lookup a domain on the given hypervisor based on its name.

    @@ -138,4 +138,4 @@ The content of this structure is not made public by the API.

    Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use virDomainResume() to reactivate the domain. This function may requires priviledged access.

    domain:a domain object
    Returns:0 in case of success and -1 in case of failure.

    Function: virGetVersion

    int	virGetVersion			(unsigned long * libVer, 
    const char * type,
    unsigned long * typeVer)

    Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.

    -
    libVer:return value for the library version (OUT)
    type:hypervisor type
    typeVer:return value for the version of the hypervisor (OUT)
    Returns:-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.

    related links

    Graphics and design by Diana Fong

    +
    libVer:return value for the library version (OUT)
    type:hypervisor type
    typeVer:return value for the version of the hypervisor (OUT)
    Returns:-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.

    diff --git a/docs/index.html b/docs/index.html index 4e83ed98db..60cd39615f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -53,7 +53,10 @@ mechanisms if needed.

    Reporting bugs and getting help
  • - API Menu + API Menu +
  • +
  • + C code examples
  • Recent Changes diff --git a/docs/intro.html b/docs/intro.html index dd9db02e36..2952a66972 100644 --- a/docs/intro.html +++ b/docs/intro.html @@ -27,4 +27,4 @@ for applications focusing on virtualization of a single node (the only exception being domain migration between node capabilities which may need to be added at the libvirt level). Where possible libvirt should be extendable to be able to provide the same API for remote nodes, however this is not the -case at the moment, the code currently handle only local node accesses.

    +case at the moment, the code currently handle only local node accesses.

    diff --git a/docs/libvirt-api.xml b/docs/libvirt-api.xml index f19b6cada7..4cabaa949a 100644 --- a/docs/libvirt-api.xml +++ b/docs/libvirt-api.xml @@ -159,7 +159,7 @@ - Launch a new Linux guest domain, unimplemented yet, API to be defined. This would function requires priviledged access to the hypervisor. + Launch a new Linux guest domain, unimplemented yet, API to be defined. This function requires priviledged access to the hypervisor. @@ -201,11 +201,11 @@ - - Provide an XML description of the domain. NOTE: this API is subject to changes. - - - + + + + + Try to find a domain based on the hypervisor ID number diff --git a/docs/libvirt-refs.xml b/docs/libvirt-refs.xml index ac86df8cbd..db8dcb2122 100644 --- a/docs/libvirt-refs.xml +++ b/docs/libvirt-refs.xml @@ -253,7 +253,6 @@ - @@ -336,9 +335,6 @@ - - - @@ -347,7 +343,6 @@ - @@ -365,9 +360,6 @@ - - - @@ -416,9 +408,6 @@ - - - @@ -427,7 +416,6 @@ - @@ -551,9 +539,6 @@ - - - @@ -568,9 +553,6 @@ - - - @@ -631,7 +613,6 @@ - @@ -656,9 +637,6 @@ - - - @@ -671,7 +649,6 @@ - @@ -682,9 +659,6 @@ - - - @@ -715,9 +689,6 @@ - - - @@ -735,9 +706,6 @@ - - - @@ -836,7 +804,6 @@ - @@ -946,9 +913,6 @@ - - - @@ -975,7 +939,6 @@ - @@ -997,7 +960,6 @@ - @@ -1154,7 +1116,6 @@ - @@ -1195,7 +1156,6 @@ - @@ -1247,9 +1207,6 @@ - - - @@ -1281,7 +1238,6 @@ - @@ -1307,7 +1263,6 @@ - @@ -1343,7 +1298,6 @@ - @@ -1353,7 +1307,6 @@ - @@ -1422,9 +1375,6 @@ - - - @@ -1437,7 +1387,6 @@ - diff --git a/docs/news.html b/docs/news.html index d3c59672e6..5687e90e3a 100644 --- a/docs/news.html +++ b/docs/news.html @@ -16,4 +16,4 @@ and check the ChangeLog to gauge progresses.

    0.0.1: Dec 19 2005

    • First release
    • Basic management of existing Xen domains
    • Minimal autogenerated Python bindings
    • -

    +

    diff --git a/docs/site.xsl b/docs/site.xsl index fdb6bd9995..2b7a7e9095 100644 --- a/docs/site.xsl +++ b/docs/site.xsl @@ -239,8 +239,8 @@
  • -
  • API Menu
  • +
  • API Menu
  • +
  • C code examples
  • Recent Changes
  • @@ -285,8 +285,8 @@ -
  • API Menu
  • +
  • API Menu
  • +
  • C code examples
  • Recent Changes
  • diff --git a/include/libvirt.h b/include/libvirt.h index 30269299ff..31658c329b 100644 --- a/include/libvirt.h +++ b/include/libvirt.h @@ -239,7 +239,6 @@ char * virDomainGetOSType (virDomainPtr domain); unsigned long virDomainGetMaxMemory (virDomainPtr domain); int virDomainSetMaxMemory (virDomainPtr domain, unsigned long memory); - /* * XML domain description */ diff --git a/include/libvirt/libvirt.h b/include/libvirt/libvirt.h index 30269299ff..31658c329b 100644 --- a/include/libvirt/libvirt.h +++ b/include/libvirt/libvirt.h @@ -239,7 +239,6 @@ char * virDomainGetOSType (virDomainPtr domain); unsigned long virDomainGetMaxMemory (virDomainPtr domain); int virDomainSetMaxMemory (virDomainPtr domain, unsigned long memory); - /* * XML domain description */ diff --git a/python/tests/basic.py b/python/tests/basic.py index a4ff4c4931..b6f8831a1e 100755 --- a/python/tests/basic.py +++ b/python/tests/basic.py @@ -1,6 +1,11 @@ #!/usr/bin/python -u import libvirt import sys +import os + +if not os.access("/proc/xen", os.R_OK): + print 'System is not running a Xen kernel' + sys.exit(1) conn = libvirt.openReadOnly(None) if conn == None: diff --git a/python/tests/create.py b/python/tests/create.py index 6ef415accb..d2823c8c4c 100755 --- a/python/tests/create.py +++ b/python/tests/create.py @@ -4,6 +4,10 @@ import sys import os import time +if not os.access("/proc/xen", os.R_OK): + print 'System is not running a Xen kernel' + sys.exit(1) + # # Try to provide default OS images paths here, of course non standard # @@ -23,10 +27,6 @@ if osroot == None: print "Could not find a guest OS root, edit to add the path in osroots" sys.exit(1) -if not os.access("/proc/xen", os.R_OK): - print 'System is not running a Xen kernel' - sys.exit(1) - kernel=open("/proc/version").read().split() kernelOv = kernel[2] kernelU = "/boot/vmlinuz-" + kernelOv.replace('hypervisor', 'guest')