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

   _Claude Code on behalf of davsclaus_
   
   This group adds the catalog body types (CAMEL-24961) for thirteen components:
   - the seven huawei cloud components: hwcloud-dms, -frs, -functiongraph, 
-iam, -imagerecognition, -obs and -smn;
   - the six openstack components: openstack-cinder, -glance, -keystone, 
-neutron, -nova and -swift.
   
   Each change is an `@BodyTypes` annotation on the Endpoint, plus the JSON it 
generates and the catalog copy. The openstack-swift doc page had its example 
corrected.
   
   **What the catalog says now**
   
   The huawei components take their inputs from options or from the 
`CamelHwCloud*` exchange properties, not from headers, and the `operation` 
option has no default, so each operation is listed with byOption.
   
   | Component | Consumer | Producer input | Producer output |
   |---|---|---|---|
   | hwcloud-dms | | the request body POJO or its JSON text for createInstance 
and updateInstance | JSON text; delete and update keep the body and set a 
property |
   | hwcloud-frs | | `any`: the image or video comes from options or properties 
| the response of the SDK |
   | hwcloud-functiongraph | | a Map, or JSON object text | the `body` field of 
the result of the function, as text, or null |
   | hwcloud-iam | | the option POJO or its JSON text for updateUser and 
updateGroup | JSON text |
   | hwcloud-imagerecognition | | `any` | a List of 
`CelebrityRecognitionResultBody`; `ImageTaggingResponseResult` |
   | hwcloud-obs | the content of the object as `byte[]`, with the key in 
CamelFileName | text, bytes, a stream or a file for putObject | `byte[]` for 
getObject; JSON text for the others |
   | hwcloud-smn | | the message as text, bytes, a stream or a file | 
unchanged; the ids are exchange properties |
   | openstack-* | | `any`: create and update take the openstack4j model, or 
else headers; glance create and upload, and swift object create, take a stream, 
a File, a URL or a Payload | the model for create and update; the model or null 
for get; a List for getAll; unchanged for delete |
   | openstack-swift | | | the ETag as text for an object create; the 
`SwiftObject` (the metadata; `download()` gives the content) for an object get; 
a Map for getMetadata |
   
   The other specific outputs:
   - keystone checkUserGroup gives a `Boolean`;
   - neutron attachInterface and detachInterface give the `RouterInterface`;
   - nova createSnapshot gives the id of the image as text.
   
   **Checked at runtime.** Throwaway tests, not part of the PR, sent text, JSON 
text, bytes, a stream, a file, a Map, a POJO, the SDK request objects and no 
body.
   - **huawei:** mock SDK clients set on the endpoint, with dead credential 
environment variables.
   - **openstack:** the in-JVM WireMock of the module tests, whose Keystone 
catalog points every service back to localhost.
   
   Every call stayed local.
   
   Not run, and read from the code: the create and update outputs of keystone, 
neutron and nova; nova keypairs; neutron attach and detach; the swift container 
and metadata updates; glance reserve, create and update.
   
   **Doc fix**
   - **openstack-swift:** the example sent the body of a file consumer to 
swift, which fails. It now converts the body to a `java.io.File` first, and the 
page says which bodies an object takes.
   
   **Bugs found, not fixed here.** The JIRAs, one per component, will follow.
   - **All six openstack components:** a producer only works on the thread that 
created it. The openstack4j client keeps its session per thread, and 
`AbstractOpenstackProducer` builds the client once. From another thread, the 
call fails with "OSClientSession.getCurrent() is null". So a route from a 
consumer to an openstack producer fails, and so does the swift example of the 
page.
   - **openstack-swift, openstack-glance:** the payload is not converted. Only 
an InputStream, a File, a URL or a Payload is taken, so text, bytes, a Path and 
the GenericFile of a file consumer fail with "You have to set payload".
   - **hwcloud-dms:**
     - A createInstance JSON as bytes, a stream or a file is ignored, and the 
instance is built from the options.
     - updateInstance fails on it.
   - **hwcloud-functiongraph:**
     - A result without a top-level `body` field leaves a null body, and the 
result is lost.
     - JSON as bytes or a stream, or a JSON array, fails.
   - **hwcloud-iam:** JSON as bytes or a stream fails.
   - **hwcloud-obs:** from the code, putObject with a File body and no 
bucketName skips the check for the bucket, and calls `headBucket(null)`.
   - **hwcloud-smn:**
     - A Map or a POJO is published as its toString.
     - The constant CamelHwCloudSmnMesssageId has three "s".
   
   **Local checks**
   - The changed modules build, with no change to the generated files after the 
build.
   - The catalog copies equal their modules.
   - camel-catalog, camel-yaml-dsl-validator and camel-jbang-core tests pass.
   - The Endpoint and Component DSLs regenerate with no change.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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