Revision c6e02bd3
Added by Joseph Magen over 10 years ago
db/seeds.rb | ||
---|---|---|
raise "Unable to create admin user: #{format_errors user}" unless user.save
|
||
end
|
||
end
|
||
|
||
# Compute Profiles - only create if there are not any
|
||
if ComputeProfile.unconfigured?
|
||
ComputeProfile.without_auditing do
|
||
[
|
||
{ :name => '1-Small' },
|
||
{ :name => '2-Medium' },
|
||
{ :name => '3-Large' },
|
||
].each do |input|
|
||
cp = ComputeProfile.create input
|
||
raise "Unable to create hardware profile: #{format_errors m}" if cp.nil? || cp.errors.any?
|
||
end
|
||
end
|
||
end
|
Also available in: Unified diff
fixes #3178 - add feature for compute profiles for hostgroups and hosts