diff --git a/lib/puppetlabs/os_tester/openstack.rb b/lib/puppetlabs/os_tester/openstack.rb index 5d415ea..071592d 100644 --- a/lib/puppetlabs/os_tester/openstack.rb +++ b/lib/puppetlabs/os_tester/openstack.rb @@ -18,7 +18,17 @@ module Puppetlabs end end - # test a controller compute setup + # Test a controller compute setup. + # deletes all VMs in the current Vagrant project before + # building a 2 node openstack environment and firing off + # an integration test. + # + # == Parameters: + # oses:: + # A list of operatingsystems that should be tested on. + # + # == Returns: + # TODO document def test_two_node(oses = []) require 'yaml' #Rake::Task['openstack:setup'.to_sym].invoke @@ -31,6 +41,16 @@ module Puppetlabs end end + # print a hash of all of the contributors + # == Parameters: + # repos_i_care_about:: + # An Array that specifies a list of repos to check the contributors for. + # + # == Returns: + # A hash that maps a user to a hash that contains its :email + # and a list of the specified repos that they have + # contribited to + # def contributor_hash( repos_i_care_about = ['nova', 'glance', 'openstack', 'keystone', 'swift', 'horizon', 'cinder'] ) diff --git a/lib/puppetlabs/os_tester/system.rb b/lib/puppetlabs/os_tester/system.rb index 709513e..53d9d69 100644 --- a/lib/puppetlabs/os_tester/system.rb +++ b/lib/puppetlabs/os_tester/system.rb @@ -3,6 +3,15 @@ require 'puppetlabs/os_tester' module Puppetlabs module OsTester module System + + # Run a system command + # Parameters: + # cmd:: + # the command that needs to be executed. + # print:: + # if the returned output should be printed to stdout. + # Return: + # An array of the lines of stdout. def cmd_system (cmd, print=true) puts "Running cmd: #{Array(cmd).join(' ')}" if print output = `#{cmd}`.split("\n") diff --git a/lib/puppetlabs/os_tester/vagrant.rb b/lib/puppetlabs/os_tester/vagrant.rb index 46a6275..96d0be8 100644 --- a/lib/puppetlabs/os_tester/vagrant.rb +++ b/lib/puppetlabs/os_tester/vagrant.rb @@ -11,6 +11,13 @@ module Puppetlabs end # run a vagrant command + # Parameters: + # cmd:: + # vagrant command that should be run. + # box:: + # box that the command should be applied to. + # Return: + # TODO - figire out the return def vagrant_command(cmd, box='') require 'vagrant' env = ::Vagrant::Environment.new(:ui_class => ::Vagrant::UI::Colored) @@ -19,6 +26,15 @@ module Puppetlabs end # run a command on an image as sudo. return the output + # Parameters: + # box:: + # box that the command should be applied to. + # cmd:: + # command that should be run as sudo on the box. + # Returns: + # stdout from the executed ssh command. + # + # TODO make these two method argument lists consistent def on_box (box, cmd) require 'vagrant' env = ::Vagrant::Environment.new(:ui_class => ::Vagrant::UI::Colored)