Refactoring inline parameters syntax
* Added check on param='25' in simplified input Change-Id: Ib736e9257837f2cf1d8f59d65a286c2b227c32bc
This commit is contained in:
parent
e4dd81a2c2
commit
b09277b42b
@ -105,7 +105,7 @@ workflows:
|
||||
|
||||
task7:
|
||||
with-items: vm_info in $.vms
|
||||
workflow: wf2 is_true=true object_list=[1, null, "str"]
|
||||
workflow: wf2 is_true=true object_list=[1, null, "str"] is_string="50"
|
||||
on-complete:
|
||||
- task9
|
||||
- task10
|
||||
@ -327,6 +327,7 @@ class DSLv2ModelTest(base.BaseTest):
|
||||
{
|
||||
'is_true': True,
|
||||
'object_list': [1, None, 'str'],
|
||||
'is_string': '50'
|
||||
},
|
||||
task7_spec.get_input()
|
||||
)
|
||||
|
@ -21,8 +21,22 @@ from mistral import exceptions as exc
|
||||
|
||||
|
||||
CMD_PTRN = re.compile("^[\w\.]+[^=\s\"]*")
|
||||
PARAMS_PTRN = re.compile("([\w]+)=(\"[^\"]*\"\s*|'[^']*'\s*|"
|
||||
"\{[^}]*\}\s*|\[.*\]\s*|[\.,:\w\d\.]+)")
|
||||
|
||||
_ALL_IN_BRACES = "\{[^}]*\}\s*"
|
||||
_ALL_IN_BRACKETS = "\[.*\]\s*"
|
||||
_ALL_IN_QUOTES = "\"[^\"]*\"\s*"
|
||||
_ALL_IN_APOSTROPHES = "'[^']*'\s*"
|
||||
_DIGITS = "\d+"
|
||||
_TRUE = "true"
|
||||
_FALSE = "false"
|
||||
_NULL = "null"
|
||||
|
||||
ALL = (
|
||||
_ALL_IN_QUOTES, _ALL_IN_APOSTROPHES, _ALL_IN_BRACES,
|
||||
_ALL_IN_BRACKETS, _TRUE, _FALSE, _NULL, _DIGITS
|
||||
)
|
||||
|
||||
PARAMS_PTRN = re.compile("([\w]+)=(%s)" % "|".join(ALL))
|
||||
|
||||
|
||||
class BaseSpec(object):
|
||||
|
Loading…
Reference in New Issue
Block a user