oscerd opened a new pull request, #23438:
URL: https://github.com/apache/camel/pull/23438

   ## 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
   
   - [x] `mvn test` in `components/camel-openstack` — 142 tests pass
   - [x] Module + catalog + endpointdsl built cleanly; only `camel-openstack`
         regen artifacts in `git status`
   - [x] Swift protocol-defined constants (`X-Container-Meta-` etc.) verified
         to keep their previous values in the regenerated DSL
   - [x] 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_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to