Skip to Content
Hybrid Cloud for Developers
book

Hybrid Cloud for Developers

by Manoj Hirway
April 2018
Intermediate to advanced content levelIntermediate to advanced
280 pages
8h 37m
English
Packt Publishing
Content preview from Hybrid Cloud for Developers

Deleting the image

A Glance image can be deleted simply by creating an image object of the image that we want to delete. We can then use the connection object and refer to the image class and invoke the delete_image() function by passing the image object to it.

The ignore_missing determines whether the function will ignore the request if the file is not found or raises an exception:

def delete_image(conn):
    image = conn.image.find_image("cirros-0.3.5-x86_64-disk")
    conn.image.delete_image(image, ignore_missing=False)
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hybrid Cloud for Architects

Hybrid Cloud for Architects

Alok Shrivastwa
OpenStack: Building a Cloud Environment

OpenStack: Building a Cloud Environment

Alok Shrivastwa, Sunil Sarat, Kevin Jackson, Cody Bunch, Egle Sigler, Tony Campbell

Publisher Resources

ISBN: 9781788830874Supplemental Content