Skip to content
Snippets Groups Projects
Commit 881b45dc authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

policy: accept endpoint IDs in node.target

this allows slightly easier testing while every client uses node.target
but it's easier to find the endpoint id than the node id
through `wpctl status`
parent 27191698
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,13 @@ wp_config_policy_context_get_endpoint_target (WpConfigPolicyContext *self,
WP_CONSTRAINT_TYPE_G_PROPERTY, "direction", "=u", target_dir,
WP_CONSTRAINT_TYPE_PW_PROPERTY, PW_KEY_NODE_ID, "=s", node_target,
NULL);
/* as a transition helper, also accept endpoint IDs in node.target */
if (!target) {
target = wp_session_lookup_endpoint (session,
WP_CONSTRAINT_TYPE_G_PROPERTY, "direction", "=u", target_dir,
WP_CONSTRAINT_TYPE_G_PROPERTY, "bound-id", "=s", node_target,
NULL);
}
wp_debug_object (self, "node.target = %s -> target = " WP_OBJECT_FORMAT,
node_target, WP_OBJECT_ARGS (target));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment