Skip to content

Commit 7ffe4a0

Browse files
authored
Merge pull request #8978 from joshcooper/delete-dead-insync
(maint) Remove dead Puppet::Type.insync? method
2 parents 400bff5 + 03cb878 commit 7ffe4a0

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

lib/puppet/type.rb

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,47 +1032,6 @@ def flush
10321032
self.provider.flush if self.provider and self.provider.respond_to?(:flush)
10331033
end
10341034

1035-
# Returns true if all contained objects are in sync.
1036-
# @todo "contained in what?" in the given "in" parameter?
1037-
#
1038-
# @todo deal with the comment _"FIXME I don't think this is used on the type instances any more,
1039-
# it's really only used for testing"_
1040-
# @return [Boolean] true if in sync, false otherwise.
1041-
#
1042-
def insync?(is)
1043-
insync = true
1044-
1045-
property = @parameters[:ensure]
1046-
if property
1047-
unless is.include? property
1048-
#TRANSLATORS 'is' is a variable name and should not be translated
1049-
raise Puppet::DevError, _("The 'is' value is not in the 'is' array for '%{name}'") % { name: property.name }
1050-
end
1051-
ensureis = is[property]
1052-
if property.safe_insync?(ensureis) and property.should == :absent
1053-
return true
1054-
end
1055-
end
1056-
1057-
properties.each { |prop|
1058-
unless is.include? prop
1059-
#TRANSLATORS 'is' is a variable name and should not be translated
1060-
raise Puppet::DevError, _("The 'is' value is not in the 'is' array for '%{name}'") % { name: prop.name }
1061-
end
1062-
1063-
propis = is[prop]
1064-
unless prop.safe_insync?(propis)
1065-
prop.debug("Not in sync: #{propis.inspect} vs #{prop.should.inspect}")
1066-
insync = false
1067-
#else
1068-
# property.debug("In sync")
1069-
end
1070-
}
1071-
1072-
#self.debug("#{self} sync status is #{insync}")
1073-
insync
1074-
end
1075-
10761035
# Says if the ensure property should be retrieved if the resource is ensurable
10771036
# Defaults to true. Some resource type classes can override it
10781037
def self.needs_ensure_retrieved

0 commit comments

Comments
 (0)