Hi John,
First thanks for trying Deltacloud API!
Here's the source
#require 'rubygems'
require 'deltacloud'
# this intializes a mock server
api_url = 'http://localhost:3001/api'
api_name = 'mockuser'
api_password = 'mockpassword'
client = DeltaCloud.new( api_name, api_password, api_url )
It seems you use the 'old' client (<1.1.3), I strongly recommend to
switch to the current client, because it has a tons of bug fixes and in
general is more stable and more tested than the old one.
$ gem install deltacloud-client --version=1.1.3
$ gem install deltacloud-core --version=1.1.3
With the new client your code will look very similar:
<snip>
require_relative 'deltacloud/client'
client = Deltacloud::Client(
'http://localhost:3001/api',
'API_KEY',
'API_PASSWORD'
)
client.create_instance(image_id, opts...)
</snip>
The full documentation for the client lib is here:
http://rdoc.info/github/mifo/deltacloud-client/master/frames
To have DigitalOcean as a 'default' driver, you just need to start
Deltacloud using:
$ deltacloudd -i digitalocean
Cheers,
Michal
--
John Wyatt
Hi John,
Did you also install the server gem - deltacloud-core? for release 1.1.3?
What does 'gem query |grep deltacloud' return?
Please see the two gems shown for download:
http://deltacloud.apache.org/download.html
Also, if you are trying to connect to your Digital Ocean account, you will need
to start a Deltacloud server like:
deltacloudd -i digitalocean
Then, (from a separate terminal on the same machine), try:
client = DeltaCloud.new( <Digital Ocean Client key>, <Digital Ocean API Key>,
'http://localhost:3001/api' )
From there, you should be able to access vms, images etc. from your Digital
Ocean accout.
Thanks,
Ronelle
--
Michal Fojtik <mfoj...@redhat.com>
Deltacloud API, CloudForms