def evaluate_tag(
self, system_id, tag_name, tag_definition, tag_nsmap,
credentials, nodes):
"""evaluate_tag()
Implementation of
:py:class:`~provisioningserver.rpc.cluster.EvaluateTag`.
"""
# It's got to run in a thread because it does blocking IO.
d = deferToThread(
evaluate_tag, system_id, nodes, tag_name, tag_definition,
# Transform tag_nsmap into a format that LXML likes.
{entry["prefix"]: entry["uri"] for entry in tag_nsmap},
# Parse the credential string into a 3-tuple.
convert_string_to_tuple(credentials))
return d.addCallback(lambda _: {})
评论列表
文章目录