openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #07417
Re: Adding a Glance image via API without POSTing the image data?
Yep, that's pretty much exactly the implementation we were hoping might exist. If it can be built that would be phenomenal. Any thoughts on whether that might be possible before E4 closes, or will it have to wait until Folsom?
- Gabriel
> -----Original Message-----
> From: Eoghan Glynn [mailto:eglynn@xxxxxxxxxx]
> Sent: Wednesday, February 08, 2012 3:12 AM
> To: Tres Henry; Gabriel Hurley
> Cc: openstack@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Openstack] Adding a Glance image via API without POSTing the
> image data?
>
>
>
> > I think this is a slightly different (but related) use case. In this
> > case the user wants to add an image to the configured Glance store
> > through the web front-end performing the same task as 'glance add
> > name="foo" is_public=true < blah.tar.gz' in the CLI.
> >
> > Ideally Horizon would provide a UI that allows the user to specify an
> > image location URL and then optionally a check box for "upload to
> > image store" or something along those lines.
>
> A-ha, I see what you mean.
>
> AFAIK that mode of upload separate to the image POST is not currently
> supported, but it would be quite straightforward to add say support for a
> header that identifies an image location for glance to retrieve from (as
> opposed to just recording the external location).
>
> Something like:
>
> X-Image-Meta-Retrieve-From: URI
>
> where URI is a HTTP, S3, or Swift location that's accessible to the glance API
> service.
>
> Would that address your use-case, Gabriel?
>
> Cheers,
> Eoghan
>
> > On Feb 7, 2012, at 2:09 PM, Eoghan Glynn wrote:
> >
> > >
> > >
> > >> The Horizon team is looking at adding a first-pass implementation
> > >> of image upload before the Essex release, and we'd really like to
> > >> bypass the problems associated with, say, passing a 700MB Ubuntu
> > >> image through the user's browser to a web server and then across to
> > >> Glance...
> > >>
> > >> So the question is this: is there a way to add an image to Glance
> > >> via the API *without* passing the image data in via the POST body?
> > >> Options might include specifying a Swift object for the image, or a
> > >> download URL...
> > >
> > > Hi Gabriel,
> > >
> > > Check out the X-Image-Meta-Location header which allows a
> > > pre-existing HTTP, S3, Swift or 'file://' image location to be
> > > specified.
> > >
> > > The result is that the image content is not uploaded to glance,
> > > instead the external location is relied upon.
> > >
> > > Cheers,
> > > Eoghan
> > >
> > > _______________________________________________
> > > Mailing list: https://launchpad.net/~openstack
> > > Post to : openstack@xxxxxxxxxxxxxxxxxxx
> > > Unsubscribe : https://launchpad.net/~openstack
> > > More help : https://help.launchpad.net/ListHelp
> >
> >
Follow ups
References