Renamed :alias property to :host_aliases / :port_aliases (in the
sidelined port code) and corrected the comments.

Signed-off-by: Markus Roberts <[email protected]>
---
 lib/puppet/type/host.rb   |   15 ++++++---------
 lib/puppet/type/port.rb   |   11 ++++++-----
 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 c8b5934..6c4e07b 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 fbb2442..f186023 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 c9e8f3d..c1407a6 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
 
-- 
1.6.4

--

You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.


Reply via email to