[one-ecosystem] [one-users] Looking for libcloud example

Daniel Molina Aranda danmolin at fdi.ucm.es
Tue Jun 8 07:19:01 PDT 2010


Hi,

If you want to use libcloud with OpenNebula you can choose between the
OpenNebula driver or the vCloud driver using the new vCloud Service.

*OpenNebula driver:*

- If you want to use libcloud with the OpenNebula driver you have to start
the OCCI Service, because libcloud uses the OGF OCCI API to interact with
ONE. For more info about configuring the OCCI Service [1]

- When the OCCI Service is running you have to change the hard coded
variables in the opennebula.py file included in the libcloud source, to the
ones specified in the OCCI Service  configuration.
------------------------------
API_HOST = 'cloud.server'
API_PORT = (4567, 443)
API_SECURE = False
------------------------------

- Then, you can run this python script to get the available images in your
OpenNebula.
------------------------------
from libcloud.types import Provider
from libcloud.providers import get_driver

one = get_driver(Provider.OPENNEBULA)

driver =  one('one_user', 'one_password')

images = driver.list_images()

print images
------------------------------


*vCloud driver:*

- If you want to use libcloud with the vCloud driver you have to start the
vCloud Service. For more info about configuring the vCloud Service [2]

- When the vCloud Service is running you have to change the hard coded
variable in the vcloud.py file included in the libcloud source, to the one
specified in the vCloud Service  configuration.
------------------------------
class TerremarkConnection(VCloudConnection):
    """
    vCloud connection subclass for Terremark
    """

    host = "cloud.server"
------------------------------

- Then, you can run this python script to get the available images in your
OpenNebula.
------------------------------
from libcloud.types import Provider
from libcloud.drivers.vcloud import TerremarkDriver

driver =  TerremarkDriver('one_user', 'one_password')

images = driver.list_images()
print images
------------------------------


Let me know if you have any problem following these steps.

Regards.

[1] http://www.opennebula.org/documentation:rel1.4:occicg
[2] http://dev.opennebula.org/projects/one-vcloud/wiki



On 8 June 2010 15:39, Jelle Herold <jelle at defekt.nl> wrote:

> Hi list,
>
> I'm looking for a libcloud (http://incubator.apache.org/libcloud/)
> example with opennebula. I cannot get this to work, has anyone played
> with this?
>
> Thanks,
> Jelle.
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
Daniel Molina, Cloud Technology Engineer/Researcher
DSA Research Group: web http://dsa-research.org and blog
http://blog.dsa-research.org
OpenNebula Open Source Toolkit for Cloud Computing:
http://www.OpenNebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/ecosystem-opennebula.org/attachments/20100608/603af2ba/attachment-0001.htm>


More information about the Ecosystem mailing list