incubator-libcloud mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kyle Murphy <kylemu...@gmail.com>
Subject [libcloud] Destroy node help
Date Tue, 08 Jun 2010 06:19:10 GMT
Hey guys,
I've successfully been able to create a node through libcloud, but I'm
having trouble destroying a node, So I have this code so far... with the
USER and API up top of course

Driver = get_driver(Provider.RACKSPACE)
conn = Driver(RACKSPACE_USER, RACKSPACE_KEY)

# retrieve available images and sizes
images = conn.list_images()
# [<NodeImage: id=3, name=Gentoo 2008.0, driver=Rackspace  ...>, ...]
size = conn.list_sizes()
# [<NodeSize: id=1, name=256 server, ram=256 ... driver=Rackspace ...>, ...]


# create node with first image and first size
node = conn.destroy_node('test')

The particular node name is 'test' , I've tried without the quotes. I get
this error...

kyle@kyle-laptop:~/trunk$ python destroynode.py
Traceback (most recent call last):
  File "destroynode.py", line 18, in <module>
    node = conn.destroy_node('173.203.204.46')
  File "/home/kyle/trunk/libcloud/drivers/rackspace.py", line 262, in
destroy_node
    uri = '/servers/%s' % (node.id)

After looking through the API documentation, I've discovered that the
destroy_node function needs the (node.id) argument, but I'm not sure how to
enter that in correctly in order to destroy it. If anyone has an example of
how to destroy a node they'd like to share, then that would be great, we
should also put it on the website :)

I've also been having trouble finding which Image ID is associated with a
particular distribution, Is there a list somewhere that shows what distros
Rackspace allocates the Image ID to? I've looked for this for a while.

Thanks,
- Kyle Murphy

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message