Class: BoxGrinder::CentOSPlugin

Inherits:
RHELPlugin show all
Defined in:
lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb

Instance Attribute Summary

Attributes inherited from BasePlugin

#deliverables, #plugin_info

Instance Method Summary collapse

Methods inherited from RHELPlugin

#add_packages, #build_rhel, #normalize_packages

Methods inherited from RPMBasedOSPlugin

#add_repos, #apply_root_password, #build_with_appliance_creator, #change_configuration, #cleanup_after_appliance_creator, #disable_firewall, #execute_appliance_creator, #execute_post, #install_files, #install_repos, #recreate_kernel_image, #recreate_rpm_database, #set_label_for_swap_partitions, #set_motd, #substitute_vars, #use_labels_for_partitions

Methods inherited from BasePlugin

#current_platform, #deliverables_exists?, #init, #initialize, #is_supported_os?, #is_supported_platform?, #merge_plugin_config, #read_plugin_config, #register_deliverable, #register_supported_os, #register_supported_platform, #run, #set_default_config_value, #subtype, #supported_oses, #validate_plugin_config

Methods included from Plugins

#plugin

Constructor Details

This class inherits a constructor from BoxGrinder::BasePlugin

Instance Method Details

#after_initObject



25
26
27
28
# File 'lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb', line 25

def after_init
  super
  register_supported_os('centos', ['5', '6'])
end

#execute(appliance_definition_file) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb', line 30

def execute(appliance_definition_file)
  repos = {}

  @plugin_info[:versions].each do |version|
    repos[version] = {
      "base" => {
          "mirrorlist" => "http://mirrorlist.centos.org/?release=#OS_VERSION#&arch=#BASE_ARCH#&repo=os"
      },
      "updates" => {
          "mirrorlist" => "http://mirrorlist.centos.org/?release=#OS_VERSION#&arch=#BASE_ARCH#&repo=updates"
      }
    }
  end

  build_rhel(appliance_definition_file, repos)
end