Error in create cookbook for openstack using fog


#1

Hi,

I am trying to create chef cookbook for open stack using Fog services. I
trying to delete volume snapshot using fog method ,

create a connection
conn = Fog::Compute.new({
:provider => :openstack,
:openstack_api_key => “xxx”,
:openstack_username => “xxx”,
:openstack_auth_url => “http://192.168.1.200:5000/v2.0/tokens”})

vol_id =3
del_snapshot=conn.delete_snapshot(vol_id)
puts del_snapshot

but it shows error like
/usr/lib/ruby/gems/1.8/gems/excon-0.16.10/lib/excon/connection.rb:292:in
request_kernel': Fog::Compute::OpenStack::NotFound (Fog::Compute::OpenStack::NotFound) from /usr/lib/ruby/gems/1.8/gems/excon-0.16.10/lib/excon/connection.rb:103:inrequest’
from
/usr/lib/ruby/gems/1.8/gems/fog-1.7.0/lib/fog/core/connection.rb:21:in
request' from /usr/lib/ruby/gems/1.8/gems/fog-1.7.0/lib/fog/openstack/compute.rb:300:inrequest’
from
/usr/lib/ruby/gems/1.8/gems/fog-1.7.0/lib/fog/openstack/requests/compute/delete_snapshot.rb:10:in
`delete_snapshot’
from del_snap.rb:19

I used fog to call opens tack for more operations its worked but now I get
this error for to delete volume snapshot , please send any solution as soon as
possible.

Thanks and Regards,
Ganesan.A


#2

On 01/18/2013 08:41 AM, ganesan15785@gmail.com wrote:

Hi,

I am trying to create chef cookbook for open stack using Fog services. I
trying to delete volume snapshot using fog method ,

create a connection
conn = Fog::Compute.new({
:provider => :openstack,
:openstack_api_key => “xxx”,
:openstack_username => “xxx”,
:openstack_auth_url => “http://192.168.1.200:5000/v2.0/tokens”})

Try removing the /tokens part of the URL.

-jay