Skip to content

[backport camel-4.14.x] CAMEL-23580: camel-openstack - align Exchange header constant names with Camel naming convention#23593

Merged
oscerd merged 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23438-to-camel-4.14.x
May 28, 2026
Merged

[backport camel-4.14.x] CAMEL-23580: camel-openstack - align Exchange header constant names with Camel naming convention#23593
oscerd merged 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/23438-to-camel-4.14.x

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 28, 2026

Backports #23438 to camel-4.14.x. Standard 4_21 → 4_14 guide-file adaptation (camel-4x-upgrade-guide-4_21.adoc does not exist on 4.14.x; the same content has been added to camel-4x-upgrade-guide-4_14.adoc in the == Upgrading from 4.14.7 to 4.14.8 section).

Summary

Renames ~55 Exchange header values across OpenstackConstants, KeystoneConstants, NovaConstants, CinderConstants, GlanceConstants, NeutronConstants and SwiftConstants from non-Camel-prefixed values to CamelOpenstack<Subsystem><Name>.

Scope decisions preserved from the main PR:

  • SwiftConstants.CONTAINER_METADATA_PREFIX, VERSIONS_LOCATION, CONTAINER_READ, CONTAINER_WRITE keep their previous values (X-Container-Meta-, X-Versions-Location, etc.) because they are part of the Swift HTTP protocol contract used by openstack4j.
  • Non-header constants (SCHEME_*, CREATE, UPDATE, GET_ALL, GET, DELETE, subsystem-name constants) keep their previous values.
  • Cherry-pick includes the same ContainerProducerTest.getTest fix shipped with the main-branch PR (test had been using SwiftConstants.LIMIT/DELIMITER to look up values in the openstack4j map; now uses literal "limit"/"delimiter").

mvn test passes for camel-openstack on 4.14.x.

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

@oscerd oscerd force-pushed the backport/23438-to-camel-4.14.x branch from 6adbd4e to 0c4b61f Compare May 28, 2026 08:48
…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>
@oscerd oscerd force-pushed the backport/23438-to-camel-4.14.x branch from 0c4b61f to d17c02f Compare May 28, 2026 15:06
@oscerd oscerd merged commit e7ce700 into apache:camel-4.14.x May 28, 2026
3 checks passed
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