[backport camel-4.18.x] CAMEL-23580: camel-openstack - align Exchange header constant names with Camel naming convention#23540
Open
oscerd wants to merge 1 commit into
Conversation
…ith Camel naming convention (apache#23438) Renames the Exchange header string values across OpenstackConstants, KeystoneConstants, NovaConstants, CinderConstants, GlanceConstants, NeutronConstants and SwiftConstants from non-Camel prefixed values (operation, ID, name, description, properties, password, action, FlavorId, ImageId, AdminPassword, ...) to CamelOpenstack<Subsystem><Name>, following the convention used across the rest of the Camel component catalog and matching the pattern established in CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail), CAMEL-23461 (camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket / camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira). The Java field names (OPERATION, ID, NAME, PASSWORD, ADMIN_PASSWORD, ACTION, FLAVOR_ID, IMAGE_ID, etc.) are unchanged so routes referencing the constants symbolically continue to work; routes using the literal string values must be updated (documented in the 4.21 upgrade guide). Scope decisions: - Common headers in OpenstackConstants get a "CamelOpenstack<Name>" prefix (CamelOpenstackOperation, CamelOpenstackId, CamelOpenstackName, CamelOpenstackDescription, CamelOpenstackProperties) - Subsystem-specific headers get a "CamelOpenstack<Subsystem><Name>" prefix to keep them distinguishable from the common ones (especially needed for KeystoneConstants.DESCRIPTION which previously collided with OpenstackConstants.DESCRIPTION via inheritance hiding) - SwiftConstants.CONTAINER_METADATA_PREFIX, VERSIONS_LOCATION, CONTAINER_READ, and CONTAINER_WRITE intentionally keep their previous values (X-Container-Meta-, X-Versions-Location, X-Container-Read, X-Container-Write) because they are part of the Swift HTTP protocol contract used by openstack4j to forward container metadata and ACLs to the Swift backend. - The non-header constants in OpenstackConstants (SCHEME_*, CREATE, UPDATE, GET_ALL, GET, DELETE) and the subsystem-name constants (NOVA_SUBSYSTEM_*, NEUTRON_*_SYSTEM, etc.) keep their previous values because they are operation enum / subsystem identifiers, not Exchange header names. Fixes one test (ContainerProducerTest.getTest) that was incorrectly using the SwiftConstants.LIMIT/DELIMITER constants as keys to look up values in the openstack4j ContainerListOptions internal map. The map keys are the openstack4j-defined URL parameter names ("limit", "delimiter"), not the Camel header constants. The test now uses the literal names. The generated Endpoint DSL header accessors on each component's HeaderNameBuilder have been renamed accordingly (operation() -> openstackOperation(), password() -> openstackKeystonePassword(), adminPassword() -> openstackNovaAdminPassword(), etc.). Tracker: CAMEL-23577 Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
davsclaus
approved these changes
May 26, 2026
gnodet
approved these changes
May 26, 2026
Contributor
gnodet
left a comment
There was a problem hiding this comment.
Large backport (~5000 lines) of the camel-openstack header rename to 4.18.x. Covers all OpenStack sub-components: Cinder, Glance, Keystone, Neutron, Nova, and Swift. Headers renamed from short names (e.g., size, operation, ID, name) to Camel-prefixed names (e.g., CamelOpenstackCinderSize, CamelOpenstackOperation, CamelOpenstackId). Bulk of the diff is generated catalog metadata. Upgrade guide entry included.
Partial review (large diff) — focused on source code changes and upgrade guide. Generated metadata consistent with the constant renames.
LGTM.
Fully automatic review from Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports #23438 to
camel-4.18.x.Cherry-pick of merge commit
902504dd360with one adaptation: the originalPR's upgrade-guide entry was added to
camel-4x-upgrade-guide-4_21.adoc,which does not exist on the 4.18.x maintenance branch. Per the project's
backport policy the same content has been added to
camel-4x-upgrade-guide-4_18.adocinstead.Summary
Renames the Exchange header string values across
OpenstackConstants,KeystoneConstants,NovaConstants,CinderConstants,GlanceConstants,NeutronConstantsandSwiftConstantsthat were not in theCamelnamespace to
CamelOpenstack<Subsystem><Name>. 55+ constants across the 6subsystems (cinder/glance/keystone/neutron/nova/swift) plus the common
OpenstackConstants.Scope decisions preserved from main PR
OpenstackConstantsuse aCamelOpenstack<Name>prefix (
CamelOpenstackOperation,CamelOpenstackId,CamelOpenstackName,CamelOpenstackDescription,CamelOpenstackProperties).CamelOpenstack<Subsystem><Name>.SwiftConstants.CONTAINER_METADATA_PREFIX,VERSIONS_LOCATION,CONTAINER_READ,CONTAINER_WRITEare unchanged because they areSwift HTTP protocol contract values (
X-Container-Meta-,X-Versions-Location,X-Container-Read,X-Container-Write) used byopenstack4j.
SCHEME_*,CREATE,UPDATE,GET_ALL,GET,DELETE, subsystem-name constants) keep their previous values.The cherry-pick includes the fix to
ContainerProducerTest.getTestthat wasshipped with the main-branch PR — the test had been using
SwiftConstants.LIMIT/DELIMITERto look up values in the openstack4jContainerListOptionsinternal map; with the rename, the test correctly usesthe literal openstack4j parameter names (
"limit","delimiter").Test plan
mvn testincomponents/camel-openstackon 4.18.x — 142 tests passrename described above (no merge marker shipped)
=== camel-openstack - potential breaking changeincamel-4x-upgrade-guide-4_18.adocTracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino