Add an option to replicator to select which images to compare/copy

Bug #1411215 reported by Arthur Lutz (Logilab)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Won't Fix
Wishlist
Unassigned

Bug Description

It would be nice to add some sort of filter to images considered by glance-replicator.

Two types of a filters would be nice :

* a list of ids
* a list of names

(and maybe some sort of regexp on the names, for example --filter "ubuntu-*")

A quick look at the code makes me think this can easily be added in the def get_images just before the yield.

For interfacing I would add :

 --filter-by-name 'item1,item2,item3"
 --filter-by-name 'ubuntu-*'
 --filter-by-id 'id1,id2,id3'

Am willing to contribute a patch if feature request is adopted (we are going to implement it anyway).

Ian Cordasco (icordasc)
Changed in glance:
importance: Undecided → Wishlist
status: New → Incomplete
Revision history for this message
Ian Cordasco (icordasc) wrote :

I marked this as "Wishlist" because it's an enhancement request and Incomplete because we haven't yet decided whether to accept it.

Personally, it seems feasible to support --filter-by-id and --filter-by-name's first case. Personally I'm not a fan of your `--filter-by-name 'ubuntu-*'` example because I can't think of another openstack cli that supports anything like that. I also don't like the idea of supporting arbitrary regular expressions provided by users. I'm going to add this to the meeting agenda for next Thursday's meeting though to discuss it.

Thanks for suggesting it!

Revision history for this message
Arthur Lutz (Logilab) (arthur-lutz-logilab) wrote :

No problem about not going for the regexp, I understand why you are reluctant.

One could easily script using bash to answer that scenario (for i in `glance image-list | grep ubuntu-`; etc.)

Revision history for this message
Marc Abramowitz (msabramo) wrote :

I was thinking of implementing something to allow only syncing images that match a regex. For my use case, I want to make sure that images that start with "Koala" are synced. So something like --filter-by-regex=Koala.* would be handy.

Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

The Glance replicator has been deprecated for a while, we won't be looking into this issue.

Changed in glance:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.