From 501f65c70bc6de3380e135816bb0ebf7c87578e8 Mon Sep 17 00:00:00 2001 From: Nikolay Stanchev <ns17@it-innovation.soton.ac.uk> Date: Thu, 31 Jan 2019 13:20:17 +0000 Subject: [PATCH] Moves the constant bandwidth setting to clmc-service config, easier to change if needed --- src/service/clmcservice/__init__.py | 2 +- src/service/development.ini | 3 ++- src/service/production.ini | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/service/clmcservice/__init__.py b/src/service/clmcservice/__init__.py index b2248c3..73167d7 100644 --- a/src/service/clmcservice/__init__.py +++ b/src/service/clmcservice/__init__.py @@ -55,7 +55,7 @@ def main(global_config, **settings): settings['influx_port'] = int(settings['influx_port']) # the influx port setting must be converted to integer instead of a string settings['kapacitor_port'] = int(settings['kapacitor_port']) # the kapacitor port setting must be converted to integer instead of a string - settings["network_bandwidth"] = 104857600 # TODO currently assumed fixed bandwidth across all links + settings["network_bandwidth"] = int(settings["network_bandwidth"]) # TODO currently assumed fixed bandwidth across all links config = Configurator(settings=settings) diff --git a/src/service/development.ini b/src/service/development.ini index ea65782..74acfa1 100644 --- a/src/service/development.ini +++ b/src/service/development.ini @@ -15,7 +15,8 @@ pyramid.includes = pyramid_debugtoolbar pyramid_exclog exclog.ignore = -network_configuration_path = /vagrant/src/service/resources/GraphAPI/network_clusters.json +network_configuration_path = /opt/clmc/src/service/resources/GraphAPI/network_clusters.json +network_bandwidth = 104857600 # PostgreSQL connection url sqlalchemy.url = postgresql://clmc:clmc_service@localhost:5432/whoamidb diff --git a/src/service/production.ini b/src/service/production.ini index 083bb91..7ef1659 100644 --- a/src/service/production.ini +++ b/src/service/production.ini @@ -16,6 +16,7 @@ exclog.ignore = network_configuration_path = /opt/clmc/src/service/resources/GraphAPI/network_clusters.json +network_bandwidth = 104857600 # PostgreSQL connection url sqlalchemy.url = postgresql://clmc:clmc_service@localhost:5432/whoamidb -- GitLab