Hi,<div><br></div><div>If you want to use libcloud with OpenNebula you can choose between the OpenNebula driver or the vCloud driver using the new vCloud Service.<br><div><br></div><div><b>OpenNebula driver:</b></div><div>

<br></div><div>- 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]</div>


<div><br></div><div>- 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.</div>

<div><div>------------------------------</div><div></div></div><div><div>API_HOST = 'cloud.server'</div><div>API_PORT = (4567, 443)</div><div>API_SECURE = False</div></div><div><div>------------------------------</div>


<div></div></div><div><br></div><div>- Then, you can run this python script to get the available images in your OpenNebula.</div><div>------------------------------</div><div><div>from libcloud.types import Provider</div>


<div>from libcloud.providers import get_driver</div><div><br></div><div>one = get_driver(Provider.OPENNEBULA)</div><div><br></div><div>driver =  one('one_user', 'one_password')</div><div><br></div><div>images = driver.list_images()</div>


<div><br></div><div>print images</div></div><div><div>------------------------------</div><div><br></div><div><br></div><div><b>vCloud driver:</b></div><div><br></div><div><div>- 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]</div>

<div><br></div><div>- 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.</div></div>

<div><div>------------------------------</div></div><div><div>class TerremarkConnection(VCloudConnection):</div><div>    """</div><div>    vCloud connection subclass for Terremark</div><div>    """</div>

<div><br></div><div>    host = "cloud.server"</div></div><div><div>------------------------------</div></div><div><br></div><div>- Then, you can run this python script to get the available images in your OpenNebula.</div>

<div><div><div>------------------------------</div></div></div><div>from libcloud.types import Provider</div><div><div>from libcloud.drivers.vcloud import TerremarkDriver</div><div><br></div><div>driver =  TerremarkDriver('one_user', 'one_password')</div>

<div><br></div><div>images = driver.list_images() </div><div>print images</div></div><div><div><div>------------------------------</div></div></div><div><br></div><div><br></div><div></div></div><div>Let me know if you have any problem following these steps.</div>

<div><br></div><div>Regards.</div><div><br></div><div>[1] <a href="http://www.opennebula.org/documentation:rel1.4:occicg" target="_blank">http://www.opennebula.org/documentation:rel1.4:occicg</a></div><div>[2] <a href="http://dev.opennebula.org/projects/one-vcloud/wiki">http://dev.opennebula.org/projects/one-vcloud/wiki</a></div>


<div><br></div><div><br><br><div class="gmail_quote">On 8 June 2010 15:39, Jelle Herold <span dir="ltr"><<a href="mailto:jelle@defekt.nl" target="_blank">jelle@defekt.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi list,<br>
<br>
I'm looking for a libcloud (<a href="http://incubator.apache.org/libcloud/" target="_blank">http://incubator.apache.org/libcloud/</a>)<br>
example with opennebula. I cannot get this to work, has anyone played<br>
with this?<br>
<br>
Thanks,<br>
<font color="#888888">Jelle.<br>
</font><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Daniel Molina, Cloud Technology Engineer/Researcher<br>DSA Research Group: web <a href="http://dsa-research.org" target="_blank">http://dsa-research.org</a> and blog <a href="http://blog.dsa-research.org" target="_blank">http://blog.dsa-research.org</a><br>


OpenNebula Open Source Toolkit for Cloud Computing: <a href="http://www.OpenNebula.org" target="_blank">http://www.OpenNebula.org</a><br>
</div>
</div>