BZ 761279/766137 - Handling of imported images

Matt Wagner matt.wagner at redhat.com
Tue Dec 13 19:08:31 UTC 2011


Hi all,

I had previously sent out a similar patchset[1], but it hasn't been
reviewed and this one builds on it, so I'm resending the whole thing.

This patch won't be terribly effective unless you test it with a build
of Image Factory that uses sloranz's bug/no-template-on-import branch,
which is currently an open pull request[2].

This implements a few changes:

1.) When images are imported, Factory will no longer create a
(pointless, empty) Template object in iwhd for them. This allows us to
create an imported? method on Warehouse objects to detect if images are
imported or not.

2.) We do not offer to upload/push or build imported images, since this
is nonsensical.

3.) Imported images are now tied to a specific Provider Account, not
just a Provider/Target. Existing images had to have this association,
but we weren't setting it for imported images. Now we are.

4.) As a consequence of #3, the UI is changed slightly -- importing an
image prompts for a provider account, not a provider. More
significantly, the aeolus-cli syntax is changed here. Rather than
specifying a --target and a --provider, you just specify a
--provider_account. Conductor can get the rest of the information from
this. For example, you would now run "aeolus-cli import
--provider_account ec2-mawagner --id ami-abc123"

5.) As an incidental benefit, aeolus-cli image import and the Conductor
web UI now call the exact same method to import images. Previously they
were doing similar, but not identical, calls to Factory.

This will resolve BZ #766137 [3] and #761279 [4].

Thanks,
Matt

[1]
https://fedorahosted.org/pipermail/aeolus-devel/2011-December/007280.html
[2] https://github.com/aeolusproject/imagefactory/pull/51
[3] https://bugzilla.redhat.com/show_bug.cgi?id=766137
[4] https://bugzilla.redhat.com/show_bug.cgi?id=761279



More information about the aeolus-devel mailing list