Skip to content

CAMEL-23580: camel-openstack - align Exchange header constant names with Camel naming convention#23438

Merged
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23580
May 22, 2026
Merged

CAMEL-23580: camel-openstack - align Exchange header constant names with Camel naming convention#23438
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23580

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 21, 2026

Summary

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 (both were the
    literal string description).
  • SwiftConstants.CONTAINER_METADATA_PREFIX, VERSIONS_LOCATION,
    CONTAINER_READ, 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. Renaming them would break interoperability with the
    Swift API.
  • 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.

Test changes

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 previous test relied on the coincidence
that the Camel constant values happened to equal the openstack4j parameter
names. With the rename the two diverge, and the test is updated to use
the literal openstack4j names.

Generated artifacts

  • components/camel-openstack/.../openstack-{cinder,glance,keystone,neutron,nova,swift}.json — component catalogs
  • catalog/camel-catalog/.../components/openstack-*.json — catalog mirrors
  • dsl/camel-endpointdsl/.../{Cinder,Glance,Keystone,Neutron,Nova,Swift}EndpointBuilderFactory.java — DSL header accessors renamed (e.g. operation()openstackOperation(), password()openstackKeystonePassword(), adminPassword()openstackNovaAdminPassword(), flavorId()openstackNovaFlavorId())

Backports

camel-openstack exists on camel-4.18.x and camel-4.14.x with identical
source. Backports are straightforward; will be filed as follow-up PRs.

Test plan

  • mvn test in components/camel-openstack — 142 tests pass
  • Module + catalog + endpointdsl built cleanly; only camel-openstack
    regen artifacts in git status
  • Swift protocol-defined constants (X-Container-Meta- etc.) verified
    to keep their previous values in the regenerated DSL
  • Upgrade guide entry added under === camel-openstack with per-subsystem
    mapping tables and explicit note about the Swift protocol constants

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

@oscerd oscerd requested review from davsclaus and gnodet May 21, 2026 16:31
@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-openstack
  • docs
  • dsl/camel-endpointdsl
All tested modules (10 modules)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Endpoint DSL
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: OpenStack
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

Copy link
Copy Markdown
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

Looks good — thorough rename across all 6 sub-components (Cinder, Glance, Keystone, Neutron, Nova, Swift). Naming is consistent: CamelOpenstack* for common headers, CamelOpenstack<Subsystem>* for sub-component-specific ones. Swift protocol headers (X-Container-Meta-, X-Versions-Location, etc.) correctly preserved with a clear comment explaining why. Upgrade guide is excellent with per-subsystem mapping tables.

Minor: the PR title says CAMEL-23580 but the body says "Tracker: CAMEL-23577" — might want to align those.

Claude Code on behalf of Guillaume Nodet

…ith Camel naming convention

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 fix/CAMEL-23580 branch from 836bc3a to ff48af9 Compare May 22, 2026 16:29
@oscerd oscerd merged commit 902504d into apache:main May 22, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants