From c82b69ccdf5638dec12fd68079f6b77f75bace17 Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Mon, 2 Jul 2018 15:28:51 +0800 Subject: Add cluster_param in DHA file JIRA: COMPASS-603 Users may need some extra parameters to further customize the deployment. Change-Id: I64f7f39a49f17350d159b3733f34ffd816849174 Signed-off-by: Harry Huang --- deploy/client.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'deploy/client.py') diff --git a/deploy/client.py b/deploy/client.py index 891e632c..e612160b 100644 --- a/deploy/client.py +++ b/deploy/client.py @@ -259,6 +259,9 @@ opts = [ cfg.StrOpt('plugins', help='plugin dict', default='{}'), + cfg.StrOpt('cluster_param', + help='cluster dict', + default='{}'), cfg.StrOpt('offline_deployment', help='offline_deployment', default='Disable'), @@ -803,11 +806,17 @@ class CompassClient(object): package_config['odl_l3_agent'] = "Enable" if CONF.odl_l3_agent == "Enable" else "Disable" # noqa package_config['onos_sfc'] = "Enable" if CONF.onos_sfc == "Enable" else "Disable" # noqa package_config['plugins'] = [] + package_config['cluster_param'] = [] if CONF.plugins: for item in CONF.plugins.split(','): key, value = item.split(':') package_config['plugins'].append({key: value}) + if CONF.cluster_param: + for item in CONF.cluster_param.split(','): + key, value = item.split(':') + package_config['cluster_param'].append({key: value}) + status, resp = self.client.update_cluster_config( cluster_id, package_config=package_config) LOG.info( -- cgit 1.2.3-korg