From d2c00bb0e6399f91cede37780c1d2bca53b0fc21 Mon Sep 17 00:00:00 2001 From: Adrian Moreno Date: Thu, 5 Nov 2015 17:50:36 +0100 Subject: [PATCH] added restrictions in UI fields Change-Id: Iaef548a06c264ec8b5a83a20693e6dae1d653148 --- .../puppet/modules/scaleio_fuel/manifests/params.pp | 2 -- environment_config.yaml | 12 +++++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/deployment_scripts/puppet/modules/scaleio_fuel/manifests/params.pp b/deployment_scripts/puppet/modules/scaleio_fuel/manifests/params.pp index 79362a2..35e6c13 100644 --- a/deployment_scripts/puppet/modules/scaleio_fuel/manifests/params.pp +++ b/deployment_scripts/puppet/modules/scaleio_fuel/manifests/params.pp @@ -60,8 +60,6 @@ class scaleio_fuel::params notice("sio_sds_device: ${sio_sds_device}") - - #TODO: Get callhome information from UI $callhome_cfg = { 'email_to' => "emailto@address.com", diff --git a/environment_config.yaml b/environment_config.yaml index def0ed1..facdd38 100644 --- a/environment_config.yaml +++ b/environment_config.yaml @@ -43,6 +43,9 @@ attributes: label: "ScaleIO protection domain" description: "Protection domain for ScaleIO" weight: 45 + regex: + source: '\S' + error: "Protection Domain cannot be empty" storage_pool: type: "text" @@ -50,6 +53,9 @@ attributes: label: "ScaleIO storage pool" description: "First storage pool for ScaleIO" weight: 50 + regex: + source: '\S' + error: "Storage Pool cannot be empty" pool_size: type: "text" @@ -57,6 +63,6 @@ attributes: label: "Storage pool size" description: "Size of the Storage Pool." weight: 55 - # regex: - # source: '(?\p{N}+)(?:\s*)(?(?:MB|KB|GB|B)\b)' - # error: 'You must provide a valid size unit (B, KB, MB, GB). E.g.: 100GB' + regex: + source: '(?\p{N}+)(?:\s*)(?(?:MB|KB|GB|B)\b)' + error: 'You must provide a valid size unit (B, KB, MB, GB). E.g.: 100GB'