Hi Jose,

Try setting the following property when creating the context:

Properties overrides = new Properties();
overrides.setProperty(KeystoneProperties.CREDENTIAL_TYPE,
CredentialTypes.API_ACCESS_KEY_CREDENTIALS)

ContextBuilder.newBuilder(foo)
...
.overrides(overrides)
...

And use the identity in the form: "project:accesKey"
And use the Secret key as the credential.

Something like:

Properties overrides = new Properties();
overrides.setProperty(KeystoneProperties.CREDENTIAL_TYPE,
CredentialTypes.API_ACCESS_KEY_CREDENTIALS)

ContextBuilder.newBuilder("hpcloud-compute")
  .credentials("myuser-project1:apiKey", "api-secret")
  .overrides(overrides)
...


HTH!


On 16 February 2014 10:34, Jose <[email protected]> wrote:
> Hello,
>
> I am stuck in the HP sample as Giovanni Toraldo [1], I have read the
> Official HP and quickstart documentation and I obtain the same error.
>
> When I run the compute-basic sample for HP I find the next error:
>
> java -jar target/compute-basics-jar-with-dependencies.jar
> hpcloud-compute tenant-id:username password mygroup add
>>>
>>> initializing {id=openstack-nova, name=OpenStack Nova Diablo+ API,
>>> views=[org.jclouds.compute.ComputeServiceContext],
>
> endpointName=identity service url ending in /v2.0/,
> identityName=${tenantName}:${userName}
> or ${userName}, if your keystone supports a default tenant,
> credentialName=Optional.of(${password}),
> documentation=http://api.openstack.org/, api=interface
> org.jclouds.openstack.nova.v2_0.NovaApi,
> asyncApi=interface org.jclouds.openstack.nova.v2_0.NovaAsyncApi}
>>>
>>> adding node to group mygroup
>
> error: Guice provision errors:
>
> 1) Error in custom provider, org.jclouds.rest.AuthorizationException:
> POST https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens
> HTTP/1.1 -> HTTP/1.1 401 Unauthorized
>   at
> org.jclouds.compute.config.BaseComputeServiceContextModule.provideTemplateOptionallyFromProperties(BaseComputeServiceContextModule.java:184)
>   while locating org.jclouds.compute.domain.TemplateBuilder annotated
> with @com.google.inject.name.Named(value=DEFAULT)
>
> I have tried multiple combination of login dates too. I have created a new
> project, I have activated all the needed services. I have used the tenantId
> too (https://account.hpcloud.com/account/api_keys), even I have change the
> API-KEY, but I do not get to run the example for HP.
>
> any idea?
>
> Thanks a lot.
>
> Jose
>
>
>
> [1]
> http://mail-archives.apache.org/mod_mbox/jclouds-user/201305.mbox/%3CCAAy5=2e_hzokwpm4ffskq06c89kquaqcpm7nhuzm9kngzkw...@mail.gmail.com%3E

Reply via email to