+def _get_needed_policy_info(policyname):
+ """
+ Get the needed info for a policy
+ """
+ m = _get_policy_definition(policyname)
+ return (
+ utils.rmr_string_to_int(m["message_receives_rmr_type"]),
+ m["message_receives_payload_schema"] if "message_receives_payload_schema" in m else None,
+ utils.rmr_string_to_int(m["message_sends_rmr_type"]),
+ )
+
+
+def _get_needed_policy_fetch_info(policyname):
+ """
+ Get the needed info for fetching a policy state
+ """
+ m = _get_policy_definition(policyname)
+ req_k = "control_state_request_rmr_type"
+ ack_k = "control_state_request_reply_rmr_type"
+ return (
+ utils.rmr_string_to_int(m[req_k]) if req_k in m else None,
+ utils.rmr_string_to_int(m[ack_k]) if ack_k in m else None,
+ )
+
+