diff --git a/ChangeLog b/ChangeLog index 16c80bab25..dfe00875f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Feb 27 17:36:29 EST 2006 Daniel Veillard + + * doc//*: rebuilt + Mon Feb 27 17:33:16 EST 2006 Daniel Veillard * TODO: updated, and added python hooks for error handling diff --git a/docs/APIchunk0.html b/docs/APIchunk0.html index 5b9e5ca667..f2999c93f3 100644 --- a/docs/APIchunk0.html +++ b/docs/APIchunk0.html @@ -11,7 +11,8 @@
Collect
virConnectListDomains
Copy
virConnCopyLastError
virCopyLastError
-

Letter D:

Destroy
virDomainDestroy
+

Letter D:

Default
virDefaultErrorFunc
+
Destroy
virDomainDestroy
Domain0
virDomainGetMaxMemory
virDomainSetMaxMemory
Dynamically
virDomainSetMaxMemory
diff --git a/docs/APIchunk2.html b/docs/APIchunk2.html index 261c812825..2fd2771469 100644 --- a/docs/APIchunk2.html +++ b/docs/APIchunk2.html @@ -66,6 +66,7 @@ virConnectNumOfDomains
virConnectOpen
virConnectOpenReadOnly
+virDefaultErrorFunc
virDomainCreateLinux
virDomainGetInfo
virDomainGetName
@@ -107,6 +108,7 @@
relaunch
virDomainGetXMLDesc
release
virConnectGetVersion
virGetVersion
+
reporting
virDefaultErrorFunc
request
virDomainShutdown
requires
virDomainCreateLinux
virDomainDestroy
@@ -134,6 +136,7 @@
returns
virConnectGetVersion
reused
virDomainGetXMLDesc
root
_virDomainKernel
+
routine
virDefaultErrorFunc
running
_virDomainInfo
virConnectClose
virConnectGetVersion
@@ -166,7 +169,8 @@ virDomainResume
static
virConnectGetType
stay
virDomainSuspend
-
stderr
virSetErrorFunc
+
stderr
virDefaultErrorFunc
+virSetErrorFunc
still
virDomainShutdown
stopped
virDomainShutdown
store
virConnectListDomains
diff --git a/docs/APIfiles.html b/docs/APIfiles.html index c1e9bf3d7b..bf662ba5c1 100644 --- a/docs/APIfiles.html +++ b/docs/APIfiles.html @@ -59,21 +59,45 @@ virDomainSuspend
virGetVersion

Module virterror:

VIR_ERR_ERROR
+VIR_ERR_GET_FAILED
+VIR_ERR_HTTP_ERROR
VIR_ERR_INTERNAL_ERROR
+VIR_ERR_INVALID_ARG
+VIR_ERR_INVALID_CONN
+VIR_ERR_INVALID_DOMAIN
VIR_ERR_NONE
+VIR_ERR_NO_CONNECT
+VIR_ERR_NO_DEVICE
+VIR_ERR_NO_KERNEL
VIR_ERR_NO_MEMORY
+VIR_ERR_NO_NAME
+VIR_ERR_NO_OS
+VIR_ERR_NO_ROOT
+VIR_ERR_NO_SOURCE
+VIR_ERR_NO_SUPPORT
+VIR_ERR_NO_TARGET
+VIR_ERR_NO_XEN
VIR_ERR_OK
+VIR_ERR_OPERATION_FAILED
+VIR_ERR_OS_TYPE
+VIR_ERR_POST_FAILED
+VIR_ERR_SEXPR_SERIAL
+VIR_ERR_UNKNOWN_HOST
VIR_ERR_WARNING
+VIR_ERR_XEN_CALL
VIR_FROM_DOM
VIR_FROM_NONE
+VIR_FROM_SEXPR
VIR_FROM_XEN
VIR_FROM_XEND
+VIR_FROM_XML
_virError
virConnCopyLastError
virConnGetLastError
virConnResetLastError
virConnSetErrorFunc
virCopyLastError
+virDefaultErrorFunc
virError
virErrorDomain
virErrorFunc
diff --git a/docs/APIfunctions.html b/docs/APIfunctions.html index a4ccfd4c2d..32f1d4c93d 100644 --- a/docs/APIfunctions.html +++ b/docs/APIfunctions.html @@ -40,6 +40,7 @@ virSetErrorFunc

Type virErrorPtr:

virConnCopyLastError
virCopyLastError
+virDefaultErrorFunc
virErrorFunc
virResetError

Type void *:

virConnSetErrorFunc
diff --git a/docs/APIsymbols.html b/docs/APIsymbols.html index 000003d662..639d09200b 100644 --- a/docs/APIsymbols.html +++ b/docs/APIsymbols.html @@ -18,15 +18,38 @@ VIR_DOMAIN_SHUTDOWN
VIR_DOMAIN_SHUTOFF
VIR_ERR_ERROR
+VIR_ERR_GET_FAILED
+VIR_ERR_HTTP_ERROR
VIR_ERR_INTERNAL_ERROR
+VIR_ERR_INVALID_ARG
+VIR_ERR_INVALID_CONN
+VIR_ERR_INVALID_DOMAIN
VIR_ERR_NONE
+VIR_ERR_NO_CONNECT
+VIR_ERR_NO_DEVICE
+VIR_ERR_NO_KERNEL
VIR_ERR_NO_MEMORY
+VIR_ERR_NO_NAME
+VIR_ERR_NO_OS
+VIR_ERR_NO_ROOT
+VIR_ERR_NO_SOURCE
+VIR_ERR_NO_SUPPORT
+VIR_ERR_NO_TARGET
+VIR_ERR_NO_XEN
VIR_ERR_OK
+VIR_ERR_OPERATION_FAILED
+VIR_ERR_OS_TYPE
+VIR_ERR_POST_FAILED
+VIR_ERR_SEXPR_SERIAL
+VIR_ERR_UNKNOWN_HOST
VIR_ERR_WARNING
+VIR_ERR_XEN_CALL
VIR_FROM_DOM
VIR_FROM_NONE
+VIR_FROM_SEXPR
VIR_FROM_XEN
VIR_FROM_XEND
+VIR_FROM_XML

Letter _:

_virDomainInfo
_virDomainKernel
_virError
@@ -44,6 +67,7 @@ virConnectOpenReadOnly
virConnectPtr
virCopyLastError
+virDefaultErrorFunc
virDeviceMode
virDomain
virDomainCreateFlags
diff --git a/docs/html/libvirt-virterror.html b/docs/html/libvirt-virterror.html index 544dcd37bf..ab5f220954 100644 --- a/docs/html/libvirt-virterror.html +++ b/docs/html/libvirt-virterror.html @@ -10,6 +10,7 @@

void	virConnResetLastError		(virConnectPtr conn)
void	virConnSetErrorFunc		(virConnectPtr conn, 
void * userData,
virErrorFunc handler)
int	virCopyLastError		(virErrorPtr to)
+
void	virDefaultErrorFunc		(virErrorPtr err)
Function type: virErrorFunc
 void	virErrorFunc			(void * userData, 
virErrorPtr error)
@@ -19,7 +20,7 @@ void virErrorFunc (void * userData,
void virSetErrorFunc (void * userData,
virErrorFunc handler)

Description

Structure virError

Structure virError
struct _virError { - int code : The error code, e.g. an virParserError + int code : The error code, a virErrorNumber int domain : What part of the library raised this er char * message : human-readable informative error messag virErrorLevel level : how consequent is the error @@ -34,7 +35,9 @@ void virErrorFunc (void * userData,
VIR_FROM_NONE = 0 VIR_FROM_XEN = 1 : Error at Xen hypervisor layer VIR_FROM_XEND = 2 : Error at connection with xend daemon - VIR_FROM_DOM = 3 : Error when operating on a domain + VIR_FROM_SEXPR = 3 : Error in the S-Epression code + VIR_FROM_XML = 4 : Error in the XML code + VIR_FROM_DOM = 5 : Error when operating on a domain }

Enum virErrorLevel

Enum virErrorLevel {
     VIR_ERR_NONE = 0
@@ -43,8 +46,29 @@ void	virErrorFunc			(void * userData, 

Enum virErrorNumber

Enum virErrorNumber {
     VIR_ERR_OK = 0
-    VIR_ERR_INTERNAL_ERROR = 1 : 1
-    VIR_ERR_NO_MEMORY = 2 : 2
+    VIR_ERR_INTERNAL_ERROR = 1 : internal error
+    VIR_ERR_NO_MEMORY = 2 : memory allocation failure
+    VIR_ERR_NO_SUPPORT = 3 : no support for this connection
+    VIR_ERR_UNKNOWN_HOST = 4 : could not resolve hostname
+    VIR_ERR_NO_CONNECT = 5 : can't connect to hypervisor
+    VIR_ERR_INVALID_CONN = 6 : invalid connection object
+    VIR_ERR_INVALID_DOMAIN = 7 : invalid domain object
+    VIR_ERR_INVALID_ARG = 8 : invalid function argument
+    VIR_ERR_OPERATION_FAILED = 9 : a command to hypervisor failed
+    VIR_ERR_GET_FAILED = 10 : a HTTP GET command to failed
+    VIR_ERR_POST_FAILED = 11 : a HTTP POST command to failed
+    VIR_ERR_HTTP_ERROR = 12 : unexpected HTTP error code
+    VIR_ERR_SEXPR_SERIAL = 13 : failure to serialize an S-Expr
+    VIR_ERR_NO_XEN = 14 : could not open Xen hypervisor control
+    VIR_ERR_XEN_CALL = 15 : failure doing an hypervisor call
+    VIR_ERR_OS_TYPE = 16 : unknown OS type
+    VIR_ERR_NO_KERNEL = 17 : missing kernel informations
+    VIR_ERR_NO_ROOT = 18 : missing root device informations
+    VIR_ERR_NO_SOURCE = 19 : missing source device informations
+    VIR_ERR_NO_TARGET = 20 : missing target device informations
+    VIR_ERR_NO_NAME = 21 : missing domain name informations
+    VIR_ERR_NO_OS = 22 : missing domain OS informations
+    VIR_ERR_NO_DEVICE = 23 : missing domain devices informations
 }
 

Function: virConnCopyLastError

int	virConnCopyLastError		(virConnectPtr conn, 
virErrorPtr to)

Copy the content of the last error caught on that connection One will need to free the result with virResetError()

@@ -56,7 +80,9 @@ void virErrorFunc (void * userData,

Set a connection error handling function, if @handler is NULL it will reset to default which is to pass error back to the global library handler.

conn:pointer to the hypervisor connection
userData:pointer to the user data provided in the handler callback
handler:the function to get called in case of error or NULL

Function: virCopyLastError

int	virCopyLastError		(virErrorPtr to)

Copy the content of the last error caught at the library level One will need to free the result with virResetError()

-
to:target to receive the copy
Returns:0 if no error was found and the error code otherwise and -1 in case of parameter error.

Function type: virErrorFunc

Function type: virErrorFunc
+
to:target to receive the copy
Returns:0 if no error was found and the error code otherwise and -1 in case of parameter error.

Function: virDefaultErrorFunc

void	virDefaultErrorFunc		(virErrorPtr err)
+

Default routine reporting an error to stderr.

+
err:pointer to the error.

Function type: virErrorFunc

Function type: virErrorFunc
 void	virErrorFunc			(void * userData, 
virErrorPtr error)

Signature of a function to use when there is an error raised by the library.

userData:user provided data for the error callback
error:the error being raised.

Function: virGetLastError

virErrorPtr	virGetLastError		(void)
diff --git a/docs/libvirt-api.xml b/docs/libvirt-api.xml index b1096c0a2a..0733b3aa81 100644 --- a/docs/libvirt-api.xml +++ b/docs/libvirt-api.xml @@ -68,16 +68,39 @@ error handling interfaces for the libvirt library Provides the interfaces of the libvirt library to handle errors raised while using the library. Daniel Veillard <veillard@redhat.com> - + + + + + + + + + + + + + + + + - - + + + + + + + + + - - - + + + + @@ -90,6 +113,7 @@ + @@ -117,15 +141,38 @@ - + + + + + + - + + + + + + + + + + + + + + + + - + + + + 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. @@ -164,7 +211,7 @@ - + @@ -246,6 +293,11 @@ + + Default routine reporting an error to stderr. + + + Launch a new Linux guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires priviledged access to the hypervisor. diff --git a/docs/libvirt-refs.xml b/docs/libvirt-refs.xml index 4adcbe66fc..d6a87e2972 100644 --- a/docs/libvirt-refs.xml +++ b/docs/libvirt-refs.xml @@ -19,15 +19,38 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -45,6 +68,7 @@ + @@ -108,15 +132,38 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -138,6 +185,7 @@ + @@ -264,6 +312,7 @@ + @@ -336,21 +385,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -389,6 +462,9 @@ + + + @@ -1358,6 +1434,7 @@ + @@ -1438,6 +1515,9 @@ + + + @@ -1493,6 +1573,9 @@ + + + @@ -1558,6 +1641,7 @@ + @@ -1752,7 +1836,7 @@ - +