← Back to team overview

openstack team mailing list archive

Re: glance.get_glance_client removed in Folsom

 

Here's the answer (thanks clarkb for the clues!) :-)

Folsom implementation:

            (glance_image_service, image_id) = self._glance.get_remote_image_service(context, name)            
            image_metadata = {"is_public": False,
                      "disk_format": "vhd",
                      "container_format": "bare",
                      "properties": {}}     
            f = open(image_vhd_path, 'rb')
            LOG.debug(_("Updating Glance image %s with content from merged disk %s"), image_id, image_vhd_path)                      
            glance_image_service.update(context, image_id, image_metadata, f)



Alessandro Pilotti
Cloudbase Solutions Srl
-------------------------------------
MVP ASP.Net / IIS
Windows Azure Insider
Red Hat Certified Engineer 
-------------------------------------




On Aug 7, 2012, at 05:00 , Alessandro Pilotti <ap@xxxxxxxxxx> wrote:

> Hi guys,
> 
> By porting our Essex code to Folsom, I noticed that the method nova/image/glance.get_glance_client is missing. Any suggestion on what to use as replacement in Folsom?
> 
> Here's the current Essex snippet.
> 
>             (glance_client, image_id) = self._glance.get_glance_client(context, name)        
>     
>             image_metadata = {"is_public": False,
>                       "disk_format": "vhd",
>                       "container_format": "bare",
>                       "properties": {}}     
>             f = open(image_vhd_path, 'rb')
> 	    LOG.debug(_("Updating Glance image %s with content from merged disk %s"), image_id, image_vhd_path)                      
>             glance_client.update_image(image_id, image_meta=image_metadata, image_data=f)
> 
> 
> 
> Thanks!
> 
> Alessandro Pilotti
> Cloudbase Solutions Srl
> -------------------------------------
> MVP ASP.Net / IIS
> Windows Azure Insider
> Red Hat Certified Engineer 
> -------------------------------------
> 
> 
> 
> 
> 
> 
> 
> Alessandro Pilotti
> Cloudbase Solutions Srl
> ------------------------------------------------------------
> IT Consultant & Technical Speaker
>  
> MVP ASP.Net / IIS
> Windows Azure Insider
> Microsoft Certified Professional & Trainer
> MCSD, MCAD, MCSE, MCDBA, MCTS, MCT
> RHCE - Red Hat Certified Engineer 
> ------------------------------------------------------------
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp


References