We want to see a list of the other system tenants that may access a given virtual machine image that the Glance server knows about.

Continuing from the example above, in order to get the memberships for the image with ID 1, we can use the following code

from glance.client import Client

c = Client("glance.example.com", 9292)

members = c.get_image_members(1)

[Note]Note

The return from Client.get_image_members() is a list of dictionaries. Each dictionary has a `member_id` key, mapping to the tenant the image is shared with, and a `can_share` key, mapping to a boolean value that identifies whether the member can further share the image.



loading table of contents...