From 9e5186b95bba51d911a0de9e6d6bd412c478aef4 Mon Sep 17 00:00:00 2001 From: Zhao Chao Date: Wed, 7 Feb 2018 16:16:53 +0800 Subject: [PATCH] Remove unused optparse code in trove.db add_options in trove.db is not used for a long time, and this is the same situation fofr optparse in python 2.7, so we can safely remove this part from trove.db. Closes-Bug: #1553030 Change-Id: I17228eed5c122bce49ce80ec665fe73d6caa1e04 Signed-off-by: Zhao Chao --- trove/db/__init__.py | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/trove/db/__init__.py b/trove/db/__init__.py index fc25eceeac..60bb4473c7 100644 --- a/trove/db/__init__.py +++ b/trove/db/__init__.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import optparse - from trove.common import cfg from trove.common import utils @@ -88,26 +86,3 @@ class Queryable(object): model, query_func=getattr(get_db_api(), item), **conditions) db_query = Queryable() - - -def add_options(parser): - """Adds any configuration options that the db layer might have. - - :param parser: An optparse.OptionParser object - :retval None - - """ - help_text = ("The following configuration options are specific to the " - "Trove database.") - - group = optparse.OptionGroup( - parser, - "Registry Database Options", - help_text) - group.add_option( - '--sql-connection', - metavar="CONNECTION", - default=None, - help="A valid SQLAlchemy connection string for the " - "registry database. Default: %(default)s.") - parser.add_option_group(group)