Add some inline YARD docs
code documentation is fun!!
This commit is contained in:
@@ -18,7 +18,17 @@ module Puppetlabs
|
|||||||
end
|
end
|
||||||
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 = [])
|
def test_two_node(oses = [])
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
#Rake::Task['openstack:setup'.to_sym].invoke
|
#Rake::Task['openstack:setup'.to_sym].invoke
|
||||||
@@ -31,6 +41,16 @@ module Puppetlabs
|
|||||||
end
|
end
|
||||||
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(
|
def contributor_hash(
|
||||||
repos_i_care_about = ['nova', 'glance', 'openstack', 'keystone', 'swift', 'horizon', 'cinder']
|
repos_i_care_about = ['nova', 'glance', 'openstack', 'keystone', 'swift', 'horizon', 'cinder']
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -3,6 +3,15 @@ require 'puppetlabs/os_tester'
|
|||||||
module Puppetlabs
|
module Puppetlabs
|
||||||
module OsTester
|
module OsTester
|
||||||
module System
|
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)
|
def cmd_system (cmd, print=true)
|
||||||
puts "Running cmd: #{Array(cmd).join(' ')}" if print
|
puts "Running cmd: #{Array(cmd).join(' ')}" if print
|
||||||
output = `#{cmd}`.split("\n")
|
output = `#{cmd}`.split("\n")
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ module Puppetlabs
|
|||||||
end
|
end
|
||||||
|
|
||||||
# run a vagrant command
|
# 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='')
|
def vagrant_command(cmd, box='')
|
||||||
require 'vagrant'
|
require 'vagrant'
|
||||||
env = ::Vagrant::Environment.new(:ui_class => ::Vagrant::UI::Colored)
|
env = ::Vagrant::Environment.new(:ui_class => ::Vagrant::UI::Colored)
|
||||||
@@ -19,6 +26,15 @@ module Puppetlabs
|
|||||||
end
|
end
|
||||||
|
|
||||||
# run a command on an image as sudo. return the output
|
# 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)
|
def on_box (box, cmd)
|
||||||
require 'vagrant'
|
require 'vagrant'
|
||||||
env = ::Vagrant::Environment.new(:ui_class => ::Vagrant::UI::Colored)
|
env = ::Vagrant::Environment.new(:ui_class => ::Vagrant::UI::Colored)
|
||||||
|
|||||||
Reference in New Issue
Block a user