action->optional, data_set);
action->optional, TRUE, data_set);
clone_create_notifications(	resource_t *rsc, action_t *action, action_t *action_complete,	pe_working_set_t *data_set){	/*	 * pre_notify -> pre_notify_complete -> pseudo_action	 *   -> (real actions) -> pseudo_action_complete	 *   -> post_notify -> post_notify_complete	 *	 * if the pre_noitfy requires confirmation,	 *   then a list of confirmations will be added as triggers	 *   to pseudo_action in clone_expand()	 */	action_t *notify = NULL;	action_t *notify_complete = NULL;	enum action_tasks task;	char *notify_key = NULL;	clone_variant_data_t *clone_data = NULL;	get_clone_variant_data(clone_data, rsc);		if(rsc->notify == FALSE) {		return;	}		task = text2task(action->task);	/* create pre_notify */	notify_key = generate_notify_key(		clone_data->self->id, "pre", action->task);	notify = custom_action(clone_data->self, notify_key,			       CRMD_ACTION_NOTIFY, NULL,			       action->optional, data_set);	add_hash_param(notify->extra, "notify_type", "pre");	add_hash_param(notify->extra, "notify_operation", action->task);	if(clone_data->notify_confirm) {		add_hash_param(notify->extra, "notify_confirm", "yes");	} else {		add_hash_param(notify->extra, "notify_confirm", "no");	}	notify->pseudo = TRUE;	/* create pre_notify_complete */	notify_key = generate_notify_key(		clone_data->self->id, "confirmed-pre", action->task);	notify_complete = custom_action(clone_data->self, notify_key,			       CRMD_ACTION_NOTIFIED, NULL,			       action->optional, data_set);	add_hash_param(notify_complete->extra, "notify_type", "pre");	add_hash_param(notify_complete->extra, "notify_operation", action->task);	if(clone_data->notify_confirm) {		add_hash_param(notify->extra, "notify_confirm", "yes");	} else {		add_hash_param(notify->extra, "notify_confirm", "no");	}	notify->pseudo = TRUE;	notify_complete->pseudo = TRUE;	/* pre_notify before pre_notify_complete */	custom_action_order(		clone_data->self, NULL, notify,		clone_data->self, NULL, notify_complete,		pe_ordering_manditory, data_set);		/* pre_notify_complete before action */	custom_action_order(		clone_data->self, NULL, notify_complete,		clone_data->self, NULL, action,		pe_ordering_manditory, data_set);	action->pre_notify = notify;	action->pre_notified = notify_complete;		/* create post_notify */	notify_key = generate_notify_key		(clone_data->self->id, "post", action->task);	notify = custom_action(clone_data->self, notify_key,			       CRMD_ACTION_NOTIFY, NULL,			       action_complete->optional, data_set);	add_hash_param(notify->extra, "notify_type", "post");	add_hash_param(notify->extra, "notify_operation", action->task);	if(clone_data->notify_confirm) {		add_hash_param(notify->extra, "notify_confirm", "yes");	} else {		add_hash_param(notify->extra, "notify_confirm", "no");	}	notify->pseudo = TRUE;	/* action_complete before post_notify */	custom_action_order(		clone_data->self, NULL, action_complete,		clone_data->self, NULL, notify, 		pe_ordering_postnotify, data_set);		/* create post_notify_complete */	notify_key = generate_notify_key(		clone_data->self->id, "confirmed-post", action->task);	notify_complete = custom_action(clone_data->self, notify_key,			       CRMD_ACTION_NOTIFIED, NULL,			       action->optional, data_set);	add_hash_param(notify_complete->extra, "notify_type", "pre");	add_hash_param(notify_complete->extra, "notify_operation", action->task);	if(clone_data->notify_confirm) {		add_hash_param(notify->extra, "notify_confirm", "yes");	} else {		add_hash_param(notify->extra, "notify_confirm", "no");	}	notify_complete->pseudo = TRUE;	/* post_notify before post_notify_complete */	custom_action_order(		clone_data->self, NULL, notify,		clone_data->self, NULL, notify_complete,		pe_ordering_manditory, data_set);	action->post_notify = notify;	action->post_notified = notify_complete;	if(safe_str_eq(action->task, CRMD_ACTION_STOP)) {		/* post_notify_complete before start */		custom_action_order(			clone_data->self, NULL, notify_complete,			clone_data->self, start_key(clone_data->self), NULL,			pe_ordering_optional, data_set);	} else if(safe_str_eq(action->task, CRMD_ACTION_START)) {		/* post_notify_complete before promote */		custom_action_order(			clone_data->self, NULL, notify_complete,			clone_data->self, promote_key(clone_data->self), NULL,			pe_ordering_optional, data_set);	} else if(safe_str_eq(action->task, CRMD_ACTION_DEMOTE)) {		/* post_notify_complete before promote */		custom_action_order(			clone_data->self, NULL, notify_complete,			clone_data->self, stop_key(clone_data->self), NULL,			pe_ordering_optional, data_set);	}}