From c47f6540156fa054c1b95b30da17e5804269483c Mon Sep 17 00:00:00 2001 From: Nikolay Stanchev <ns17@it-innovation.soton.ac.uk> Date: Fri, 25 May 2018 12:23:35 +0100 Subject: [PATCH] Small adjustment to the url validation --- docs/clmc-service.md | 35 ++++++++++++++++++++ src/clmc-webservice/clmcservice/utilities.py | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 docs/clmc-service.md diff --git a/docs/clmc-service.md b/docs/clmc-service.md new file mode 100644 index 0000000..2185267 --- /dev/null +++ b/docs/clmc-service.md @@ -0,0 +1,35 @@ +<!-- +// © University of Southampton IT Innovation Centre, 2018 +// +// Copyright in this software belongs to University of Southampton +// IT Innovation Centre of Gamma House, Enterprise Road, +// Chilworth Science Park, Southampton, SO16 7NS, UK. +// +// This software may not be used, sold, licensed, transferred, copied +// or reproduced in whole or in part in any manner or form or in or +// on any media by any person other than in accordance with the terms +// of the Licence Agreement supplied with the software, or otherwise +// without the prior written consent of the copyright owners. +// +// This software is distributed WITHOUT ANY WARRANTY, without even the +// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE, except where stated in the Licence Agreement supplied with +// the software. +// +// Created By : Nikolay Stanchev +// Created Date : 02-05-2018 +// Created for Project : FLAME +--> + +# **Flame CLMC API Service** + +#### **Authors** + +|Authors|Organisation| +|---|---| +|[Nikolay Stanchev](mailto:ns17@it-innovation.soton.ac.uk)|[University of Southampton, IT Innovation Centre](http://www.it-innovation.soton.ac.uk)| + +#### Description + +This document describes the CLMC service and its API endpoints. The CLMC service is implemented in the *Python* framework called **Pyramid**. +It offers different API endpoints to configure and control the aggregator, which is an essential part in the process of measuring the end-to-end performance. diff --git a/src/clmc-webservice/clmcservice/utilities.py b/src/clmc-webservice/clmcservice/utilities.py index ddb8dd9..7f7fa75 100644 --- a/src/clmc-webservice/clmcservice/utilities.py +++ b/src/clmc-webservice/clmcservice/utilities.py @@ -72,7 +72,7 @@ def validate_config_content(configuration): assert configuration.get('aggregator_report_period') > 0, "Report period must be a positive integer, received {0} instead.".format(configuration.get('aggregator_report_period')) - assert URL_REGEX.match(configuration.get('aggregator_database_url')) is not None, "The aggregator must have a valid database URL in its configuration, received {0} instead.".format(configuration.get('aggregator_report_period')) + assert URL_REGEX.match(configuration.get('aggregator_database_url')) is not None, "The aggregator must have a valid database URL in its configuration, received {0} instead.".format(configuration.get('aggregator_database_url')) return configuration -- GitLab