1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

Fix misc syntax problems with open nebula driver

This commit is contained in:
Daniel P. Berrange 2009-05-28 13:11:22 +00:00
parent dcd9865385
commit ee8553e156
7 changed files with 215 additions and 201 deletions

View File

@ -1,3 +1,14 @@
Thu May 28 14:11:30 BST 2009 Daniel P. Berrange <berrange@redhat.com>
Fix misc syntax check failures with OpenNebula driver
* src/opennebula/one_conf.c, src/opennebula/one_conf.h,
src/opennebula/one_driver.c, src/opennebula/one_driver.h: Kill
trailing whitespace, automatic re-indent of all code, added
missing translation marking
* Makefile.maint: Add oneError() as a function with translatable
strings.
* po/POTFILES.in: Add one_conf.c, one_driver.c
Thu May 28 13:27:30 BST 2009 Daniel P. Berrange <berrange@redhat.com>
* src/logging.c: Include function name & line number in all

View File

@ -332,6 +332,7 @@ msg_gen_function += errorf
msg_gen_function += lxcError
msg_gen_function += networkLog
msg_gen_function += networkReportError
msg_gen_function += oneError
msg_gen_function += openvzError
msg_gen_function += openvzLog
msg_gen_function += qemudDispatchClientFailure

View File

@ -16,6 +16,8 @@ src/network_driver.c
src/node_device.c
src/node_device_conf.c
src/nodeinfo.c
src/opennebula/one_conf.c
src/opennebula/one_driver.c
src/openvz_conf.c
src/openvz_driver.c
src/pci.c

View File

@ -127,7 +127,7 @@ int oneSubmitVM(virConnectPtr conn,
if ((oneid = c_oneAllocateTemplate(templ)) < 0) {
oneError(conn, NULL, VIR_ERR_OPERATION_FAILED,
"Error submitting virtual machine to OpenNebula");
_("Error submitting virtual machine to OpenNebula"));
VIR_FREE(templ);
return -1;
}

View File

@ -297,13 +297,13 @@ static int oneDomainUndefine(virDomainPtr dom)
vm =virDomainFindByUUID(&driver->domains, dom->uuid);
if (!vm) {
oneError(dom->conn, dom, VIR_ERR_INVALID_DOMAIN,
"no domain with matching uuid");
_("no domain with matching uuid"));
goto return_point;
}
if (!vm->persistent) {
oneError(dom->conn, dom, VIR_ERR_INTERNAL_ERROR,
"cannot undefine transient domain");
_("cannot undefine transient domain"));
goto return_point;
}
virDomainRemoveInactive(&driver->domains, vm);
@ -422,7 +422,7 @@ static int oneDomainStart(virDomainPtr dom)
if (!vm) {
oneError(conn, dom, VIR_ERR_INVALID_DOMAIN,
"no domain named %s", dom->name);
_("no domain named %s"), dom->name);
goto return_point;
}
if((oneid = oneSubmitVM(dom->conn,driver,vm)) < 0) {
@ -459,7 +459,7 @@ oneDomainCreateAndStart(virConnectPtr conn,
vm = virDomainFindByName(&driver->domains, def->name);
if (vm) {
oneError(conn,NULL, VIR_ERR_OPERATION_FAILED,
_("Already an OpenNebula VM active with the name: \"%s\" id: %d "),
_("Already an OpenNebula VM active with the name: '%s' id: %d "),
def->name,def->id);
goto return_point;
}
@ -506,7 +506,7 @@ static int oneDomainShutdown(virDomainPtr dom)
goto return_point;
}
oneError(dom->conn, dom, VIR_ERR_OPERATION_FAILED,
"Wrong state to perform action");
_("Wrong state to perform action"));
goto return_point;
}
oneError(dom->conn,dom, VIR_ERR_INVALID_DOMAIN,
@ -535,14 +535,14 @@ static int oneDomainDestroy(virDomainPtr dom)
vm= virDomainFindByID(&driver->domains, dom->id);
if (!vm) {
oneError(dom->conn, dom, VIR_ERR_INVALID_DOMAIN,
"no domain with id %d", dom->id);
_("no domain with id %d"), dom->id);
goto return_point;
}
if(c_oneCancel(vm->pid)) {
/* VM not running, delete the instance at ONE DB */
if(c_oneFinalize(vm->pid)){
oneError(dom->conn, dom, VIR_ERR_OPERATION_FAILED,
"Wrong state to perform action");
_("Wrong state to perform action"));
goto return_point;
}
}
@ -577,14 +577,14 @@ static int oneDomainSuspend(virDomainPtr dom)
goto return_point;
}
oneError(dom->conn, dom, VIR_ERR_OPERATION_FAILED,
"Wrong state to perform action");
_("Wrong state to perform action"));
goto return_point;
}
oneError(dom->conn,dom,VIR_ERR_OPERATION_FAILED,
"domain is not running");
_("domain is not running"));
} else {
oneError(dom->conn, dom, VIR_ERR_INVALID_DOMAIN,
"no domain with matching id %d", dom->id);
_("no domain with matching id %d"), dom->id);
}
return_point:
@ -610,14 +610,14 @@ static int oneDomainResume(virDomainPtr dom)
goto return_point;
}
oneError(dom->conn, dom, VIR_ERR_OPERATION_FAILED,
"Wrong state to perform action");
_("Wrong state to perform action"));
goto return_point;
}
oneError(dom->conn,dom,VIR_ERR_OPERATION_FAILED,
"domain is not paused ");
_("domain is not paused "));
} else {
oneError(dom->conn, dom, VIR_ERR_INVALID_DOMAIN,
"no domain with matching id %d", dom->id);
_("no domain with matching id %d"), dom->id);
}
return_point: