Merge "Add option to tempest init to show global conf dir"
This commit is contained in:
commit
04589a3045
@ -85,6 +85,10 @@ class TempestInit(command.Command):
|
||||
parser = super(TempestInit, self).get_parser(prog_name)
|
||||
parser.add_argument('dir', nargs='?', default=os.getcwd())
|
||||
parser.add_argument('--config-dir', '-c', default=None)
|
||||
parser.add_argument('--show-global-config-dir', '-s',
|
||||
action='store_true', dest='show_global_dir',
|
||||
help="Print the global config dir location, "
|
||||
"then exit")
|
||||
return parser
|
||||
|
||||
def generate_testr_conf(self, local_path):
|
||||
@ -156,4 +160,7 @@ class TempestInit(command.Command):
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
config_dir = parsed_args.config_dir or get_tempest_default_config_dir()
|
||||
if parsed_args.show_global_dir:
|
||||
print("Global config dir is located at: %s" % config_dir)
|
||||
sys.exit(0)
|
||||
self.create_working_dir(parsed_args.dir, config_dir)
|
||||
|
Loading…
x
Reference in New Issue
Block a user