Merge "Add handling for roles and networks to answers" into stable/wallaby
This commit is contained in:
commit
6fced2c2c6
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Users can now specify roles_data.yaml and network_data.yaml locations
|
||||||
|
in their answers file. Using `networks` and `roles` along with their
|
||||||
|
`templates` and `environments` arguments.
|
@ -63,7 +63,9 @@ class DeployOvercloud(command.Command):
|
|||||||
parsed_args.deployed_server = True
|
parsed_args.deployed_server = True
|
||||||
|
|
||||||
def _update_args_from_answers_file(self, args):
|
def _update_args_from_answers_file(self, args):
|
||||||
if args.answers_file is not None:
|
if args.answers_file is None:
|
||||||
|
return
|
||||||
|
|
||||||
with open(args.answers_file, 'r') as answers_file:
|
with open(args.answers_file, 'r') as answers_file:
|
||||||
answers = yaml.safe_load(answers_file)
|
answers = yaml.safe_load(answers_file)
|
||||||
|
|
||||||
@ -73,6 +75,12 @@ class DeployOvercloud(command.Command):
|
|||||||
if args.environment_files is not None:
|
if args.environment_files is not None:
|
||||||
answers['environments'].extend(args.environment_files)
|
answers['environments'].extend(args.environment_files)
|
||||||
args.environment_files = answers['environments']
|
args.environment_files = answers['environments']
|
||||||
|
if 'roles' in answers:
|
||||||
|
if args.roles_file is None:
|
||||||
|
args.roles_file = answers['roles']
|
||||||
|
if 'networks' in answers:
|
||||||
|
if args.networks_file is None:
|
||||||
|
args.networks_file = answers['networks']
|
||||||
|
|
||||||
def _update_parameters(self, args, parameters,
|
def _update_parameters(self, args, parameters,
|
||||||
tht_root, user_tht_root):
|
tht_root, user_tht_root):
|
||||||
|
Loading…
Reference in New Issue
Block a user