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 <zhaochao1984@gmail.com>
This commit is contained in:
Zhao Chao 2018-02-07 16:16:53 +08:00
parent cdc7b37cae
commit 9e5186b95b

View File

@ -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)