# glance.api.v2.image_members module

class glance.api.v2.image_members.ImageMembersController(db_api=None, policy_enforcer=None, notifier=None, store_api=None)

  Bases: `object`

  create(req, image_id, member_id)

    Adds a membership to the image. :param req: the Request object coming from the wsgi layer :param image_id: the image identifier :param member_id: the member identifier :returns: The response body is a mapping of the following form

        {'member_id': <MEMBER>,
         'image_id': <IMAGE>,
         'status': <MEMBER_STATUS>
         'created_at': ..,
         'updated_at': ..}

  delete(req, image_id, member_id)

    Removes a membership from the image.

  index(req, image_id)

    Return a list of dictionaries indicating the members of the image, i.e., those tenants the image is shared with.

    Parameters:

      - req – the Request object coming from the wsgi layer

      - image_id – The image identifier

    Returns:

      The response body is a mapping of the following form

        {'members': [
            {'member_id': <MEMBER>,
             'image_id': <IMAGE>,
             'status': <MEMBER_STATUS>,
             'created_at': ..,
             'updated_at': ..}, ..
        ]}

  show(req, image_id, member_id)

    Returns the membership of the tenant wrt to the image_id specified.

    Parameters:

      - req – the Request object coming from the wsgi layer

      - image_id – The image identifier

    Returns:

      The response body is a mapping of the following form

        {'member_id': <MEMBER>,
         'image_id': <IMAGE>,
         'status': <MEMBER_STATUS>
         'created_at': ..,
         'updated_at': ..}

  update(req, image_id, member_id, status)

    Update the status of a member for a given image. :param req: the Request object coming from the wsgi layer :param image_id: the image identifier :param member_id: the member identifier :param status: the status of a member :returns: The response body is a mapping of the following form

        {'member_id': <MEMBER>,
         'image_id': <IMAGE>,
         'status': <MEMBER_STATUS>,
         'created_at': ..,
         'updated_at': ..}

class glance.api.v2.image_members.RequestDeserializer

  Bases: `JSONRequestDeserializer`

  create(request)
  update(request)

class glance.api.v2.image_members.ResponseSerializer(schema=None)

  Bases: `JSONResponseSerializer`

  create(response, image_member)
  index(response, image_members)
  show(response, image_member)
  update(response, image_member)

glance.api.v2.image_members.create_resource()

  Image Members resource factory method

glance.api.v2.image_members.get_collection_schema()

glance.api.v2.image_members.get_schema()

this page last updated: 2026-04-16 16:57:26

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug