diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index de3e49f0be537f47bc703eb8110caad60bbf1f1b..26f029ca5dcd09b604577d2bd25b8570737d3f20 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -1660,7 +1660,6 @@ esxDomainLookupByName(virConnectPtr conn, const char *name) goto cleanup; } - if (esxVI_GetVirtualMachineIdentity(virtualMachine, &id, NULL, uuid) < 0 || esxVI_GetVirtualMachinePowerState(virtualMachine, &powerState) < 0) { goto cleanup; diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index c4fe936839b1c31511f00fa5574e615989586fe8..df693ec6822be6158c51b9c4bf3abc4bda24e86b 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -2491,7 +2491,7 @@ static int lxcDomainSetAutostart(virDomainPtr dom, } if (!vm->persistent) { - lxcError(VIR_ERR_INTERNAL_ERROR, + lxcError(VIR_ERR_OPERATION_INVALID, "%s", _("Cannot set autostart for transient domain")); goto cleanup; } diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 3f63afd9f18ce427e30b037084d5fe092510093f..c098ab53e0a762748e413da76826077337752615 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -1537,7 +1537,7 @@ networkStartNetworkDaemon(struct network_driver *driver, virNetworkIpDefPtr ipdef; if (virNetworkObjIsActive(network)) { - networkReportError(VIR_ERR_INTERNAL_ERROR, + networkReportError(VIR_ERR_OPERATION_INVALID, "%s", _("network is already active")); return -1; } diff --git a/src/opennebula/one_driver.c b/src/opennebula/one_driver.c index b88f44ffb42a4a6e02cae8c33f12456472ede9ca..4febb46b0f81d06592ecde52062e074c215477fc 100644 --- a/src/opennebula/one_driver.c +++ b/src/opennebula/one_driver.c @@ -291,7 +291,7 @@ static int oneDomainUndefine(virDomainPtr dom) } if (!vm->persistent) { - oneError(VIR_ERR_INTERNAL_ERROR, "%s", + oneError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot undefine transient domain")); goto return_point; } diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 7728981a3fc7667962c6194fff658accf924feb8..fc6ae296d37f233539e55993495401033c486341 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -1079,7 +1079,7 @@ openvzDomainUndefine(virDomainPtr dom) } if (virDomainObjIsActive(vm)) { - openvzError(VIR_ERR_INTERNAL_ERROR, "%s", + openvzError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot delete active domain")); goto cleanup; } diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 824e77602ea51f650d965b907344f4efcac2493f..22dc272aac61e94b8072df59f34d516d4fbbbe6a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6401,7 +6401,7 @@ static int qemudDomainUndefine(virDomainPtr dom) { } if (!vm->persistent) { - qemuReportError(VIR_ERR_INTERNAL_ERROR, + qemuReportError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot undefine transient domain")); goto cleanup; } @@ -6848,7 +6848,7 @@ static int qemudDomainSetAutostart(virDomainPtr dom, } if (!vm->persistent) { - qemuReportError(VIR_ERR_INTERNAL_ERROR, + qemuReportError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot set autostart for transient domain")); goto cleanup; } diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 601ecf84b4719f86720f6b56fdfbb93d3b3149ce..7b077803b4b96b28ee1a9c9181578acf854dda5d 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -3061,7 +3061,7 @@ static int testNetworkUndefine(virNetworkPtr network) { } if (virNetworkObjIsActive(privnet)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("Network '%s' is still running"), network->name); goto cleanup; } @@ -3094,7 +3094,7 @@ static int testNetworkStart(virNetworkPtr network) { } if (virNetworkObjIsActive(privnet)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("Network '%s' is already running"), network->name); goto cleanup; } @@ -3817,7 +3817,7 @@ testStoragePoolStart(virStoragePoolPtr pool, } if (virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is already active"), pool->name); goto cleanup; } @@ -3982,7 +3982,7 @@ testStoragePoolUndefine(virStoragePoolPtr pool) { } if (virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is already active"), pool->name); goto cleanup; } @@ -4015,7 +4015,7 @@ testStoragePoolBuild(virStoragePoolPtr pool, } if (virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is already active"), pool->name); goto cleanup; } @@ -4044,7 +4044,7 @@ testStoragePoolDestroy(virStoragePoolPtr pool) { } if (!virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is not active"), pool->name); goto cleanup; } @@ -4083,7 +4083,7 @@ testStoragePoolDelete(virStoragePoolPtr pool, } if (virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is already active"), pool->name); goto cleanup; } @@ -4115,7 +4115,7 @@ testStoragePoolRefresh(virStoragePoolPtr pool, } if (!virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is not active"), pool->name); goto cleanup; } @@ -4267,7 +4267,7 @@ testStoragePoolNumVolumes(virStoragePoolPtr pool) { } if (!virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is not active"), pool->name); goto cleanup; } @@ -4302,7 +4302,7 @@ testStoragePoolListVolumes(virStoragePoolPtr pool, if (!virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is not active"), pool->name); goto cleanup; } @@ -4348,7 +4348,7 @@ testStorageVolumeLookupByName(virStoragePoolPtr pool, if (!virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is not active"), pool->name); goto cleanup; } @@ -4459,7 +4459,7 @@ testStorageVolumeCreateXML(virStoragePoolPtr pool, } if (!virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is not active"), pool->name); goto cleanup; } @@ -4540,7 +4540,7 @@ testStorageVolumeCreateXMLFrom(virStoragePoolPtr pool, } if (!virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is not active"), pool->name); goto cleanup; } @@ -4640,7 +4640,7 @@ testStorageVolumeDelete(virStorageVolPtr vol, } if (!virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is not active"), vol->pool); goto cleanup; } @@ -4718,7 +4718,7 @@ testStorageVolumeGetInfo(virStorageVolPtr vol, } if (!virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is not active"), vol->pool); goto cleanup; } @@ -4763,7 +4763,7 @@ testStorageVolumeGetXMLDesc(virStorageVolPtr vol, } if (!virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is not active"), vol->pool); goto cleanup; } @@ -4803,7 +4803,7 @@ testStorageVolumeGetPath(virStorageVolPtr vol) { } if (!virStoragePoolObjIsActive(privpool)) { - testError(VIR_ERR_INTERNAL_ERROR, + testError(VIR_ERR_OPERATION_INVALID, _("storage pool '%s' is not active"), vol->pool); goto cleanup; } diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index c6df0a1de00f6cc4da90f6017b1b40ef6bf4f54b..57f50f6d879a943aec648fc3c1350a3c3605d839 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -819,7 +819,7 @@ static int umlStartVMDaemon(virConnectPtr conn, virCommandPtr cmd = NULL; if (virDomainObjIsActive(vm)) { - umlReportError(VIR_ERR_INTERNAL_ERROR, "%s", + umlReportError(VIR_ERR_OPERATION_INVALID, "%s", _("VM is already active")); return -1; } @@ -1462,7 +1462,7 @@ static int umlDomainSetMemory(virDomainPtr dom, unsigned long newmem) { } if (virDomainObjIsActive(vm)) { - umlReportError(VIR_ERR_NO_SUPPORT, "%s", + umlReportError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot set memory of an active domain")); goto cleanup; } @@ -1656,13 +1656,13 @@ static int umlDomainUndefine(virDomainPtr dom) { } if (virDomainObjIsActive(vm)) { - umlReportError(VIR_ERR_INTERNAL_ERROR, "%s", + umlReportError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot delete active domain")); goto cleanup; } if (!vm->persistent) { - umlReportError(VIR_ERR_INTERNAL_ERROR, "%s", + umlReportError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot undefine transient domain")); goto cleanup; } @@ -1954,7 +1954,7 @@ static int umlDomainSetAutostart(virDomainPtr dom, } if (!vm->persistent) { - umlReportError(VIR_ERR_INTERNAL_ERROR, "%s", + umlReportError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot set autostart for transient domain")); goto cleanup; } diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 47314f80835ee4e128292e0c5780a81d9c80e12a..f176c2f4f6207a60b7fd0c5f580c4307921d0955 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -622,7 +622,7 @@ vmwareDomainUndefine(virDomainPtr dom) } if (!vm->persistent) { - vmwareError(VIR_ERR_INTERNAL_ERROR, + vmwareError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot undefine transient domain")); goto cleanup; }