Skip to content

Commit

Permalink
Merge pull request #518 from anodelman/maint
Browse files Browse the repository at this point in the history
(QENG-1449) proxy package managers before configuration/validation...
  • Loading branch information
colinPL committed Nov 4, 2014
2 parents a743507 + 3d960d6 commit f954885
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions lib/beaker/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def provision
@hosts = []
@network_manager = Beaker::NetworkManager.new(@options, @logger)
@hosts = @network_manager.provision
@network_manager.proxy_package_manager
@network_manager.validate
@network_manager.configure
rescue => e
Expand Down
16 changes: 11 additions & 5 deletions lib/beaker/hypervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,15 @@ def cleanup
nil
end

#Default configuration steps to be run for a given hypervisor
#Proxy package managers on tests hosts created by this hypervisor, runs before validation and configuration.
def proxy_package_manager
if @options[:package_proxy]
package_proxy(@hosts, @options)
end
end

#Default configuration steps to be run for a given hypervisor. Any additional configuration to be done
#to the provided SUT for test execution to be successful.
def configure
if @options[:timesync]
timesync(@hosts, @options)
Expand All @@ -96,15 +104,13 @@ def configure
if @options[:add_el_extras]
add_el_extras(@hosts, @options)
end
if @options[:package_proxy]
package_proxy(@hosts, @options)
end
if @options[:disable_iptables]
disable_iptables @hosts, @options
end
end

#Default validation steps to be run for a given hypervisor
#Default validation steps to be run for a given hypervisor. Ensures that SUTs meet requirements to be
#beaker test nodes.
def validate
if @options[:validate]
validate_host(@hosts, @options)
Expand Down
4 changes: 2 additions & 2 deletions lib/beaker/network_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ def configure

# configure proxy on all provioned machines
#@raise [Exception] Raise an exception if virtual machines fail to be configured
def package_proxy
def proxy_package_manager
if @hypervisors
@hypervisors.each_key do |type|
@hypervisors[type].package_proxy
@hypervisors[type].proxy_package_manager
end
end
end
Expand Down

0 comments on commit f954885

Please sign in to comment.