Skip to content

Commit

Permalink
Merge branch 'release/3.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
razorsedge committed Jun 5, 2015
2 parents e8d0c9d + 62e9968 commit 41b2dc4
Show file tree
Hide file tree
Showing 26 changed files with 159 additions and 143 deletions.
9 changes: 9 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,14 @@
<arguments>1.0-projectRelativePath-matches-false-false-spec/fixtures/modules</arguments>
</matcher>
</filter>
<filter>
<id>1428386119416</id>
<name></name>
<type>10</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-projectRelativePath-matches-false-false-.vendor</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ matrix:
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
allow_failures:
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 4.0"
notifications:
email:
- [email protected]
22 changes: 13 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"

group :development, :unit_tests do
gem 'rake', :require => false
gem 'rspec', '~> 2.0', :require => false
gem 'rspec-puppet', '~> 2.0', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', '>= 1.1.0', :require => false
gem 'simplecov', :require => false
gem 'puppet_facts', :require => false
gem 'json', :require => false
gem 'metadata-json-lint', '>= 0.0.4', :require => false
gem 'rake', :require => false
gem 'rspec', '~> 2.0', :require => false
gem 'rspec-puppet', '>= 2.1.0', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', '>= 1.1.0', :require => false
gem 'simplecov', :require => false
gem 'puppet_facts', :require => false
gem 'json', :require => false
gem 'metadata-json-lint', '>= 0.0.4', :require => false
gem 'puppet-lint-unquoted_string-check', :require => false
gem 'puppet-lint-empty_string-check', :require => false
gem 'puppet-lint-leading_zero-check', :require => false
gem 'puppet-lint-variable_contains_upcase', :require => false
end

if facterversion = ENV['FACTER_GEM_VERSION']
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ Notes
* bootp support is unknown for bonded interfaces. Thus no bootp bond support in this module.
* It is assumed that if you create a bond that you also create the slave interface(s).
* It is assumed that if you create an alias that you also create the parent interface.
* There is currently no IPv6 support in this module.
* network::route requires the referenced device to also be defined via network::if or network::bond.
* For VLANs to work, `Class['network::global']` must have parameter `vlan` set to `yes`.
* To enable IPv6 you have to set both `ipv6networking` in `Class['network::global']` to `true` and `ipv6init` in `network::if::static` to `true`.
Expand Down
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'metadata-json-lint/rake_task'

begin
require 'puppet_blacksmith/rake_tasks'
rescue LoadError
end

Rake::Task[:lint].clear
PuppetLint::RakeTask.new :lint do |config|
config.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "vendor/**/*.pp"]
Expand Down
6 changes: 3 additions & 3 deletions manifests/alias.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
$ensure,
$ipaddress,
$netmask,
$gateway = '',
$ipv6address = '',
$ipv6gateway = '',
$gateway = undef,
$ipv6address = undef,
$ipv6gateway = undef,
$userctl = false
) {
# Validate our data
Expand Down
2 changes: 1 addition & 1 deletion manifests/alias/range.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
$states = [ '^up$', '^down$', '^absent$' ]
validate_re($ensure, $states, '$ensure must be either "up", "down", or "absent".')

include 'network'
include '::network'

$interface = $name
$onparent = $ensure ? {
Expand Down
4 changes: 2 additions & 2 deletions manifests/bond/bridge.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
define network::bond::bridge (
$ensure,
$bridge,
$mtu = '',
$ethtool_opts = '',
$mtu = undef,
$ethtool_opts = undef,
$bonding_opts = 'miimon=100'
) {
# Validate our regular expressions
Expand Down
4 changes: 2 additions & 2 deletions manifests/bond/dynamic.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#
define network::bond::dynamic (
$ensure,
$mtu = '',
$ethtool_opts = '',
$mtu = undef,
$ethtool_opts = undef,
$bonding_opts = 'miimon=100'
) {
# Validate our regular expressions
Expand Down
4 changes: 2 additions & 2 deletions manifests/bond/slave.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
define network::bond::slave (
$macaddress,
$master,
$ethtool_opts = ''
$ethtool_opts = undef
) {
# Validate our data
if ! is_mac_address($macaddress) {
fail("${macaddress} is not a MAC address.")
}

include 'network'
include '::network'

$interface = $name

Expand Down
18 changes: 9 additions & 9 deletions manifests/bond/static.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,25 @@
$ensure,
$ipaddress,
$netmask,
$gateway = '',
$mtu = '',
$ethtool_opts = '',
$gateway = undef,
$mtu = undef,
$ethtool_opts = undef,
$bonding_opts = 'miimon=100',
$peerdns = false,
$ipv6init = false,
$ipv6address = '',
$ipv6gateway = '',
$ipv6address = undef,
$ipv6gateway = undef,
$ipv6peerdns = false,
$dns1 = '',
$dns2 = '',
$domain = ''
$dns1 = undef,
$dns2 = undef,
$domain = undef
) {
# Validate our regular expressions
$states = [ '^up$', '^down$' ]
validate_re($ensure, $states, '$ensure must be either "up" or "down".')
# Validate our data
if ! is_ip_address($ipaddress) { fail("${ipaddress} is not an IP address.") }
if $ipv6address != '' {
if $ipv6address {
if ! is_ip_address($ipv6address) { fail("${ipv6address} is not an IPv6 address.") }
}
# Validate booleans
Expand Down
16 changes: 8 additions & 8 deletions manifests/bridge.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
$userctl = false,
$stp = false,
$delay = '30',
$bridging_opts = '',
$ipv6init = false,
$bridging_opts = undef,
$ipv6init = false
) {
# Validate our regular expressions
$states = [ '^up$', '^down$' ]
Expand All @@ -47,15 +47,15 @@
validate_bool($stp)
validate_bool($ipv6init)

include 'network'
include '::network'

$interface = $name
$bootproto = 'none'
$ipaddress = ''
$netmask = ''
$gateway = ''
$ipv6address = ''
$ipv6gateway = ''
$ipaddress = undef
$netmask = undef
$gateway = undef
$ipv6address = undef
$ipv6gateway = undef

$onboot = $ensure ? {
'up' => 'yes',
Expand Down
14 changes: 7 additions & 7 deletions manifests/bridge/dynamic.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
$userctl = false,
$stp = false,
$delay = '30',
$bridging_opts = ''
$bridging_opts = undef
) {
# Validate our regular expressions
$states = [ '^up$', '^down$' ]
Expand All @@ -49,14 +49,14 @@
validate_bool($userctl)
validate_bool($stp)

include 'network'
include '::network'

$interface = $name
$ipaddress = ''
$netmask = ''
$gateway = ''
$ipv6address = ''
$ipv6gateway = ''
$ipaddress = undef
$netmask = undef
$gateway = undef
$ipv6address = undef
$ipv6gateway = undef

$onboot = $ensure ? {
'up' => 'yes',
Expand Down
24 changes: 12 additions & 12 deletions manifests/bridge/static.pp
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,27 @@
$ensure,
$ipaddress,
$netmask,
$gateway = '',
$ipv6address = '',
$ipv6gateway = '',
$gateway = undef,
$ipv6address = undef,
$ipv6gateway = undef,
$bootproto = 'static',
$userctl = false,
$peerdns = false,
$ipv6init = false,
$ipv6peerdns = false,
$dns1 = '',
$dns2 = '',
$domain = '',
$dns1 = undef,
$dns2 = undef,
$domain = undef,
$stp = false,
$delay = '30',
$bridging_opts = ''
$bridging_opts = undef
) {
# Validate our regular expressions
$states = [ '^up$', '^down$' ]
validate_re($ensure, $states, '$ensure must be either "up" or "down".')
# Validate our data
if ! is_ip_address($ipaddress) { fail("${ipaddress} is not an IP address.") }
if $ipv6address != '' {
if $ipv6address {
if ! is_ip_address($ipv6address) { fail("${ipv6address} is not an IPv6 address.") }
}
# Validate booleans
Expand All @@ -80,15 +80,15 @@
validate_bool($ipv6init)
validate_bool($ipv6peerdns)

include 'network'
include '::network'

$interface = $name

# Deal with the case where $dns2 is non-empty and $dns1 is empty.
if $dns2 != '' {
if $dns1 == '' {
if $dns2 {
if !$dns1 {
$dns1_real = $dns2
$dns2_real = ''
$dns2_real = undef
} else {
$dns1_real = $dns1
$dns2_real = $dns2
Expand Down
24 changes: 12 additions & 12 deletions manifests/global.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,35 +59,35 @@
# Copyright (C) 2011 Mike Arnold, unless otherwise noted.
#
class network::global (
$hostname = '',
$gateway = '',
$gatewaydev = '',
$ipv6gateway = '',
$ipv6defaultdev = '',
$nisdomain = '',
$vlan = '',
$hostname = undef,
$gateway = undef,
$gatewaydev = undef,
$ipv6gateway = undef,
$ipv6defaultdev = undef,
$nisdomain = undef,
$vlan = undef,
$ipv6networking = false,
$nozeroconf = ''
$nozeroconf = undef
) {
# Validate our data
if $gateway != '' {
if $gateway {
if ! is_ip_address($gateway) { fail("${gateway} is not an IP address.") }
}
if $ipv6gateway != '' {
if $ipv6gateway {
if ! is_ip_address($ipv6gateway) { fail("${ipv6gateway} is not an IPv6 address.") }
}

validate_bool($ipv6networking)

# Validate our regular expressions
if $vlan != '' {
if $vlan {
$states = [ '^yes$', '^no$' ]
validate_re($vlan, $states, '$vlan must be either "yes" or "no".')
}

validate_bool($ipv6networking)

include 'network'
include '::network'

file { 'network.sysconfig':
ensure => 'present',
Expand Down
4 changes: 2 additions & 2 deletions manifests/if/bridge.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
define network::if::bridge (
$ensure,
$bridge,
$mtu = '',
$ethtool_opts = ''
$mtu = undef,
$ethtool_opts = undef
) {
# Validate our regular expressions
$states = [ '^up$', '^down$' ]
Expand Down
10 changes: 5 additions & 5 deletions manifests/if/dynamic.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
#
define network::if::dynamic (
$ensure,
$macaddress = '',
$macaddress = undef,
$bootproto = 'dhcp',
$userctl = false,
$mtu = '',
$dhcp_hostname = '',
$ethtool_opts = '',
$linkdelay = ''
$mtu = undef,
$dhcp_hostname = undef,
$ethtool_opts = undef,
$linkdelay = undef
) {
# Validate our regular expressions
$states = [ '^up$', '^down$' ]
Expand Down
Loading

0 comments on commit 41b2dc4

Please sign in to comment.