You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/07/26 06:49:29 UTC
[incubator-dlab] branch DLAB-terraform updated: update parameters
This is an automated email from the ASF dual-hosted git repository.
omartushevskyi pushed a commit to branch DLAB-terraform
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/DLAB-terraform by this push:
new 0bdd99c update parameters
new 7f2b4cf Merge pull request #194 from bohdana-kuzmenko/DLAB-terraform-cli
0bdd99c is described below
commit 0bdd99c7a9e89413f198fc955be60339e6b055da
Author: bogdana <bo...@gmail.com>
AuthorDate: Thu Jul 25 23:52:44 2019 +0300
update parameters
---
infrastructure-provisioning/terraform/bin/terraform-cli.py | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/infrastructure-provisioning/terraform/bin/terraform-cli.py b/infrastructure-provisioning/terraform/bin/terraform-cli.py
index d081487..6a4eccf 100755
--- a/infrastructure-provisioning/terraform/bin/terraform-cli.py
+++ b/infrastructure-provisioning/terraform/bin/terraform-cli.py
@@ -184,7 +184,17 @@ class AbstractDeployBuilder:
dict: CLI arguments
"""
parsers = {}
- cli_args = sorted(self.cli_args, key=lambda x: x.get('group'))
+ args = []
+
+ for arg in self.cli_args:
+ group = arg.get('group')
+ if isinstance(group, (list, tuple)):
+ for item in group:
+ args.append(dict(arg.copy(), **{'group': item}))
+ else:
+ args.append(arg)
+
+ cli_args = sorted(args, key=lambda x: x.get('group'))
args_groups = itertools.groupby(cli_args, lambda x: x.get('group'))
for group, args in args_groups:
parser = argparse.ArgumentParser()
@@ -365,7 +375,7 @@ class AWSK8sSourceBuilder(AbstractDeployBuilder):
.add_int('--ssn_k8s_masters_count', 'Count of K8S masters.', default=3,
group='k8s')
.add_int('--ssn_k8s_workers_count', 'Count of K8S workers', default=2,
- group='k8s')
+ group=('k8s', 'helm_charts'))
.add_str('--ssn_k8s_masters_shape', 'Shape for SSN K8S masters.',
default='t2.medium', group='k8s')
.add_str('--ssn_k8s_workers_shape', 'Shape for SSN K8S workers.',
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org