Esempio n. 1
0
def _deserialize_meta(cstruct: dict, name: str) -> PMap:
    schema = create_workflow_meta_schema(cstruct)
    try:
        appstruct = schema.deserialize(cstruct)
    except Invalid as err:
        msg = 'Error add workflow with name {0}: {1}'
        raise ConfigurationError(msg.format(name, str(err.asdict())))
    return freeze(appstruct)
Esempio n. 2
0
def _deserialize_meta(cstruct: dict, name: str) -> PMap:
    schema = create_workflow_meta_schema(cstruct)
    try:
        appstruct = schema.deserialize(cstruct)
    except Invalid as err:
        msg = 'Error add workflow with name {0}: {1}'
        raise ConfigurationError(msg.format(name, str(err.asdict())))
    return freeze(appstruct)
Esempio n. 3
0
 def _describe_workflows(self, appstructs: dict) -> dict:
     cstructs = {}
     for name, appstruct in appstructs.items():
         schema = create_workflow_meta_schema(appstruct)
         cstructs[name] = schema.serialize(appstruct)
     return cstructs
Esempio n. 4
0
 def _describe_workflows(self, appstructs: dict) -> dict:
     cstructs = {}
     for name, appstruct in appstructs.items():
         schema = create_workflow_meta_schema(appstruct)
         cstructs[name] = schema.serialize(appstruct)
     return cstructs
Esempio n. 5
0
def _validate_workflow_cstruct(cstruct: dict) -> dict:
    """Deserialize workflow :term:`cstruct` and return :term:`appstruct`."""
    schema = create_workflow_meta_schema(cstruct)
    appstruct = schema.deserialize(cstruct)
    return appstruct
Esempio n. 6
0
def _validate_workflow_cstruct(cstruct: dict) -> dict:
    """Deserialize workflow :term:`cstruct` and return :term:`appstruct`."""
    schema = create_workflow_meta_schema(cstruct)
    appstruct = schema.deserialize(cstruct)
    return appstruct