Giuseppe Lavagetto has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374704 )

Change subject: prometheus: avoid validate_re for an integer
......................................................................


prometheus: avoid validate_re for an integer

Bug: T171704
Change-Id: Ie64f05d1a5234936cd5d4a547b4b3c7e4c60299e
---
M modules/prometheus/manifests/class_config.pp
M modules/prometheus/manifests/cluster_config.pp
2 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/prometheus/manifests/class_config.pp 
b/modules/prometheus/manifests/class_config.pp
index 568c134..0efbb6e 100644
--- a/modules/prometheus/manifests/class_config.pp
+++ b/modules/prometheus/manifests/class_config.pp
@@ -31,10 +31,11 @@
     $labels = {},
     $class_parameters = {},
 ) {
+    # TODO/puppet4: convert this class to use typed parameters
     validate_string($dest)
     validate_string($site)
     validate_string($class_name)
-    validate_re($port, '^[0-9]+$')
+    validate_numeric($port)
     validate_hash($labels)
     validate_hash($class_parameters)
 
diff --git a/modules/prometheus/manifests/cluster_config.pp 
b/modules/prometheus/manifests/cluster_config.pp
index a1cbc17..dbd7356 100644
--- a/modules/prometheus/manifests/cluster_config.pp
+++ b/modules/prometheus/manifests/cluster_config.pp
@@ -30,10 +30,11 @@
   $port,
   $labels,
 ) {
+        # TODO/puppet4: convert this class to use typed parameters
     validate_string($dest)
     validate_string($site)
     validate_string($cluster)
-    validate_re($port, '^[0-9]+$')
+    validate_numeric($port)
     validate_hash($labels)
 
     file { $dest:

-- 
To view, visit https://gerrit.wikimedia.org/r/374704
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie64f05d1a5234936cd5d4a547b4b3c7e4c60299e
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to