From bf68a0cf10f510c2e60fddd6a97a13731905a23d Mon Sep 17 00:00:00 2001 From: "abhishek.talwar" Date: Mon, 14 Mar 2016 15:10:11 +0530 Subject: [PATCH] aggregate-details changed to aggregate-show To show details of aggregate, we have aggregate-details command. But all other commands to show details of any resource is *-show like flavor-show, keypair-show etc. So changed the command to aggregate-show. Change-Id: If4875833a27382a6f3193ec55d6d4cb1852249fd Closes-Bug: #1552646 --- novaclient/tests/unit/v2/test_shell.py | 8 ++++++++ novaclient/v2/shell.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/novaclient/tests/unit/v2/test_shell.py b/novaclient/tests/unit/v2/test_shell.py index 2fcb1d0b9..b2d4fcb57 100644 --- a/novaclient/tests/unit/v2/test_shell.py +++ b/novaclient/tests/unit/v2/test_shell.py @@ -1666,6 +1666,14 @@ class ShellTest(utils.TestCase): self.run_command('aggregate-details test') self.assert_called('GET', '/os-aggregates') + def test_aggregate_show_by_id(self): + self.run_command('aggregate-show 1') + self.assert_called('GET', '/os-aggregates/1') + + def test_aggregate_show_by_name(self): + self.run_command('aggregate-show test') + self.assert_called('GET', '/os-aggregates') + def test_live_migration(self): self.run_command('live-migration sample-server hostname') self.assert_called('POST', '/servers/1234/action', diff --git a/novaclient/v2/shell.py b/novaclient/v2/shell.py index 42798f817..90978c491 100644 --- a/novaclient/v2/shell.py +++ b/novaclient/v2/shell.py @@ -3779,6 +3779,14 @@ def do_aggregate_remove_host(cs, args): 'aggregate', metavar='', help=_('Name or ID of aggregate.')) def do_aggregate_details(cs, args): + """DEPRECATED, use aggregate-show instead.""" + do_aggregate_show(cs, args) + + +@utils.arg( + 'aggregate', metavar='', + help=_('Name or ID of aggregate.')) +def do_aggregate_show(cs, args): """Show details of the specified aggregate.""" aggregate = _find_aggregate(cs, args.aggregate) _print_aggregate_details(aggregate)