Skip to content

Reorganize CIB op handler functions and start on based_remote.c#4021

Merged
nrwahl2 merged 35 commits intoClusterLabs:mainfrom
nrwahl2:nrwahl2-based_first
Jan 13, 2026
Merged

Reorganize CIB op handler functions and start on based_remote.c#4021
nrwahl2 merged 35 commits intoClusterLabs:mainfrom
nrwahl2:nrwahl2-based_first

Conversation

@nrwahl2
Copy link
Contributor

@nrwahl2 nrwahl2 commented Jan 9, 2026

This is the next batch from #4011

nrwahl2 added 30 commits January 9, 2026 13:55
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Nothing uses the return value.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
* Use "based_" prefix.
* Add Doxygen.
* Move definition to align with order in based_operation.c table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Rename the function to match the request name. Also move the definition
to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Rename the function to match the request name and to use the internal
prefix. Also move the definition to match the order in the operation
table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Rename the function to use the internal prefix. Also move the definition
to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
...to based_process_commit_transact().

Rename the function to match the request name. Also move the definition
to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
To avoid using the public API prefix.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
To avoid using the public API prefix.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
We can't avoid a forward declaration altogether, but forward-declare
get_op_functions() instead.

It seems more reasonable for the commit_transact handler to be defined
above the table that uses it.

No code changes (aside from renaming file_get_op_functions() to
get_op_functions()); it only moves.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Rename the function to use the internal prefix. Also move the definition
to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Rename the function to use the internal prefix. Also move the definition
to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
And rename to process_xpath(), to avoid using the public API prefix.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
These were missed in recent commits.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Rename the function to use the internal prefix. Also move the definition
to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
The new function's name matches the request name.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Rename the function to use the internal prefix. Also move the definition
to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Avoid using the public API prefix. Also move the definition to match the
order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Avoid using the public API prefix. Also move the definition to match the
order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
The new function's name matches the request name.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Rename the function to use the internal prefix.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Avoid using the public API prefix. Also move the definition to match the
order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Avoid using the public API prefix. The new function's name also matches
the request name.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Avoid using the public API prefix. Rename to match request name. Also
move the definition to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
To match the request names.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Avoid using the public API prefix. Rename to match request name. Also
move the definition to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Avoid using the public API prefix. Rename to match request name. Also
move the definition to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Avoid using the public API prefix. Rename to match request name. Also
move the definition to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Avoid using the public API prefix. Also move the definition to match the
order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Rename the function to use the internal prefix. Also move the definition
to match the order in the operation table.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Rename the function to use the internal prefix.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
@nrwahl2 nrwahl2 requested a review from clumens January 9, 2026 22:00
* \internal
* \brief Process a \c PCMK__CIB_REQUEST_ABS_DELETE
*
* \param[in] op Ignored
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up not getting around to Doxygen for others yet. Probably at some point.

@nrwahl2
Copy link
Contributor Author

nrwahl2 commented Jan 9, 2026

@clumens Almost all of this is trivial, so don't let the number of commits or lines changed discourage you

@nrwahl2 nrwahl2 force-pushed the nrwahl2-based_first branch from a7f2155 to fcbb547 Compare January 9, 2026 22:12
}

cib_read_config(config_hash, cib);
cib_read_config(config_hash, the_cib);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI we end up getting rid of config_hash completely and dropping this call, but that commit didn't make it into this PR.

@nrwahl2 nrwahl2 force-pushed the nrwahl2-based_first branch from fcbb547 to 1211540 Compare January 11, 2026 00:55
@clumens
Copy link
Contributor

clumens commented Jan 13, 2026

Everything before Refactor: based: New based_remote.h looks good, if you want to go ahead and merge just that part now. You can also wait and I'll take a look at the rest soon.

@nrwahl2 nrwahl2 force-pushed the nrwahl2-based_first branch from 1211540 to be9e788 Compare January 13, 2026 19:58
@nrwahl2
Copy link
Contributor Author

nrwahl2 commented Jan 13, 2026

Everything before Refactor: based: New based_remote.h looks good, if you want to go ahead and merge just that part now. You can also wait and I'll take a look at the rest soon.

Dropped all commits starting with based_remote.h. Merging.

@nrwahl2 nrwahl2 merged commit edeec74 into ClusterLabs:main Jan 13, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants