diff options
| author | Stephen Finucane <stephenfin@redhat.com> | 2021-01-12 17:18:56 +0000 |
|---|---|---|
| committer | Stephen Finucane <stephenfin@redhat.com> | 2021-03-02 12:14:12 +0000 |
| commit | 54d4da112a6e84db5bda497364a49b9debfc2904 (patch) | |
| tree | 5f6624791c0c6fab0dbdf64e0727fbfb937ccd02 /novaclient/v2/shell.py | |
| parent | e45953927898b639de9dbcba8edb6d07bcb4cba3 (diff) | |
| download | python-novaclient-17.4.0.tar.gz | |
Add support for microversion v2.8817.4.0
The key change here is that the 'GET /os-hypervisors/{id}/uptime' API
will now returns a HTTP 404 starting in 2.88. The 'GET
/os-hypervisors/{id}' will instead now include an 'uptime' value. The
'novaclient.v2.hypervisors.HypervisorManager.uptime' method is updated
to handle this.
Change-Id: Ib99fbd820a586c14527ff64b319df0b7a44e1b8b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'novaclient/v2/shell.py')
| -rw-r--r-- | novaclient/v2/shell.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/novaclient/v2/shell.py b/novaclient/v2/shell.py index 23f5486f..eb0315fd 100644 --- a/novaclient/v2/shell.py +++ b/novaclient/v2/shell.py @@ -4049,12 +4049,22 @@ def do_hypervisor_uptime(cs, args): utils.print_dict(hyper.to_dict()) +@api_versions.wraps('2.0', '2.87') def do_hypervisor_stats(cs, args): """Get hypervisor statistics over all compute nodes.""" stats = cs.hypervisor_stats.statistics() utils.print_dict(stats.to_dict()) +@api_versions.wraps('2.88') +def do_hypervisor_stats(cs, args): + msg = _( + "The hypervisor-stats command is not supported in API version 2.88 " + "or later." + ) + raise exceptions.CommandError(msg) + + @utils.arg('server', metavar='<server>', help=_('Name or ID of server.')) @utils.arg( '--port', |
