From b6db54585177f277b1e06bebd4d925d5c272b610 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 17 Dec 2008 18:10:30 -0600 Subject: Deprecating 'Puppet.type'; replacing all instances with Puppet::Type.type Signed-off-by: Luke Kanies --- lib/puppet/type/file.rb | 2 +- lib/puppet/type/file/ensure.rb | 2 +- lib/puppet/type/file/group.rb | 2 +- lib/puppet/type/file/mode.rb | 2 +- lib/puppet/type/file/owner.rb | 2 +- lib/puppet/type/file/selcontext.rb | 8 ++++---- lib/puppet/type/file/source.rb | 2 +- lib/puppet/type/file/target.rb | 2 +- lib/puppet/type/file/type.rb | 2 +- lib/puppet/type/package.rb | 2 +- lib/puppet/type/user.rb | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) (limited to 'lib/puppet/type') diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb index 169dc577a..ffcd2b0e8 100644 --- a/lib/puppet/type/file.rb +++ b/lib/puppet/type/file.rb @@ -863,7 +863,7 @@ module Puppet end end end - end # Puppet.type(:pfile) + end # Puppet::Type.type(:pfile) # We put all of the properties in separate files, because there are so many # of them. The order these are loaded is important, because it determines diff --git a/lib/puppet/type/file/ensure.rb b/lib/puppet/type/file/ensure.rb index ae7137264..7466c5e3a 100755 --- a/lib/puppet/type/file/ensure.rb +++ b/lib/puppet/type/file/ensure.rb @@ -1,5 +1,5 @@ module Puppet - Puppet.type(:file).ensurable do + Puppet::Type.type(:file).ensurable do require 'etc' desc "Whether to create files that don't currently exist. Possible values are *absent*, *present*, *file*, and *directory*. diff --git a/lib/puppet/type/file/group.rb b/lib/puppet/type/file/group.rb index 56883add6..3aeac21ff 100755 --- a/lib/puppet/type/file/group.rb +++ b/lib/puppet/type/file/group.rb @@ -2,7 +2,7 @@ require 'puppet/util/posix' # Manage file group ownership. module Puppet - Puppet.type(:file).newproperty(:group) do + Puppet::Type.type(:file).newproperty(:group) do include Puppet::Util::POSIX require 'etc' diff --git a/lib/puppet/type/file/mode.rb b/lib/puppet/type/file/mode.rb index ada1b5b47..fd9c27ae6 100755 --- a/lib/puppet/type/file/mode.rb +++ b/lib/puppet/type/file/mode.rb @@ -2,7 +2,7 @@ # for specification (e.g., u+rwx, or -0011), but for now only supports # specifying the full mode. module Puppet - Puppet.type(:file).newproperty(:mode) do + Puppet::Type.type(:file).newproperty(:mode) do require 'etc' desc "Mode the file should be. Currently relatively limited: you must specify the exact mode the file should be." diff --git a/lib/puppet/type/file/owner.rb b/lib/puppet/type/file/owner.rb index 6bc40ecbd..e4339f05b 100755 --- a/lib/puppet/type/file/owner.rb +++ b/lib/puppet/type/file/owner.rb @@ -1,5 +1,5 @@ module Puppet - Puppet.type(:file).newproperty(:owner) do + Puppet::Type.type(:file).newproperty(:owner) do include Puppet::Util::POSIX include Puppet::Util::Warnings diff --git a/lib/puppet/type/file/selcontext.rb b/lib/puppet/type/file/selcontext.rb index 22e3080b1..8ef51366a 100644 --- a/lib/puppet/type/file/selcontext.rb +++ b/lib/puppet/type/file/selcontext.rb @@ -50,7 +50,7 @@ module Puppet end end - Puppet.type(:file).newproperty(:seluser, :parent => Puppet::SELFileContext) do + Puppet::Type.type(:file).newproperty(:seluser, :parent => Puppet::SELFileContext) do desc "What the SELinux user component of the context of the file should be. Any valid SELinux user component is accepted. For example ``user_u``. If not specified it defaults to the value returned by matchpathcon for @@ -61,7 +61,7 @@ module Puppet defaultto { self.retrieve_default_context(:seluser) } end - Puppet.type(:file).newproperty(:selrole, :parent => Puppet::SELFileContext) do + Puppet::Type.type(:file).newproperty(:selrole, :parent => Puppet::SELFileContext) do desc "What the SELinux role component of the context of the file should be. Any valid SELinux role component is accepted. For example ``role_r``. If not specified it defaults to the value returned by matchpathcon for @@ -72,7 +72,7 @@ module Puppet defaultto { self.retrieve_default_context(:selrole) } end - Puppet.type(:file).newproperty(:seltype, :parent => Puppet::SELFileContext) do + Puppet::Type.type(:file).newproperty(:seltype, :parent => Puppet::SELFileContext) do desc "What the SELinux type component of the context of the file should be. Any valid SELinux type component is accepted. For example ``tmp_t``. If not specified it defaults to the value returned by matchpathcon for @@ -83,7 +83,7 @@ module Puppet defaultto { self.retrieve_default_context(:seltype) } end - Puppet.type(:file).newproperty(:selrange, :parent => Puppet::SELFileContext) do + Puppet::Type.type(:file).newproperty(:selrange, :parent => Puppet::SELFileContext) do desc "What the SELinux range component of the context of the file should be. Any valid SELinux range component is accepted. For example ``s0`` or ``SystemHigh``. If not specified it defaults to the value returned by diff --git a/lib/puppet/type/file/source.rb b/lib/puppet/type/file/source.rb index a6ab5daaf..f7c0fa4fc 100755 --- a/lib/puppet/type/file/source.rb +++ b/lib/puppet/type/file/source.rb @@ -8,7 +8,7 @@ module Puppet # the file down. If the remote file is a dir or a link or whatever, then # this state, during retrieval, modifies the appropriate other states # so that things get taken care of appropriately. - Puppet.type(:file).newparam(:source) do + Puppet::Type.type(:file).newparam(:source) do include Puppet::Util::Diff attr_accessor :source, :local diff --git a/lib/puppet/type/file/target.rb b/lib/puppet/type/file/target.rb index 8949c2af6..1d85e05bc 100644 --- a/lib/puppet/type/file/target.rb +++ b/lib/puppet/type/file/target.rb @@ -1,5 +1,5 @@ module Puppet - Puppet.type(:file).newproperty(:target) do + Puppet::Type.type(:file).newproperty(:target) do desc "The target for creating a link. Currently, symlinks are the only type supported." diff --git a/lib/puppet/type/file/type.rb b/lib/puppet/type/file/type.rb index 65539795b..1835078a1 100755 --- a/lib/puppet/type/file/type.rb +++ b/lib/puppet/type/file/type.rb @@ -1,5 +1,5 @@ module Puppet - Puppet.type(:file).newproperty(:type) do + Puppet::Type.type(:file).newproperty(:type) do require 'etc' desc "A read-only state to check the file type." diff --git a/lib/puppet/type/package.rb b/lib/puppet/type/package.rb index 9cf1fa8b4..9ed1bf1c8 100644 --- a/lib/puppet/type/package.rb +++ b/lib/puppet/type/package.rb @@ -315,6 +315,6 @@ module Puppet props end end - end # Puppet.type(:package) + end # Puppet::Type.type(:package) end diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb index 47d162547..492dd6136 100755 --- a/lib/puppet/type/user.rb +++ b/lib/puppet/type/user.rb @@ -223,7 +223,7 @@ module Puppet groups.each { |group| case group when Integer: - if resource = catalog.resources.find { |r| r.is_a?(Puppet.type(:group)) and r.should(:gid) == group } + if resource = catalog.resources.find { |r| r.is_a?(Puppet::Type.type(:group)) and r.should(:gid) == group } autos << resource end else -- cgit