9e0ab81cbeb4b0ffbb4088e6d073b401d4f02141
[pti/rtp.git] / meta-stx / recipes-core / stx-config / files / 0001-stx-config-puppet-manifests-cast-to-Integer.patch
1 From bd8abad80bb0b24ed3556e51d345e4364a129c6b Mon Sep 17 00:00:00 2001
2 From: "Sar Ashki, Babak" <Babak.SarAshki@windriver.com>
3 Date: Mon, 13 Jan 2020 13:11:52 -0800
4 Subject: [PATCH] stx-config: puppet-manifests cast to Integer
5
6 Use cast operator to convert string to a number
7 ---
8  puppet-manifests/src/modules/platform/manifests/params.pp | 6 +++---
9  1 file changed, 3 insertions(+), 3 deletions(-)
10
11 diff --git a/puppet-manifests/src/modules/platform/manifests/params.pp b/puppet-manifests/src/modules/platform/manifests/params.pp
12 index 9ef50eb2..d99cc609 100644
13 --- a/puppet-manifests/src/modules/platform/manifests/params.pp
14 +++ b/puppet-manifests/src/modules/platform/manifests/params.pp
15 @@ -35,9 +35,9 @@ class platform::params (
16    $protected_group_name = 'sys_protected'
17    $protected_group_id = '345'
18  
19 -  # PUPPET 4 treats custom facts as strings. We convert to int by adding zero.
20 -  $phys_core_count = 0 + $::physical_core_count
21 -  $plat_res_mem = 0 + $::platform_res_mem
22 +  # To convert a string to a number, cast the type by declaring a new Numeric object.
23 +  $phys_core_count = Integer($::physical_core_count)
24 +  $plat_res_mem = Integer($::platform_res_mem)
25  
26    # Engineering parameters common to openstack services:
27  
28 -- 
29 2.23.0
30