Remove the deprecated tempest-account-generator CLI
Tempest CLI tempest-account-generator was deprecated
4 years ago.
devstack still uses the deprecated CLI for which
patch has been proposed.
As deprecation is done long time back,
'tempest-account-generator' should be now used as
'tempest account-generator'
The following commit gives the idea of deprecation
message:-
68b8b9d26f
Depends-on: I624e1dc57a3d3533322fb298c01f70241d0400ed
Signed-off by: Soniya Vyas<svyas@redhat.com>
Change-Id: I7c18998dd877d7fd065e4d1d0950b6f6413587c3
This commit is contained in:
parent
b8d383cf20
commit
ddcd4f44ac
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
Remove the deprecated CLI ``tempest-account-generator`` in favor of
|
||||||
|
``tempest account-generator`` command.
|
||||||
|
You can use ``tempest account-generator`` CLI to generate the accounts
|
||||||
|
yaml file.
|
@ -28,7 +28,6 @@ data_files =
|
|||||||
|
|
||||||
[entry_points]
|
[entry_points]
|
||||||
console_scripts =
|
console_scripts =
|
||||||
tempest-account-generator = tempest.cmd.account_generator:main
|
|
||||||
tempest = tempest.cmd.main:main
|
tempest = tempest.cmd.main:main
|
||||||
skip-tracker = tempest.lib.cmd.skip_tracker:main
|
skip-tracker = tempest.lib.cmd.skip_tracker:main
|
||||||
check-uuid = tempest.lib.cmd.check_uuid:run
|
check-uuid = tempest.lib.cmd.check_uuid:run
|
||||||
|
@ -96,7 +96,7 @@ Optional Arguments
|
|||||||
To see help on specific argument, please do: ``tempest account-generator
|
To see help on specific argument, please do: ``tempest account-generator
|
||||||
[OPTIONS] <accounts_file.yaml> -h``.
|
[OPTIONS] <accounts_file.yaml> -h``.
|
||||||
"""
|
"""
|
||||||
import argparse
|
|
||||||
import os
|
import os
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
@ -248,21 +248,6 @@ def _parser_add_args(parser):
|
|||||||
help='Output accounts yaml file')
|
help='Output accounts yaml file')
|
||||||
|
|
||||||
|
|
||||||
def get_options():
|
|
||||||
usage_string = ('tempest account-generator [-h] <ARG> ...\n\n'
|
|
||||||
'To see help on specific argument, do:\n'
|
|
||||||
'tempest account-generator <ARG> -h')
|
|
||||||
parser = argparse.ArgumentParser(
|
|
||||||
description=DESCRIPTION,
|
|
||||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
|
||||||
usage=usage_string
|
|
||||||
)
|
|
||||||
|
|
||||||
_parser_add_args(parser)
|
|
||||||
opts = parser.parse_args()
|
|
||||||
return opts
|
|
||||||
|
|
||||||
|
|
||||||
class TempestAccountGenerator(command.Command):
|
class TempestAccountGenerator(command.Command):
|
||||||
|
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
@ -272,7 +257,19 @@ class TempestAccountGenerator(command.Command):
|
|||||||
|
|
||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
try:
|
try:
|
||||||
main(parsed_args)
|
if parsed_args.config_file:
|
||||||
|
config.CONF.set_config_path(parsed_args.config_file)
|
||||||
|
setup_logging()
|
||||||
|
resources = []
|
||||||
|
for count in range(parsed_args.concurrency):
|
||||||
|
# Use N different cred_providers to obtain different
|
||||||
|
# sets of creds
|
||||||
|
cred_provider = get_credential_provider(parsed_args)
|
||||||
|
resources.extend(generate_resources(cred_provider,
|
||||||
|
parsed_args.admin))
|
||||||
|
dump_accounts(resources, parsed_args.identity_version,
|
||||||
|
parsed_args.accounts)
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.exception("Failure generating test accounts.")
|
LOG.exception("Failure generating test accounts.")
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
@ -280,26 +277,3 @@ class TempestAccountGenerator(command.Command):
|
|||||||
|
|
||||||
def get_description(self):
|
def get_description(self):
|
||||||
return DESCRIPTION
|
return DESCRIPTION
|
||||||
|
|
||||||
|
|
||||||
def main(opts=None):
|
|
||||||
log_warning = False
|
|
||||||
if not opts:
|
|
||||||
log_warning = True
|
|
||||||
opts = get_options()
|
|
||||||
if opts.config_file:
|
|
||||||
config.CONF.set_config_path(opts.config_file)
|
|
||||||
setup_logging()
|
|
||||||
if log_warning:
|
|
||||||
LOG.warning("Use of: 'tempest-account-generator' is deprecated, "
|
|
||||||
"please use: 'tempest account-generator'")
|
|
||||||
resources = []
|
|
||||||
for count in range(opts.concurrency):
|
|
||||||
# Use N different cred_providers to obtain different sets of creds
|
|
||||||
cred_provider = get_credential_provider(opts)
|
|
||||||
resources.extend(generate_resources(cred_provider, opts.admin))
|
|
||||||
dump_accounts(resources, opts.identity_version, opts.accounts)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user