On 05/23/2011 01:45 PM, Scott Seago wrote:
On 05/23/2011 01:34 PM, Greg Blomquist wrote:
>
>>> or to define rails-y associations (this isn't an implementation
>>> suggestion, as for the moment _none_ of these objects are proposed to
>>> belong in the conductor DB, but I just wanted to show the relationships
>>> in another way to make sure it's clear):
>>>
>>> class Template
>>> belongs_to :image
>>> end
>>> class Image
>>> has_one :template
>>> has_many :image_versions
>>> end
>>> class ImageVersion
>>> belongs_to :image
>>> has_many :target_images
>>> end
>>> class TargetImage
>>> belongs_to :image_version
>>> has_many :provider_images
>>> end
>>> class ProviderImage
>>> belongs_to :target_image
>>> end
>> Yep, that's it.
>>
>> Also, I think a Template can be built multiple times, perhaps by
>> different users, to give different Images. In the new model, a template
>> is just referenced by a URL and supplied to image factory, and there's
>> no reason why the same URL couldn't be used to build different Images,
>> perhaps with a different set of package updates
>>
>> Given that and my other suggestion above (i.e. collapse TargetImage into
>> ProviderImage) gives:
>>
>> class Template
>> has_many :image
>> end
>> class Image
>> belongs_to :template
>> has_many :image_versions
>> end
>> class ImageVersion
>> belongs_to :image
>> has_many :provider_images
>> end
>> class ProviderImage
>> belongs_to :image
>> belongs_to :provider_type
>> belongs_to :provider
>> end
> There's quite a bit of detail here about Templates, Images, and
> Providers here...and I believe I grok it.
>
> I wanna be sure that the Template-less imported images from a provider
> can still be used to spin up instances in another provider without much
> worry from the user's point of view. I believe that's still available
> with the idea of including images (as opposed to templates) in
> assemblies, but just wanna make sure I didn't miss something.
>
No, I don't believe you'd be able to do this. If, for example,we import
an ec2 AMI from us-east,this only allows the user to launch instances in
us-east (since we're only importing metadata -- we don't actually have a
pointer to the image). The basic point of importing image references
into iwhd is to allow conductor to launch instances based on images that
we didn't build with factory. If you want to use imported images to be
able to launch a particular deployment in one of several providers, you
have to provide an image reference for each one.
Ah, OK. Well, that's fair and makes sense.
Scott
_______________________________________________
aeolus-devel mailing list
aeolus-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/aeolus-devel