After Deprec

openstack_cloud_computing_cookbook

Issue link: https://read.uberflip.com/i/1334488

Contents of this Issue

Navigation

Page 126 of 317

Using OpenStack Storage 116 Listing containers and objects The swift client tool allows you to easily list containers and objects within your OpenStack Storage account. 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 list objects within the OpenStack Storage environment: Listing all objects in a container In the preceding recipes, we uploaded a small number of files. To simply list the objects within our test container, we issue the following command: swift -V 2.0 -A http://172.16.0.1:5000/v2.0/ -U cookbook:demo -K openstack list test This will show output similar to the following: Listing specific object paths within a container To list just the files within the tmp/test path, we specify this with the -p parameter, as follows: swift -V 2.0 -A http://172.16.0.1:5000/v2.0/ -U cookbook:demo -K openstack list -p tmp/test test This will list our two files, as follows: tmp/test/test1 tmp/test/test2 We can put partial matches in the -p parameter too. For example, to list all files starting with tmp/ex we issue the following command: swift -V 2.0 -A http://172.16.0.1:5000/v2.0/ -U cookbook:demo -K openstack list -p tmp/ex test This will list files that match that string: tmp/example-500Mb www.it-ebooks.info

Articles in this issue

Links on this page

Archives of this issue

view archives of After Deprec - openstack_cloud_computing_cookbook