From 41d6d77897e2815a7a48220633ae8f5881f4b67a Mon Sep 17 00:00:00 2001 From: Sergey Nikitin Date: Tue, 6 Jun 2017 17:31:45 +0400 Subject: [PATCH] Fixed some nits for microversion 2.48 The main piece of code for microversion 2.48 was merged. This patch fixes some nits in docs and error messages. Change-Id: I8bc5010c255494d4e1bf36272215422991264c6d --- api-ref/source/diagnostics.inc | 4 ++-- nova/api/openstack/compute/rest_api_version_history.rst | 2 +- nova/api/openstack/compute/server_diagnostics.py | 6 +++--- nova/exception.py | 2 +- .../notes/bp-restore-vm-diagnostics-544b56bbb0167071.yaml | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api-ref/source/diagnostics.inc b/api-ref/source/diagnostics.inc index fa37489be240..b5e63b05861a 100644 --- a/api-ref/source/diagnostics.inc +++ b/api-ref/source/diagnostics.inc @@ -53,7 +53,7 @@ will be reported as ``None`` in the response. - disk_details: disk_details_diagnostics - nic_details: nic_details_diagnostics -**Example Server diagnostics** +**Example Server diagnostics (2.48)** .. literalinclude:: ../../doc/api_samples/os-server-diagnostics/v2.48/server-diagnostics-get-resp.json :language: javascript @@ -62,7 +62,7 @@ will be reported as ``None`` in the response. Before **microversion 2.48** the response format for diagnostics was not well defined. Each hypervisor had its own format. -**Example Old Server diagnostics** +**Example Server diagnostics (2.1)** Below is an example of diagnostics for a libvirt based instance. The unit of the return value is hypervisor specific, but in this case the unit of vnet1_rx* and diff --git a/nova/api/openstack/compute/rest_api_version_history.rst b/nova/api/openstack/compute/rest_api_version_history.rst index 29ceffda16ae..349afdfb53c4 100644 --- a/nova/api/openstack/compute/rest_api_version_history.rst +++ b/nova/api/openstack/compute/rest_api_version_history.rst @@ -562,5 +562,5 @@ user documentation. Before version 2.48, VM diagnostics response was just a 'blob' of data returned by each hypervisor. From this version VM diagnostics response is standardized. It has a set of fields which each hypervisor will try to fill. - If a hypervisor driver unable to provide a specific field then this field + If a hypervisor driver is unable to provide a specific field then this field will be reported as 'None'. diff --git a/nova/api/openstack/compute/server_diagnostics.py b/nova/api/openstack/compute/server_diagnostics.py index 9279e56ce49f..eca71a563993 100644 --- a/nova/api/openstack/compute/server_diagnostics.py +++ b/nova/api/openstack/compute/server_diagnostics.py @@ -58,10 +58,10 @@ class ServerDiagnosticsController(wsgi.Controller): # Diagnostics object. Old compute returns a dictionary. So we # can't perform a request correctly if compute is too old. msg = _('Compute node is too old. You must complete the ' - 'upgrade process to be able to get a standardized ' + 'upgrade process to be able to get standardized ' 'diagnostics data which is available since v2.48. However ' - 'you still able to get a diagnostics data in old format ' - 'which is available till v2.47.') + 'you are still able to get diagnostics data in ' + 'non-standardized format which is available until v2.47.') raise webob.exc.HTTPBadRequest(explanation=msg) except NotImplementedError: common.raise_feature_not_supported() diff --git a/nova/exception.py b/nova/exception.py index 89c470b89d33..6bde3c0bb142 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -2021,7 +2021,7 @@ class AttachInterfaceNotSupported(Invalid): class InstanceDiagnosticsNotSupported(Invalid): - msg_fmt = _("Instance diagnostics is not supported by compute node.") + msg_fmt = _("Instance diagnostics are not supported by compute node.") class InvalidReservedMemoryPagesOption(Invalid): diff --git a/releasenotes/notes/bp-restore-vm-diagnostics-544b56bbb0167071.yaml b/releasenotes/notes/bp-restore-vm-diagnostics-544b56bbb0167071.yaml index bdf2f3e36453..d86503738794 100644 --- a/releasenotes/notes/bp-restore-vm-diagnostics-544b56bbb0167071.yaml +++ b/releasenotes/notes/bp-restore-vm-diagnostics-544b56bbb0167071.yaml @@ -2,5 +2,5 @@ features: - Added microversion v2.48 which standardize VM diagnostics response. It has a set of fields which each hypervisor will try to fill. - If a hypervisor driver unable to provide a specific field then this field - will be reported as 'None'. + If a hypervisor driver is unable to provide a specific field then this + field will be reported as 'None'.