官术网_书友最值得收藏!

Viewing shared images

We can view what images have been shared for a particular tenant when someone has used the member-create option. This allows us to manage and control which users have what type of access to images in our OpenStack environment.

Getting ready

To begin with, ensure that you are logged in to our Ubuntu client where we can run the glance tool. This can be installed using the following command:

sudo apt-get update
sudo apt-get install python-glanceclient

Ensure that you have your environment variable set up correctly with our admin user and password, as created in the previous chapter:

export OS_TENANT_NAME=cookbook
export OS_USERNAME=admin
export OS_PASSWORD=openstack
export OS_AUTH_URL=https://192.168.100.200:5000/v2.0/
export OS_NO_CACHE=1
export OS_KEY=/vagrant/cakey.pem
export OS_CACERT=/vagrant/ca.pem

How to do it...

Carry out the following steps to view the images that have been shared for a particular tenant:

  1. We first get the tenant ID of the tenant we want to view. We do this as follows:
    keystone tenant-list 
    
  2. We can now list the images that have been shared with that tenant ID as follows:
    glance member-list --tenant-id \
     45c787efeaec42aa9cab522711bf5f4d
    

    This produces the following output:

    How to do it...

How it works...

The member-list option in the glance command allows us to view which images have been shared with other tenants. The syntax is as follows:

glance member-list --image-id IMAGE_ID
glance member-list –-tenant-id TENANT_ID
主站蜘蛛池模板: 阳江市| 安多县| 兴国县| 沐川县| 手游| 余江县| 乐昌市| 赞皇县| 兖州市| 图木舒克市| 耒阳市| 景洪市| 桃源县| 互助| 富平县| 伊宁市| 新巴尔虎右旗| 阿瓦提县| 西华县| 枣阳市| 广水市| 灵川县| 沾化县| 驻马店市| 紫云| 赤水市| 天全县| 聂荣县| 高雄市| 甘泉县| 涟源市| 湖州市| 贞丰县| 定兴县| 深州市| 绥中县| 漳平市| 方正县| 临猗县| 怀化市| 石家庄市|