Add some inline YARD docs

code documentation is fun!!
This commit is contained in:
Dan Bode
2013-01-15 11:56:34 -08:00
parent 05ec6d1708
commit 843cab605a
3 changed files with 46 additions and 1 deletions

View File

@@ -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']
)

View File

@@ -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")

View File

@@ -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)