The Swift Client Tool allows us to directly delete containers and objects within our OpenStack Object Storage environment.
Log in to a computer or server that has the swift client package installed..
We will delete objects in our OpenStack Object Storage environment using the different swift client options:
To delete the object tmp/test/test1, we issue the following:
This deletes the object tmp/test/test1 from the container test.
To delete the objects tmp/test/test2 and tmp/example-500Mb, we issue the following command:
This deletes the objects tmp/test/test2 and tmp/example-500Mb from the container test.
To delete our test container, we issue the following command:
This will delete the container and any objects under this container.
To delete all containers and objects in our account, we issue the following command:
This will delete all containers and any objects under these containers.
The swift client is a basic but versatile tool that allows us to do many of the things we want to do with files. Deleting objects and containers is achieved using the following syntax:
To download all objects from our account (for example, from all containers), we specify the following syntax:
Openstack Interview Questions
Free Demo for Corporate & Online Trainings.