On Wed, Jun 22, 2011 at 02:57:16PM -0400, Scott Seago wrote:
On 06/22/2011 01:09 PM, Francesco Vollero wrote:
> Signed-off-by: Francesco Vollero<fvollero(a)redhat.com>
> ---
> .../20110617105805_add_vmware_vsphere_provider.rb | 11 +++++++++++
> src/db/seeds.rb | 1 +
[snip]
> + end
> +end
Hmm, it looks like this migration will always attempt to create these
objects, even when running an initial migration -- it should probably
only create the provider type and credential definitions if we already
have other provider types in the system -- i.e. if the db is blank, it
remains blank so that if you run the migrations on an empty database
we're not creating data that will be loaded when seeds.rb is run.
Scott
Hey Scott,
thanks for checking it out, i modified it following the model of CondorCloud. I gonna fix
it now :)
Francesco
> diff --git a/src/db/seeds.rb b/src/db/seeds.rb
> index eee6904..dee0a35 100644
> --- a/src/db/seeds.rb
> +++ b/src/db/seeds.rb
> @@ -121,6 +121,7 @@ if ProviderType.all.empty?
> ProviderType.create!(:name => "RHEV-M", :codename
=>"rhev-m")
> ProviderType.create!(:name => "OpenNebula", :codename
=>"opennebula")
> ProviderType.create!(:name => "CondorCloud", :codename
=>"condorcloud", :build_supported => 'true')
> + ProviderType.create!(:name => "VMWare vSphere", :codename
=>"vsphere", :build_supported => 'true')
> end
>
> # fill table CredentialDefinitions by default values
_______________________________________________
aeolus-devel mailing list
aeolus-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/aeolus-devel