Bug 1005279

Summary: glance: add True/False to --can-share on glance member-cerate command
Product: Red Hat OpenStack Reporter: Dafna Ron <dron>
Component: python-glanceclientAssignee: Jakub Ruzicka <jruzicka>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: unspecifiedCC: dallan, eglynn, fpercoco, jruzicka, scohen, yeylon
Target Milestone: Upstream M3   
Target Release: 5.0 (RHEL 7)   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-06 13:25:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dafna Ron 2013-09-06 14:56:16 UTC
Description of problem:

currently, to add or remove --can-share for glance member-create command we run it with --can-share for True and without the --can-share for false.

since when we list the members of an image we would see True/False in the can share info, I think that this command should be inline with all other commands that have a True/False param and that this command should be run as 'glance member-create <image> <tenant> --can-share True/False.

Version-Release number of selected component (if applicable):

openstack-glance-2013.1.3-1.el6ost.noarch

How reproducible:

100%

Steps to Reproduce:
1. create an image and a tenant 
2. run: glance member-create <image> <tenant> --can-share 
3. run: glance member-list --image-id <image> 
4. run: glance member-create <image> <tenant> 
5. run: glance member-list --image-id <image> 

Actual results:

when we run the command with --can-share and list it we can see that the list under command is True and when we run it without --can-share we can see that the value is gone. 

Expected results:

this command should be in-line with other commands and have True/False params 
i.e glance member-create <image> <tenant> --can-share True/False

Additional info:

[root@opens-xxxx ~(keystone_admin)]# glance member-create 0ab0624d-e806-4d4d-b041-7e7ae76bbc80 e91123ca35724285a783f33103875dcb --can-share


root@opens-xxxx ~(keystone_admin)]# glance member-list --image-id 0ab0624d-e806-4d4d-b041-7e7ae76bbc80
+--------------------------------------+----------------------------------+-----------+
| Image ID                             | Member ID                        | Can Share |
+--------------------------------------+----------------------------------+-----------+
| 0ab0624d-e806-4d4d-b041-7e7ae76bbc80 | e91123ca35724285a783f33103875dcb | True      |
+--------------------------------------+----------------------------------+-----------+


[root@opens-xxxx ~(keystone_admin)]# glance member-create 0ab0624d-e806-4d4d-b041-7e7ae76bbc80 e91123ca35724285a783f33103875dcb


[root@opens-xxxx ~(keystone_admin)]# glance member-list --image-id 0ab0624d-e806-4d4d-b041-7e7ae76bbc80
+--------------------------------------+----------------------------------+-----------+
| Image ID                             | Member ID                        | Can Share |
+--------------------------------------+----------------------------------+-----------+
| 0ab0624d-e806-4d4d-b041-7e7ae76bbc80 | e91123ca35724285a783f33103875dcb |           |
+--------------------------------------+----------------------------------+-----------+

Comment 1 Dafna Ron 2013-09-06 14:56:50 UTC
https://bugs.launchpad.net/glance/+bug/1221769

Comment 2 Jakub Ruzicka 2014-03-06 13:25:46 UTC
This has been reported upstream and it's being worked on.

I see no benefit of tracking this downstream.