Implementing test coverage for Glance v2 Image Sharing

Registered by Luke Wollney

This is a blueprint for implementing test coverage for the glance v2 API Image Sharing.

API Doc: http://docs.openstack.org/developer/glance/glanceapi.html#image-membership-changes-in-version-2-0

Blueprints to be referred to:

In scope: smoke, functional, system integration, whitebox tests

Out of scope: performance, stress, scale

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Luke Wollney
Direction:
Needs approval
Assignee:
None
Definition:
Drafting
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Notes about the tasks/tests below:
  - All tests determined to be "INVALID" have been removed
  - All tasks/tests are currently assigned to luke-wollney, but will be changed as tasks are picked up

Gerrit topic: https://review.openstack.org/#q,topic:bp/glance-api-v2-image-sharing-tests,n,z

Addressed by: https://review.openstack.org/50345
    POST v2.0/images/{image_id}/members.

Addressed by: https://review.openstack.org/50358
    DELETE v2.0/images/{image_id}/members/{member_id}

Gerrit topic: https://review.openstack.org/#q,topic:glance-api-v2-image-sharing-tests,n,z

Addressed by: https://review.openstack.org/52108
    - implement image sharing tests - solve pep8 formatting errors for comments

Addressed by: https://review.openstack.org/53117
    PUT v2.0/images/{image_id}/{members}/{member_id}

Addressed by: https://review.openstack.org/53853
    DELETE v2.0/images/{image_id}/members/{member_id} - Refactoring

Addressed by: https://review.openstack.org/53862
    GET v2.0/images/{image_id}/members - Refactoring

Addressed by: https://review.openstack.org/53865
    POST v2.0/images/{image_id}/members - Refactoring

Addressed by: https://review.openstack.org/53873
    PUT v2.0/images/{image_id}/members/{member_id} - Refactoring

Addressed by: https://review.openstack.org/55351
    Images API v2.0 Image Member Life Cycle Test.

Addressed by: https://review.openstack.org/55523
    Images API v2.0 Tenant Permisions on Image Life Cycle Test

Addressed by: https://review.openstack.org/58831
    Refactor Images API v2.0 Tenant Permisions Test

Addressed by: https://review.openstack.org/58842
    Images API v2.0 Force User To See My Images

Addressed by: https://review.openstack.org/58944
    Images API v2.0 Image Discovery Of Available Images To User

Addressed by: https://review.openstack.org/58971
    Images API v2.0 Image Discovery Of Images Owned by User

Addressed by: https://review.openstack.org/58976
    Images API v2.0 Image Sharing, Deletion and Accessibility Cycle

Addressed by: https://review.openstack.org/59004
    Images API v2.0 One To Many Image Sharing

Addressed by: https://review.openstack.org/59010
    Images API v2.0 One-To-One Image Sharing Test

Addressed by: https://review.openstack.org/59030
    Images API v2.0 Remove All Shared Images From User List

Addressed by: https://review.openstack.org/59040
    Image API v2.0 Unshare Previously Shared Image

Addressed by: https://review.openstack.org/59054
    Image API v2 Image Membership Sharing Cycle

Addressed by: https://review.openstack.org/59145
    Images API v2.0 Image Discovery Shared Images Owned By User

Addressed by: https://review.openstack.org/63050
    Add get image member members schema tests

Addressed by: https://review.openstack.org/63052
    Update images fixtures

Addressed by: https://review.openstack.org/63059
    Add remove shared image from user b image list test

Addressed by: https://review.openstack.org/63197
    Add image discovery of images available to user b test

(?)

Work Items

Work items:
[luke-wollney] Essential: Happy Path - Get json schema document for image members: TODO
[luke-wollney] Essential: Happy Path - Get json schema document for image member: TODO
[sett-wai] Essential: Happy Path - Get members of an image: https://review.openstack.org/#/c/52108: DONE
[musa-baloyi707] Normal: Get members for invalid image id: https://review.openstack.org/#/c/52108: DONE
[musa-baloyi707] Normal: Get members of an image using a blank image id: https://review.openstack.org/#/c/52108: DONE
[luke-wollney] Normal: Get members using incorrect url of '/images/{image_id}/membership': POSTPONED
[luke-wollney] Normal: Get membership using method mismatch of 'PUT'': POSTPONED
[musa-baloyi707] Normal: Get members for deleted image id: https://review.openstack.org/#/c/52108: DONE
[musa-baloyi707] Normal: Get members for private image id as a non admin user when the image has been shared with user: https://review.openstack.org/#/c/52108: DONE
[musa-baloyi707] Normal: Get members for private image id as a non admin user when the image has not been shared with user: https://review.openstack.org/#/c/52108: DONE
[y-charles] Essential: Add member(tenant_id) to an image: https://review.openstack.org/50345: DONE
[luke-wollney] Normal: Add invalid member (tenant_id) to an image: TODO
[luke-wollney] Normal: Add blank member (tenant_id) to an image: TODO
[luke-wollney] Normal: Add member (tenant_id) to an image without body: POSTPONED
[luke-wollney] Normal: Add member (tenant_id) to an image to which the member is already added: TODO
[luke-wollney] Normal: Add member (tenant_id) to an invalid image: TODO
[luke-wollney] Normal: Add member (tenant_id) to blank image: TODO
[luke-wollney] Normal: Add member (tenant_id) to deleted image: TODO
[luke-wollney] Normal: Add member (tenant_id) to private image as a non admin user: TODO
[luke-wollney] Normal: Add image member using incorrect url of '/images/{image_id}/membership': POSTPONED
[luke-wollney] Normal: Add image member using method mismatch of 'PUT': POSTPONED
[luke-wollney] Normal: Add additional member (tenant_id) to an image: TODO
[musa-baloyi707] Essential - Change the status of an image member to 'accepted': https://review.openstack.org/53117: DONE
[luke-wollney] Normal: Change the status of an image member to 'rejected': TODO
[luke-wollney] Normal: Change the status of an image member to 'pending': TODO
[luke-wollney] Normal: Change the status of an image member to 'pending' after changing it to 'accepted': TODO
[luke-wollney] Normal: Change the status of an image member to 'pending' after changing it to 'rejected': TODO
[luke-wollney] Normal: Change the status of an image member to 'accepted' after changing it to 'rejected': TODO
[luke-wollney] Normal: Change the status of an image member to 'rejected' after changing it to 'accepted': TODO
[luke-wollney] Normal: Change the status of image member for invalid image id: TODO
[luke-wollney] Normal: Change the status of image member for non-existing image id: TODO
[luke-wollney] Normal: Change the status of image member for the image to which the member is not added: TODO
[luke-wollney] Normal: Change the status of invalid image member: TODO
[luke-wollney] Normal: Change the status of non-existing image member: TODO
[luke-wollney] Normal: Update image member using incorrect url of '/images/{image_id}/memberships/{member_id}: POSTPONED
[luke-wollney] Normal: Update image member using method mismatch of 'POST': POSTPONED
[luke-wollney] Normal: Change the status of image member for deleted image: TODO
[luke-wollney] Normal: Change the status of image member for blank image id: TODO
[luke-wollney] Normal: Change the status of image member with invalid status: TODO
[luke-wollney] Normal: Change the status of image member with empty status: TODO
[luke-wollney] Normal: Update member to accepted status for alternate tenant using image owner: TODO
[y-charles] Essential: Delete a valid member from valid image: https://review.openstack.org/50358: DONE
[luke-wollney] Normal: Delete a member from an invalid image: TODO
[luke-wollney] Normal: Delete a member using a blank image id: TODO
[luke-wollney] Normal: Delete member using an blank member id from valid image: TODO
[luke-wollney] Normal: Delete non-existent member from valid image: TODO
[luke-wollney] Normal: Delete a deleted member from valid image: TODO
[luke-wollney] Normal: Delete a member from a deleted image: TODO
[luke-wollney] Normal: Delete a member from an image using an invalid image id: TODO
[luke-wollney] Normal: Delete image member using blank member id: TODO
[luke-wollney] Normal: Delete a member from an image as a non admin user: TODO
[y-charles] High: Share an image between users A and B: INPROGRESS
[y-charles] High: Unshare a previously shared images between users A and B: INPROGRESS
[luke-wollney] High: Remove a shared image from user B's list: TODO
[y-charles] High: Remove all images shared by user A from user B's image-list: INPROGRESS
[y-charles] High: Image discovery of images available to user B: INPROGRESS
[y-charles] High: Image discovery of shared images owned by a particular user: INPROGRESS
[y-charles] High: Image discovery of images owned by a particular user: INPROGRESS
[luke-wollney] High: General image discovery: TODO
[y-charles] High: Force a user to see my images: INPROGRESS
[luke-wollney] High: Never see an images from a specific user: TODO
[luke-wollney] High: Automatically see new images from a specific user: TODO
[luke-wollney] High: Image sharing inheritance: TODO
[y-charles] High: 1-1 image sharing: INPROGRESS
[y-charles] High: 1-many image sharing: INPROGRESS
[luke-wollney] High: User A shares image with user B, then user A deletes the image, verify B can/cannot see image still: TODO
[luke-wollney] High: User A shares image with user B, then user B shares the same image with user C, verify B and C can see the image: TODO
[y-charles] Essential - Image Member Lifecycle (CRUD operations): https://review.openstack.org/#/c/55351/: DONE
[y-charles] Essential - Image Tenant Permission (CRUD operations): https://review.openstack.org/#/c/55523/: DONE

This blueprint contains Public information 
Everyone can see this information.