diff options
Diffstat (limited to 'deploy/client.py')
-rw-r--r-- | deploy/client.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/deploy/client.py b/deploy/client.py index 433d90ec..6d5daa38 100644 --- a/deploy/client.py +++ b/deploy/client.py @@ -256,6 +256,9 @@ opts = [ cfg.StrOpt('onos_sfc', help='onos_sfc enable flag', default='Disable'), + cfg.StrOpt('plugins', + help='plugin dict', + default='{}'), ] CONF.register_cli_opts(opts) @@ -737,11 +740,11 @@ class CompassClient(object): package_config['network_mapping'] = network_mapping assert(os.path.exists(CONF.network_cfg)) - network_cfg = yaml.load(open(CONF.network_cfg)) + network_cfg = yaml.safe_load(open(CONF.network_cfg)) package_config["network_cfg"] = network_cfg assert(os.path.exists(CONF.neutron_cfg)) - neutron_cfg = yaml.load(open(CONF.neutron_cfg)) + neutron_cfg = yaml.safe_load(open(CONF.neutron_cfg)) package_config["neutron_config"] = neutron_cfg """ @@ -764,6 +767,11 @@ class CompassClient(object): 'moon'] = "Enable" if CONF.moon == "Enable" else "Disable" package_config[ 'onos_sfc'] = "Enable" if CONF.onos_sfc == "Enable" else "Disable" + package_config['plugins'] = [] + if CONF.plugins: + for item in CONF.plugins.split(','): + key, value = item.split(':') + package_config['plugins'].append({key: value}) status, resp = self.client.update_cluster_config( cluster_id, package_config=package_config) |