[cli] Remove "rally info" command

This command was deprecated a long ago and should be removed

Change-Id: I8c2527b10997d3ca407348fcef56f3955e8932a6
This commit is contained in:
Boris Pavlovic 2016-01-11 06:37:56 -08:00
parent 49c33b5dca
commit fcbc71ab16
4 changed files with 1 additions and 60 deletions

View File

@ -26,8 +26,6 @@ _rally()
OPTS["deployment_recreate"]="--deployment"
OPTS["deployment_show"]="--deployment"
OPTS["deployment_use"]="--deployment"
OPTS["info_find"]="--query"
OPTS["info_list"]=""
OPTS["plugin_list"]="--name --namespace"
OPTS["plugin_show"]="--name --namespace"
OPTS["show_flavors"]="--deployment"
@ -87,4 +85,4 @@ _rally()
return 0
}
complete -o filenames -F _rally rally
complete -o filenames -F _rally rally

View File

@ -1,48 +0,0 @@
# Copyright 2014: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from rally.cli import cliutils
from rally.cli.commands import plugin
class InfoCommands(object):
"""[Deprecated since 0.1.1] Allows you to get quick doc of rally entities.
"""
@cliutils.args("--query", dest="query", type=str, help="Search query.")
def find(self, query):
"""Search for an entity that matches the query and print info about it.
:param query: search query.
"""
print("This command was deprecated, and will be removed in 0.2.0 use:")
print("rally plugin show %s" % query)
plugin.PluginCommands().show(query)
return 1
def list(self):
"""List main entities in Rally for which rally info find works.
Lists task scenario groups, deploy engines and server providers.
"""
print("This command was deprecated, and will be removed in 0.2.0 use:")
print("rally plugin list")
plugin.PluginCommands().list()
return 1

View File

@ -21,7 +21,6 @@ import sys
from rally.cli import cliutils
from rally.cli.commands import deployment
from rally.cli.commands import info
from rally.cli.commands import plugin
from rally.cli.commands import show
from rally.cli.commands import task
@ -30,7 +29,6 @@ from rally.cli.commands import verify
categories = {
"deployment": deployment.DeploymentCommands,
"info": info.InfoCommands,
"plugin": plugin.PluginCommands,
"show": show.ShowCommands,
"task": task.TaskCommands,

View File

@ -21,7 +21,6 @@ import sqlalchemy.exc
from rally.cli import cliutils
from rally.cli.commands import deployment
from rally.cli.commands import info
from rally.cli.commands import show
from rally.cli.commands import task
from rally.cli.commands import verify
@ -39,7 +38,6 @@ class CliUtilsTestCase(test.TestCase):
super(CliUtilsTestCase, self).setUp()
self.categories = {
"deployment": deployment.DeploymentCommands,
"info": info.InfoCommands,
"show": show.ShowCommands,
"task": task.TaskCommands,
"verify": verify.VerifyCommands
@ -195,11 +193,6 @@ class CliUtilsTestCase(test.TestCase):
ret = cliutils.run(["rally", "bash-completion"], self.categories)
self.assertEqual(ret, 0)
def test_run_bash_completion_with_query_category(self):
ret = cliutils.run(["rally", "bash-completion", "info"],
self.categories)
self.assertEqual(ret, 0)
def test_run_show(self):
ret = cliutils.run(["rally", "show", "keypairs"], self.categories)
self.assertEqual(ret, 1)