diff options
author | Luke Kanies <luke@madstop.com> | 2008-01-14 13:34:06 -0800 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-01-14 13:34:06 -0800 |
commit | cfda651f88d12249f29706d2bedbfddce7a2e6f7 (patch) | |
tree | 41c57e5e1405691a561b35b1ceac890c6a341ef3 /lib/puppet/util/posix.rb | |
parent | 488c43771aea482e0212b605bde054bf8cb0533c (diff) | |
download | puppet-cfda651f88d12249f29706d2bedbfddce7a2e6f7.tar.gz puppet-cfda651f88d12249f29706d2bedbfddce7a2e6f7.tar.xz puppet-cfda651f88d12249f29706d2bedbfddce7a2e6f7.zip |
Another round of test-fixes toward eliminating global resource
references. This should have gotten rid of all of them,
and now it's just a question of fixing a few hopefully unrelated
failing tests.
Diffstat (limited to 'lib/puppet/util/posix.rb')
-rwxr-xr-x | lib/puppet/util/posix.rb | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/lib/puppet/util/posix.rb b/lib/puppet/util/posix.rb index c518a8797..0b1e1c2f2 100755 --- a/lib/puppet/util/posix.rb +++ b/lib/puppet/util/posix.rb @@ -63,45 +63,6 @@ module Puppet::Util::POSIX return nil end - # Look in memory for an already-managed type and use its info if available. - # Currently unused. - def get_provider_value(type, field, id) - unless typeklass = Puppet::Type.type(type) - raise ArgumentError, "Invalid type %s" % type - end - - id = id.to_s - - chkfield = idfield(type) - obj = typeklass.find { |obj| - if id =~ /^\d+$/ - obj.should(chkfield).to_s == id || - obj.provider.send(chkfield) == id - else - obj[:name] == id - end - } - - return nil unless obj - - if obj.provider - begin - val = obj.provider.send(field) - if val == :absent - return nil - else - return val - end - rescue => detail - if Puppet[:trace] - puts detail.backtrace - Puppet.err detail - return nil - end - end - end - end - # Determine what the field name is for users and groups. def idfield(space) case Puppet::Util.symbolize(space) |