diff options
Diffstat (limited to 'genome-bootstrap/lib/genome-bootstrap')
-rw-r--r-- | genome-bootstrap/lib/genome-bootstrap/core.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/genome-bootstrap/lib/genome-bootstrap/core.rb b/genome-bootstrap/lib/genome-bootstrap/core.rb index d228f5a..28b7e61 100644 --- a/genome-bootstrap/lib/genome-bootstrap/core.rb +++ b/genome-bootstrap/lib/genome-bootstrap/core.rb @@ -41,10 +41,10 @@ module GenomeBootstrap @machines ||= fetch_data end - def facts_for(type, machine_name) + def facts_for(type) # Don't want to pull in the genome lib. See below fore more detail. facts = restr_get("#{@genomed}/machine_types/#{type}.xml", "fact") - return facts.map do |f| + return (!facts or facts.empty?) ? {} : facts.map do |f| def f.name self["name"] end @@ -55,16 +55,21 @@ module GenomeBootstrap # Here's where we make use of the DSL's simple templating f.instance_variable_set(:@repo, @repo) - f.instance_variable_set(:@machine_name, machine_name) def f.default # handle there case where there is no default - self["default"].gsub("%repo%", @repo).gsub("%machine_name%", @machine_name) rescue "" + self["default"].gsub("%repo%", @repo) rescue "" end f end end + def bootstrapping_cobbler_profiles + @cobbler_profiles.delete_if{|profile| + profile.include?("__Appliance") + } + end + def classes_for(type) restr_get("#{@genomed}/machine_types/#{type}.xml", "class") end |