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,16 +63,24 @@ 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:
|
||||||
with open(args.answers_file, 'r') as answers_file:
|
return
|
||||||
answers = yaml.safe_load(answers_file)
|
|
||||||
|
|
||||||
if args.templates is None:
|
with open(args.answers_file, 'r') as answers_file:
|
||||||
args.templates = answers['templates']
|
answers = yaml.safe_load(answers_file)
|
||||||
if 'environments' in answers:
|
|
||||||
if args.environment_files is not None:
|
if args.templates is None:
|
||||||
answers['environments'].extend(args.environment_files)
|
args.templates = answers['templates']
|
||||||
args.environment_files = answers['environments']
|
if 'environments' in answers:
|
||||||
|
if args.environment_files is not None:
|
||||||
|
answers['environments'].extend(args.environment_files)
|
||||||
|
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