[one-users] multipart post
Tino Vazquez
tinova at fdi.ucm.es
Tue Dec 21 02:30:26 PST 2010
Dear John,
With curl you can upload a file like:
curl -vki -u user:sha1password --form-string
"occixml=<STORAGE><NAME>StorageTest</NAME><DESCRIPTION>Ubuntu vanilla
install</DESCRIPTION><TYPE>OS</TYPE><URL>/srv/cloud/images/ttylinux/ttylinux.img</URL></STORAGE>"
-F "file=@/srv/cloud/images/ttylinux/ttylinux.img"
http://your.server:4567/storage
Hope it helps,
-Tino
--
Constantino Vázquez Blanco | dsa-research.org/tinova
Virtualization Technology Engineer / Researcher
OpenNebula Toolkit | opennebula.org
On Tue, Dec 21, 2010 at 7:58 AM, John Dewey <john at dewey.ws> wrote:
> I have been working on a portal (which I will submit back to the
> eco-system) at some point.
> The portal interacts with OpenNebula via OCCI. Since the portal runs
> on a different system
> than the controller, I have written a very basic OCCI client.
>
> I was looking at the following documentation, and a bit confused by
> it. Has anyone had any luck doing
> what is described below in curl?
>
> Looking at the OCCI server, it looks as though it expects a
> multipart-post with the image file?
>
> http://www.opennebula.org/documentation:rel2.2:occiug
>
> ------
> Storage
>
> Assuming we have a working Gentoo installation residing in an .img
> file, we can upload it into the OpenNebula OCCIcloud using the
> following OCCI representation of the image:
>
> <STORAGE>
> <NAME>Ubuntu Desktop</NAME>
> <DESCRIPTION>Ubuntu 10.04 desktop for students.</DESCRIPTION>
> <TYPE>OS</TYPE>
> <URL>file:///images/ubuntu/jaunty.img</URL>
> </STORAGE>
>
> ------
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
More information about the Users
mailing list