[Openstack] [OpenStackClient] Adding Image 'member' commands
Dean Troyer
dtroyer at gmail.com
Tue Jan 6 22:14:58 UTC 2015
On Tue, Jan 6, 2015 at 8:55 AM, Jay Pipes <jaypipes at gmail.com> wrote:
> On 01/02/2015 03:10 PM, Dean Troyer wrote:
>
>> I suppose first of all, does there remain a need/desire to add these for
>> Image API v1?
>>
>
> Yes. There's many shops that still use the v1 Glance API. And, Nova
> itself, has little current support for v2 Glance API.
Fortunately Nova doesn't use a CLI to do that... ;) I'll take another look
at the differences...I really don't want for the user to need to know which
API version is being used if at all possible.
--share <project> - add <project> to the shared-with list for this image
>> --no-share <project> - remove <project> from the shared-with list
>> ('image set' only)
>>
>
> Is image set equal to image update in v1 parlance?
The 'set' verb is totally an artifact of OSC for changing attributes of an
existing resource.
>
> Both --share and --no-share options may be repeated, much as the
>> --properties option works today.
>>
>
> I would prefer --share and --unshare or --add-member and --remove-member.
> Typically, --no- prefix on a CLI option means to disable a boolean option.
I'll buy that. Or Kevin's suggestion of --grant/-revoke which I still need
to noodle over a bit.
> In addition, the 'receiving' project must ACK the sharing, which would
>> be an added option to 'image set':
>>
>> --share ack - the magic value 'ACK' (case insensitive) signifies the
>> acceptance of a shared image by the 'receiving' project
>>
>
> IMHO. Would have been a bit nicer to have something like this:
>
> glance image member [confirm|decline] <IMAGE_ID> [<PROJECT_ID>]
OK, I'll re-think this...magic values stink...
>
> A couple of new options are added to 'image list' to select shared images:
>>
>> --shared - filter on shared images only
>> --project <project> - filter on <project> (this may imply --shared?)
>>
>
> Or:
>
> --shared-with=<project>
I like that...
>
> Some of the questions I have:
>>
>> * Is --no-share the correct antonym of --share? --unshare maybe? We
>> have a pattern of using regular English words were possible
>> (enable|disable) rather than the GNU style of prepending 'no-' to
>> options, but that is my current backup.
>>
>
> Prefer --unshare to --no-share, but prefer --add-member/--remove-member to
> either :)
Honestly I'm trying very hard to avoid using the word 'member', it's
meaningless to me in this usage.
> * Do we need an 'un-ACK' option for a 'receiving' project to remove the
>> shared image from their list without requiring the owner project to do
>> so? Is this even possible in the Image v2 API?
>>
>
> See suggestion above:
>
> glance image member decline <IMAGE_ID> [<PROJECT_ID>]
>
So decline is both a NAK and an un-ACK (after the image has already been
ACK-ed). Make sense? I can live with that if so, just wondering if that
will be obvious to other users.
dt
--
Dean Troyer
dtroyer at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150106/21fc32a3/attachment.html>
More information about the Openstack
mailing list