April 2018
Intermediate to advanced
280 pages
8h 37m
English
We can download the image stored in the Glance database to your local system where the application program is running. This can be done by creating an image object by locating the image in the Glance database and then using the connection object to refer to the image class and invoking the download_image() function by passing it the image object.
The following function demonstrates this. It accepts the connection object as an input parameter and then invokes the conn.image.find_image() function to create an image object. This object represents the image to be downloaded. Next, it opens a local file for writing and then invokes the download_image() function by passing the image object to it. This function returns a ...