diff options
author | Markus Roberts <Markus@reality.com> | 2009-12-17 09:24:26 -0800 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-12-20 09:18:35 +1100 |
commit | 854c06502d1a8f6d6dfaf0abeaacb4791a6fb5ed (patch) | |
tree | e215cff2b6ee16c2bf51462ba7e6b28a9f84e63a | |
parent | 813cb58815f1f8f987ad64f7c7bfb640fbcdfa81 (diff) | |
download | puppet-854c06502d1a8f6d6dfaf0abeaacb4791a6fb5ed.tar.gz puppet-854c06502d1a8f6d6dfaf0abeaacb4791a6fb5ed.tar.xz puppet-854c06502d1a8f6d6dfaf0abeaacb4791a6fb5ed.zip |
Fix for #2813 (alias propety v. alias metapram)
Renamed :alias property to :host_aliases / :port_aliases (in the
sidelined port code) and corrected the comments.
Signed-off-by: Markus Roberts <Markus@reality.com>
-rwxr-xr-x | lib/puppet/type/host.rb | 15 | ||||
-rwxr-xr-x | lib/puppet/type/port.rb | 11 | ||||
-rwxr-xr-x | lib/puppet/type/sshkey.rb | 10 |
3 files changed, 17 insertions, 19 deletions
diff --git a/lib/puppet/type/host.rb b/lib/puppet/type/host.rb index c8b5934fa..6c4e07b45 100755 --- a/lib/puppet/type/host.rb +++ b/lib/puppet/type/host.rb @@ -13,12 +13,11 @@ module Puppet end - newproperty(:alias) do - desc "Any alias the host might have. Multiple values must be - specified as an array. Note that this state has the same name - as one of the metaparams; using this state to set aliases will - make those aliases available in your Puppet scripts and also on - disk." + newproperty(:host_aliases) do + desc 'Any aliases the host might have. Multiple values must be + specified as an array. Note that this property is not the same as + the "alias" metaparam; use this property to add aliases to a host + on disk, and "alias" to aliases for use in your Puppet scripts.' def insync?(is) is == @should @@ -63,9 +62,7 @@ module Puppet end validate do |value| - if value =~ /\s/ - raise Puppet::Error, "Aliases cannot include whitespace" - end + raise Puppet::Error, "Host aliases cannot include whitespace" if value =~ /\s/ end end diff --git a/lib/puppet/type/port.rb b/lib/puppet/type/port.rb index fbb24425d..f186023be 100755 --- a/lib/puppet/type/port.rb +++ b/lib/puppet/type/port.rb @@ -57,11 +57,12 @@ # desc "The port description." # end # -# newproperty(:alias) do -# desc "Any aliases the port might have. Multiple values must be -# specified as an array. Note that this property has the same name as -# one of the metaparams; using this property to set aliases will make -# those aliases available in your Puppet scripts and also on disk." +# newproperty(:port_aliases) do +# desc 'Any aliases the port might have. Multiple values must be +# specified as an array. Note that this property is not the same as +# the "alias" metaparam; use this property to add aliases to a port +# in the services file, and "alias" to aliases for use in your Puppet +# scripts.' # # # We actually want to return the whole array here, not just the first # # value. diff --git a/lib/puppet/type/sshkey.rb b/lib/puppet/type/sshkey.rb index c9e8f3d8b..c1407a6ee 100755 --- a/lib/puppet/type/sshkey.rb +++ b/lib/puppet/type/sshkey.rb @@ -21,11 +21,11 @@ module Puppet # FIXME This should automagically check for aliases to the hosts, just # to see if we can automatically glean any aliases. - newproperty(:alias) do - desc "Any alias the host might have. Multiple values must be - specified as an array. Note that this parameter has the same name - as one of the metaparams; using this parameter to set aliases will - make those aliases available in your Puppet scripts." + newproperty(:host_aliases) do + desc 'Any aliases the host might have. Multiple values must be + specified as an array. Note that this property is not the same as + the "alias" metaparam; use this property to add aliases to a host + on disk, and "alias" to aliases for use in your Puppet scripts.' attr_accessor :meta |