roberto gasdia created CAMEL-16587:
--------------------------------------

             Summary: Cannot create ObjectStore V3 Client
                 Key: CAMEL-16587
                 URL: https://issues.apache.org/jira/browse/CAMEL-16587
             Project: Camel
          Issue Type: Bug
          Components: camel-openstack
    Affects Versions: 3.9.0, 3.8.0
         Environment: Camel 3.8.0

Ubuntu 20.04

In my project I'm using camel in the "spring javaconfig" flavor.
            Reporter: roberto gasdia


I'm using camel-openstack component to retrieve files from an object storage 
(swift).

The string I'm composing is the following:
{quote}{color:#6a8759}"openstack-swift:" {color}+ {color:#9876aa}OS_AUTH_URL 
{color}+ {color:#6a8759}"?" {color}+
 {color:#6a8759}"username=" {color}+ {color:#9876aa}USER {color}+
 {color:#6a8759}"&password=" {color}+ {color:#9876aa}PASSWORD {color}+
 {color:#6a8759}"&subsystem=objects" {color}+
 {color:#6a8759}"&domain=Default&operation=getAll"{color}
{quote}
but I'm getting an exception: org.apache.camel.FailedToCreateProducerException.

By digging in the source code I found the block that might be the problem (at 
least in my case) in class *AbstractOpenstackEndpoint:*

 

{{{color:#cc7832}private {color}OSClient.OSClientV3 
{color:#ffc66d}createV3Client{color}() {}}

{{ IOSClientBuilder.V3 builder = OSFactory.builderV3()}}
{{ .endpoint(getHost()){color:#cc7832};
{color}{color:#cc7832}
{color} builder.credentials(getUsername(){color:#cc7832}, 
{color}getPassword(){color:#cc7832}, 
{color}Identifier.byId(getDomain())){color:#cc7832};
{color}{color:#cc7832}
{color} builder.scopeToProject(Identifier.byId(getProject())){color:#cc7832};
{color}{color:#cc7832}
{color}{color:#cc7832} if {color}(getConfig() != {color:#cc7832}null{color}) {}}
{{ builder.withConfig(getConfig()){color:#cc7832};
{color} }}}

{{ {color:#cc7832}return {color}builder.authenticate(){color:#cc7832};
{color}{color:#808080}
{color}}}}

{{I managed to connect to swift by making these changes:}}

{{- Identifier.byName(getDomain()) instead of byId}}

{{- avoiding setting scopeToProject}}{{}}

 

{{I am willing to create a pull request if it helps}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to