From 5a5b06fb24fc6e392eb5381f1348e475f1302e1e Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Thu, 7 Jul 2016 16:07:53 -0400 Subject: [PATCH] Deprecate nova-manage vm list command The nova-manage vm command is replaced with the nova list command in python-novaclient, and has been for a long time. As of microversion 2.3, the fields that are output from nova-manage vm list are all covered in the REST API for showing server details, which can also be used via the --fields option of the nova list command. The nova list command also allows filtering by host. This sets the timer for deprecation and then removal in Ocata. Change-Id: Ibce8c3deb24a16019b721d3b91640ca342ae541b Closes-Bug: #1494841 --- doc/source/man/nova-manage.rst | 3 +++ nova/cmd/manage.py | 6 +++++- .../deprecate-nova-manage-vm-list-571162f55173cccc.yaml | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/deprecate-nova-manage-vm-list-571162f55173cccc.yaml diff --git a/doc/source/man/nova-manage.rst b/doc/source/man/nova-manage.rst index 60e16a74ad08..9d3ec91625db 100644 --- a/doc/source/man/nova-manage.rst +++ b/doc/source/man/nova-manage.rst @@ -162,6 +162,9 @@ Nova Images Nova VM ~~~~~~~~~~~ +**DEPRECATED** Use the nova list command from python-novaclient instead. +The vm subcommand will be removed in the 15.0.0 Ocata release. + ``nova-manage vm list [host]`` Show a list of all instances. Accepts optional hostname (to show only instances on specific host). diff --git a/nova/cmd/manage.py b/nova/cmd/manage.py index f86954286676..d353f270e33c 100644 --- a/nova/cmd/manage.py +++ b/nova/cmd/manage.py @@ -662,9 +662,13 @@ class NetworkCommands(object): class VmCommands(object): """Class for managing VM instances.""" + description = ('DEPRECATED: Use the nova list command from ' + 'python-novaclient instead. The vm subcommand will be ' + 'removed in the 15.0.0 Ocata release.') + @args('--host', metavar='', help='Host') def list(self, host=None): - """Show a list of all instances.""" + """DEPRECATED: Show a list of all instances.""" print(("%-10s %-15s %-10s %-10s %-26s %-9s %-9s %-9s" " %-10s %-10s %-10s %-5s" % (_('instance'), diff --git a/releasenotes/notes/deprecate-nova-manage-vm-list-571162f55173cccc.yaml b/releasenotes/notes/deprecate-nova-manage-vm-list-571162f55173cccc.yaml new file mode 100644 index 000000000000..cfbc05060198 --- /dev/null +++ b/releasenotes/notes/deprecate-nova-manage-vm-list-571162f55173cccc.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - The ``nova-manage vm list`` command is deprecated and will be removed in + the 15.0.0 Ocata release. Use the ``nova list`` command from + python-novaclient instead.