mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
esx: Move error messages onto a single line
Error messages are exempt from the 80 columns rule. Move them onto one line. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
37ad746839
commit
c5235f68d6
@ -2916,8 +2916,7 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
|
||||
if (virtualMachine) {
|
||||
/* FIXME */
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Domain already exists, editing existing domains is not "
|
||||
"supported yet"));
|
||||
_("Domain already exists, editing existing domains is not supported yet"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -2952,8 +2951,7 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
|
||||
*/
|
||||
if (def->ndisks < 1) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Domain XML doesn't contain any disks, cannot deduce "
|
||||
"datastore and path for VMX file"));
|
||||
_("Domain XML doesn't contain any disks, cannot deduce datastore and path for VMX file"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -2967,16 +2965,14 @@ esxDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int flags)
|
||||
|
||||
if (!disk) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Domain XML doesn't contain any file-based harddisks, "
|
||||
"cannot deduce datastore and path for VMX file"));
|
||||
_("Domain XML doesn't contain any file-based harddisks, cannot deduce datastore and path for VMX file"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
src = virDomainDiskGetSource(disk);
|
||||
if (!src) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("First file-based harddisk has no source, cannot deduce "
|
||||
"datastore and path for VMX file"));
|
||||
_("First file-based harddisk has no source, cannot deduce datastore and path for VMX file"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -3241,8 +3237,7 @@ esxDomainSetAutostart(virDomainPtr domain, int autostart)
|
||||
powerInfo = powerInfo->_next) {
|
||||
if (STRNEQ(powerInfo->key->value, virtualMachine->obj->value)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("Cannot enable general autostart option "
|
||||
"without affecting other domains"));
|
||||
_("Cannot enable general autostart option without affecting other domains"));
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
@ -3685,8 +3680,7 @@ esxDomainMigratePerform(virDomainPtr domain,
|
||||
|
||||
if (STRCASENEQ(priv->vCenter->ipAddress, parsedUri->server)) {
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
_("Migration source and destination have to refer to "
|
||||
"the same vCenter"));
|
||||
_("Migration source and destination have to refer to the same vCenter"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -3734,8 +3728,7 @@ esxDomainMigratePerform(virDomainPtr domain,
|
||||
eventList->fullFormattedMessage);
|
||||
} else {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Could not migrate domain, validation reported a "
|
||||
"problem"));
|
||||
_("Could not migrate domain, validation reported a problem"));
|
||||
}
|
||||
|
||||
goto cleanup;
|
||||
|
@ -311,8 +311,7 @@ esxNetworkDefineXMLFlags(virConnectPtr conn, const char *xml,
|
||||
if (hostVirtualSwitch) {
|
||||
/* FIXME */
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("HostVirtualSwitch already exists, editing existing "
|
||||
"ones is not supported yet"));
|
||||
_("HostVirtualSwitch already exists, editing existing ones is not supported yet"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@ -726,8 +726,7 @@ esxStorageVolLookupByKey(virConnectPtr conn, const char *key)
|
||||
|
||||
if (!priv->primary->hasQueryVirtualDiskUuid) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("QueryVirtualDiskUuid not available, "
|
||||
"cannot lookup storage volume by UUID"));
|
||||
_("QueryVirtualDiskUuid not available, cannot lookup storage volume by UUID"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -119,8 +119,7 @@ esxUtil_ParseUri(esxUtil_ParsedUri **parsedUri, virURI *uri)
|
||||
if ((tmp = strchr((*parsedUri)->proxy_hostname, ':'))) {
|
||||
if (tmp == (*parsedUri)->proxy_hostname) {
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
_("Query parameter 'proxy' doesn't contain a "
|
||||
"hostname"));
|
||||
_("Query parameter 'proxy' doesn't contain a hostname"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@ -253,8 +253,7 @@ esxVI_CURL_Perform(esxVI_CURL *curl, const char *url)
|
||||
|
||||
if (responseCode < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) returned a "
|
||||
"negative response code"));
|
||||
_("curl_easy_getinfo(CURLINFO_RESPONSE_CODE) returned a negative response code"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -674,15 +673,13 @@ esxVI_MultiCURL_Remove(esxVI_MultiCURL *multi, esxVI_CURL *curl)
|
||||
{
|
||||
if (!curl->handle) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot remove uninitialized CURL handle from a "
|
||||
"multi handle"));
|
||||
_("Cannot remove uninitialized CURL handle from a multi handle"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!curl->multi) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot remove CURL handle from a multi handle when it "
|
||||
"wasn't added before"));
|
||||
_("Cannot remove CURL handle from a multi handle when it wasn't added before"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1909,8 +1906,7 @@ esxVI_EnsureSession(esxVI_Context *ctx)
|
||||
}
|
||||
} else if (STRNEQ(ctx->session->key, currentSession->key)) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Key of the current session differs from the key at "
|
||||
"last login"));
|
||||
_("Key of the current session differs from the key at last login"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -4220,13 +4216,10 @@ esxVI_WaitForTaskCompletion(esxVI_Context *ctx,
|
||||
|
||||
if (taskInfo->cancelable == esxVI_Boolean_True) {
|
||||
if (esxVI_CancelTask(ctx, task) < 0 && blocked) {
|
||||
VIR_ERROR(_("Cancelable task is blocked by an "
|
||||
"unanswered question but cancellation "
|
||||
"failed"));
|
||||
VIR_ERROR(_("Cancelable task is blocked by an unanswered question but cancellation failed"));
|
||||
}
|
||||
} else if (blocked) {
|
||||
VIR_ERROR(_("Non-cancelable task is blocked by an "
|
||||
"unanswered question"));
|
||||
VIR_ERROR(_("Non-cancelable task is blocked by an unanswered question"));
|
||||
}
|
||||
|
||||
/* FIXME: Enable error reporting here again */
|
||||
|
@ -1444,8 +1444,7 @@ esxVI_DateTime_Deserialize(xmlNodePtr node, esxVI_DateTime **dateTime)
|
||||
|
||||
if (!(*dateTime)->value) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("XML node doesn't contain text, expecting an "
|
||||
"xsd:dateTime value"));
|
||||
_("XML node doesn't contain text, expecting an xsd:dateTime value"));
|
||||
goto failure;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user