O'Reilly logo

OpenStack Cloud Computing Cookbook by Kevin Jackson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Deleting containers and objects

The swift client tool allows us to directly delete containers and objects within our OpenStack Storage environment.

Getting ready

Log in to a computer or server that has the swift client package installed.

How to do it...

Carry out the following to delete objects in our OpenStack Storage environment:

Deleting objects

To delete the object tmp/test/test1, we issue the following:

swift -V 2.0 -A http://172.16.0.1:5000/v2.0/ -U cookbook:demo -K openstack delete test tmp/test/test1

This deletes the object tmp/test/test1 from the container test.

Deleting multiple objects

To delete the objects tmp/test/test2 and tmp/example-500Mb, we issue the following command:

swift -V 2.0 -A http://172.16.0.1:5000/v2.0/ -U cookbook:demo ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required