Merge "Refactoring inline parameters syntax"
This commit is contained in:
commit
b03477beb7
@ -105,7 +105,7 @@ workflows:
|
|||||||
|
|
||||||
task7:
|
task7:
|
||||||
with-items: vm_info in $.vms
|
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:
|
on-complete:
|
||||||
- task9
|
- task9
|
||||||
- task10
|
- task10
|
||||||
@ -327,6 +327,7 @@ class DSLv2ModelTest(base.BaseTest):
|
|||||||
{
|
{
|
||||||
'is_true': True,
|
'is_true': True,
|
||||||
'object_list': [1, None, 'str'],
|
'object_list': [1, None, 'str'],
|
||||||
|
'is_string': '50'
|
||||||
},
|
},
|
||||||
task7_spec.get_input()
|
task7_spec.get_input()
|
||||||
)
|
)
|
||||||
|
@ -21,8 +21,22 @@ from mistral import exceptions as exc
|
|||||||
|
|
||||||
|
|
||||||
CMD_PTRN = re.compile("^[\w\.]+[^=\s\"]*")
|
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):
|
class BaseSpec(object):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user