+Fri Jul 6 16:19:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
+
+ * src/libvirt.c, src/qemu_driver.c: If the virNetworkLookup*
+ functions cannot find a network, then they now throw
+ VIR_ERR_NO_NETWORK error.
+
Fri Jul 6 16:08:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/proxy_internal.c, src/proxy_internal.h,
*
* Try to lookup a network on the given hypervisor based on its name.
*
- * Returns a new network object or NULL in case of failure
+ * Returns a new network object or NULL in case of failure. If the
+ * network cannot be found, then VIR_ERR_NO_NETWORK error is raised.
*/
virNetworkPtr
virNetworkLookupByName(virConnectPtr conn, const char *name)
*
* Try to lookup a network on the given hypervisor based on its UUID.
*
- * Returns a new network object or NULL in case of failure
+ * Returns a new network object or NULL in case of failure. If the
+ * network cannot be found, then VIR_ERR_NO_NETWORK error is raised.
*/
virNetworkPtr
virNetworkLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
*
* Try to lookup a network on the given hypervisor based on its UUID.
*
- * Returns a new network object or NULL in case of failure
+ * Returns a new network object or NULL in case of failure. If the
+ * network cannot be found, then VIR_ERR_NO_NETWORK error is raised.
*/
virNetworkPtr
virNetworkLookupByUUIDString(virConnectPtr conn, const char *uuidstr)
virNetworkPtr net;
if (!network) {
- qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "no network with matching uuid");
+ qemudReportError(conn, NULL, NULL, VIR_ERR_NO_NETWORK, "no network with matching uuid");
return NULL;
}
virNetworkPtr net;
if (!network) {
- qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "no network with matching name");
+ qemudReportError(conn, NULL, NULL, VIR_ERR_NO_NETWORK, "no network with matching name");
return NULL;
}