deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: Java REST Client
Date Wed, 02 Jan 2013 10:23:17 GMT
On 12/31, Dario Garcia Gasulla wrote:
> Thanks Andre and Mario, your explanations were quite useful.
> The approach you use to create and manage instances is quite simple and
> intuitive (much better than what I was trying to do).
> 
> I found one more problem, I'll tell you about it to see if you know what
> I'm doing wrong:
> 
> When launching an instance
> 
>      /   instance = client.createInstance(image.getId());/
> 
> there's no way to specify the pem key the instance is supposed to
> accept. The second create method does not accept key id either:
> 
>         /createInstance(String name, String imageId, String profileId,
> String realmId, String memory, String storage)/
> 
> Unfortunately, if the key is not provided on launch time, the instance
> will only be accessible through <user,pass> (says Amazon).
> I've tried to set it before and then launch it:/
>         instance.setKeyId("pem_key_file");
> //        instance = client.createInstance(image.getId());/
> 

The 'key' in Deltacloud is specified by 'keyname' parameter during
'create_instance' operation. The naming of this parameter is a bit
ambiguous because the 'key id' is actually require here.

To use this 'key' you first need to 'create' one under /api/keys
collection or use one of the already created id's.

The PEM is returned in response of the 'key' creation. Then you can
use this 'key' when creating a new instance. The using that PEM you
should be able to connected to the instance.

Hope that helps :-)

  -- Michal


-- 
Michal Fojtik <mfojtik@redhat.com>
Deltacloud API, CloudForms

Mime
View raw message