Merge "Add Dimensions Default in AWS_CloudWatch_Alarm.yaml"
This commit is contained in:
commit
f3809ce6e1
@ -43,6 +43,7 @@ Parameters:
|
||||
Default: ''
|
||||
Dimensions:
|
||||
Type: CommaDelimitedList
|
||||
Default: ''
|
||||
|
||||
Mappings:
|
||||
ComparisonOperatorMap:
|
||||
|
@ -335,6 +335,8 @@ class CommaDelimitedListParam(Parameter, collections.Sequence):
|
||||
return value
|
||||
try:
|
||||
if value is not None:
|
||||
if value == '':
|
||||
return []
|
||||
return value.split(',')
|
||||
except (KeyError, AttributeError) as err:
|
||||
message = _('Value must be a comma-delimited list string: %s')
|
||||
|
@ -251,10 +251,9 @@ class ParameterTest(testtools.TestCase):
|
||||
self.assertIn('wibble', six.text_type(err))
|
||||
|
||||
def test_list_value_list_default_empty(self):
|
||||
schema = {'Type': 'CommaDelimitedList'}
|
||||
schema['Default'] = ''
|
||||
schema = {'Type': 'CommaDelimitedList', 'Default': ''}
|
||||
p = self.new_parameter('p', schema)
|
||||
self.assertEqual([''], p.value())
|
||||
self.assertEqual([], p.value())
|
||||
|
||||
def test_list_value_list_good(self):
|
||||
schema = {'Type': 'CommaDelimitedList',
|
||||
|
Loading…
Reference in New Issue
Block a user