do a POST using curl in glance

Asked by Guilherme Santos Souza

Hello Folks,

i'm trying to add a new image in glance server by a http request, i was using curl but i just got a GET resquest for all public images, using the command "curl http://$adress/images", i've researched and read that i must send a MIME-encoded at POST request, how can i do this operation?

tks for help!

Question information

Language:
English Edit question
Status:
Answered
For:
Glance Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jay Pipes (jaypipes) said :
#1

You don't want to send it using MIME-encoding. You want to just transfer the image data using application/octet-stream I think...

We used to have a test case that used curl. Had to dig up an old branch, but the command calls should be similar. They show how to upload data to Glance using just curl.

http://bazaar.launchpad.net/~rconradharris/glance/lp803226/view/head:/tests/functional/test_curl_api.py

Cheers!
-jay

Can you help with this problem?

Provide an answer of your own, or ask Guilherme Santos Souza for more information if necessary.

To post a message you must log in.