glance python api image upload

Asked by Akilesh

The put method to url v2/images/​{image_id}​/file will upload a disk file as image to glance.

The corresponding python method seems to be glanceclient.v2.images.Controller.upload.

It accepts a file like object which it reads and uploads the data to glance.

The cli has an additional feature where we use --location to specify the image url. How do I do the same with the python api.
I would like to tell glance to download the image data from a url.

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
Erno Kuvaja (jokke) said :
#1

The v1 has the "copy_from" parameter parsed at create() function of ImageManager. Have you tried to pass that parameter to glanceclient.v2.images.Controller.create?

Can you help with this problem?

Provide an answer of your own, or ask Akilesh for more information if necessary.

To post a message you must log in.