[Openstack] [OpenStackClient] Adding Image 'member' commands

Dean Troyer dtroyer at gmail.com
Fri Jan 2 20:10:17 UTC 2015


Glance has the concept of 'image members' as the mechanism for sharing
images between projects.  We need to add this to OSC and I'd like to work
out the commands/options to do so  A while back, markwash and I sat down
and sorted a simple set of additions to support the member operations for
both Image v1 and v2 APIs.  I promptly went on and dropped this particular
ball.

I suppose first of all, does there remain a need/desire to add these for
Image API v1?  The v2 set we came up with is much cleaner and I think is
highly preferable and if we can just leave OSC's Image v1 as-is I would
prefer to do that.

Conceptually, I see a shared image as an image with an attribute that is a
list of projects that it is shared with in addition to its home (owner)
project.  To maintain that list, two new options can be added to 'image
create' and 'image set':

--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)

Both --share and --no-share options may be repeated, much as the
--properties option works today.

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

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?)


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.

* 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?

dt

-- 

Dean Troyer
dtroyer at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150102/ef9599d0/attachment.html>


More information about the Openstack mailing list