Skip to content

Commit e844b66

Browse files
committed
CAMEL-23580: camel-openstack - align Exchange header constant names with Camel naming convention (#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>
1 parent e25a4b6 commit e844b66

27 files changed

Lines changed: 617 additions & 461 deletions

File tree

catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/openstack-cinder.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828
"autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }
2929
},
3030
"headers": {
31-
"size": { "index": 0, "kind": "header", "displayName": "", "group": "volume", "label": "volume", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Size of volume.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#SIZE" },
32-
"volumeType": { "index": 1, "kind": "header", "displayName": "", "group": "volume", "label": "volume", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Volume type.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#VOLUME_TYPE" },
33-
"imageRef": { "index": 2, "kind": "header", "displayName": "", "group": "volume", "label": "volume", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "ID of image.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#IMAGE_REF" },
34-
"snapshotId": { "index": 3, "kind": "header", "displayName": "", "group": "volume", "label": "volume", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "ID of snapshot.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#SNAPSHOT_ID" },
35-
"isBootable": { "index": 4, "kind": "header", "displayName": "", "group": "volume", "label": "volume", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Is bootable.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#IS_BOOTABLE" },
36-
"volumeId": { "index": 5, "kind": "header", "displayName": "", "group": "snapshot", "label": "snapshot", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Volume ID.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#VOLUME_ID" },
37-
"force": { "index": 6, "kind": "header", "displayName": "", "group": "snapshot", "label": "snapshot", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Force.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#FORCE" },
38-
"operation": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#OPERATION" },
39-
"ID": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#ID" },
40-
"name": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#NAME" },
41-
"description": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The description.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#DESCRIPTION" }
31+
"CamelOpenstackCinderSize": { "index": 0, "kind": "header", "displayName": "", "group": "volume", "label": "volume", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Size of volume.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#SIZE" },
32+
"CamelOpenstackCinderVolumeType": { "index": 1, "kind": "header", "displayName": "", "group": "volume", "label": "volume", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Volume type.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#VOLUME_TYPE" },
33+
"CamelOpenstackCinderImageRef": { "index": 2, "kind": "header", "displayName": "", "group": "volume", "label": "volume", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "ID of image.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#IMAGE_REF" },
34+
"CamelOpenstackCinderSnapshotId": { "index": 3, "kind": "header", "displayName": "", "group": "volume", "label": "volume", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "ID of snapshot.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#SNAPSHOT_ID" },
35+
"CamelOpenstackCinderIsBootable": { "index": 4, "kind": "header", "displayName": "", "group": "volume", "label": "volume", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Is bootable.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#IS_BOOTABLE" },
36+
"CamelOpenstackCinderVolumeId": { "index": 5, "kind": "header", "displayName": "", "group": "snapshot", "label": "snapshot", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Volume ID.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#VOLUME_ID" },
37+
"CamelOpenstackCinderForce": { "index": 6, "kind": "header", "displayName": "", "group": "snapshot", "label": "snapshot", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Force.", "constantName": "org.apache.camel.component.openstack.cinder.CinderConstants#FORCE" },
38+
"CamelOpenstackOperation": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#OPERATION" },
39+
"CamelOpenstackId": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#ID" },
40+
"CamelOpenstackName": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#NAME" },
41+
"CamelOpenstackDescription": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The description.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#DESCRIPTION" }
4242
},
4343
"properties": {
4444
"host": { "index": 0, "kind": "path", "displayName": "Host", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "OpenStack host url" },

catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/openstack-glance.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@
2828
"autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }
2929
},
3030
"headers": {
31-
"diskFormat": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.openstack4j.model.image.DiskFormat", "enum": [ "RAW", "VHD", "VMDK", "VDI", "ISO", "QCOW2", "AKI", "ARI", "AMI", "UNRECOGNIZED" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of flavor VCPU.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#DISK_FORMAT" },
32-
"containerFormat": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.openstack4j.model.image.ContainerFormat", "enum": [ "BARE", "OVF", "AKI", "ARI", "AMI", "DOCKER", "UNRECOGNIZED" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Size of RAM.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#CONTAINER_FORMAT" },
33-
"owner": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Image owner.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#OWNER" },
34-
"isPublic": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Is public.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#IS_PUBLIC" },
35-
"minRam": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Minimum ram.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#MIN_RAM" },
36-
"minDisk": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Minimum disk.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#MIN_DISK" },
37-
"size": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Size.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#SIZE" },
38-
"checksum": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Checksum.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#CHECKSUM" },
39-
"operation": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#OPERATION" },
40-
"ID": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#ID" },
41-
"name": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#NAME" },
42-
"properties": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The image properties.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#PROPERTIES" }
31+
"CamelOpenstackGlanceDiskFormat": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.openstack4j.model.image.DiskFormat", "enum": [ "RAW", "VHD", "VMDK", "VDI", "ISO", "QCOW2", "AKI", "ARI", "AMI", "UNRECOGNIZED" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The number of flavor VCPU.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#DISK_FORMAT" },
32+
"CamelOpenstackGlanceContainerFormat": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.openstack4j.model.image.ContainerFormat", "enum": [ "BARE", "OVF", "AKI", "ARI", "AMI", "DOCKER", "UNRECOGNIZED" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Size of RAM.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#CONTAINER_FORMAT" },
33+
"CamelOpenstackGlanceOwner": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Image owner.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#OWNER" },
34+
"CamelOpenstackGlanceIsPublic": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Boolean", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Is public.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#IS_PUBLIC" },
35+
"CamelOpenstackGlanceMinRam": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Minimum ram.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#MIN_RAM" },
36+
"CamelOpenstackGlanceMinDisk": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Minimum disk.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#MIN_DISK" },
37+
"CamelOpenstackGlanceSize": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Size.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#SIZE" },
38+
"CamelOpenstackGlanceChecksum": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Checksum.", "constantName": "org.apache.camel.component.openstack.glance.GlanceConstants#CHECKSUM" },
39+
"CamelOpenstackOperation": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#OPERATION" },
40+
"CamelOpenstackId": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The ID.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#ID" },
41+
"CamelOpenstackName": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#NAME" },
42+
"CamelOpenstackProperties": { "index": 11, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Map<String, String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The image properties.", "constantName": "org.apache.camel.component.openstack.common.OpenstackConstants#PROPERTIES" }
4343
},
4444
"properties": {
4545
"host": { "index": 0, "kind": "path", "displayName": "Host", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "OpenStack host url" },

0 commit comments

Comments
 (0)