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)
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
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