summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0>2006-03-31 01:29:13 +0000
committerlutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0>2006-03-31 01:29:13 +0000
commitbdc819b48857b5994fb9e1dcaddf3ac5ee59fb21 (patch)
treecb7b1ce2c54a9ab2c8fbf639212fe9a92a0917a3
parenta9fdf9d18d778c733b06140350dc6863cb136dac (diff)
downloadpuppet-bdc819b48857b5994fb9e1dcaddf3ac5ee59fb21.tar.gz
puppet-bdc819b48857b5994fb9e1dcaddf3ac5ee59fb21.tar.xz
puppet-bdc819b48857b5994fb9e1dcaddf3ac5ee59fb21.zip
Remove unused should method; add more yum parameters to the type
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1045 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--lib/puppet/type/yumrepo.rb67
1 files changed, 62 insertions, 5 deletions
diff --git a/lib/puppet/type/yumrepo.rb b/lib/puppet/type/yumrepo.rb
index 0761ddb45..48e1f8f4b 100644
--- a/lib/puppet/type/yumrepo.rb
+++ b/lib/puppet/type/yumrepo.rb
@@ -110,10 +110,6 @@ module Puppet
return changes
end
- def should(name)
- state(name).should
- end
-
def store
text = ""
@lines.each do |l|
@@ -135,7 +131,8 @@ module Puppet
newparam(:name) do
desc "The name of the repository. This is used to find the config
- file as $repodir/$name.repo"
+ file as $repodir/$name.repo. The 'name' parameter in the yum
+ config file has to be set through **descr**"
isnamevar
end
@@ -200,5 +197,65 @@ module Puppet
newvalue(/.*/) { }
end
+ newstate(:include, Puppet::IniState) do
+ desc "A URL from which to include the config.\n#{ABSENT_DOC}"
+ newvalue(:absent) { self.should = :absent }
+ # Should really check that it's a valid URL
+ newvalue(/.*/) { }
+ end
+
+ newstate(:exclude, Puppet::IniState) do
+ desc "List of shell globs. Matching packages will never be
+ considered in updates or installs for this repo.
+ #{ABSENT_DOC}"
+ newvalue(:absent) { self.should = :absent }
+ newvalue(/.*/) { }
+ end
+
+ newstate(:includepkgs, Puppet::IniState) do
+ desc "List of shell globs. If this is set, only packages
+ matching one of the globs will be considered for
+ update or install.\n#{ABSENT_DOC}"
+ newvalue(:absent) { self.should = :absent }
+ newvalue(/.*/) { }
+ end
+
+ newstate(:enablegroups, Puppet::IniState) do
+ desc "Determines whether yum will allow the use of
+ package groups for this repository. Possible
+ values are '0', and '1'.\n#{ABSENT_DOC}"
+ newvalue(:absent) { self.should = :absent }
+ newvalue(%r{(0|1)}) { }
+ end
+
+ newstate(:failovermethod, Puppet::IniState) do
+ desc "Either 'roundrobin' or 'priority'.\n#{ABSENT_DOC}"
+ newvalue(:absent) { self.should = :absent }
+ newvalue(%r(roundrobin|priority)) { }
+ end
+
+ newstate(:keepalive, Puppet::IniState) do
+ desc "Either '1' or '0'. This tells yum whether or not HTTP/1.1
+ keepalive should be used with this repository.\n#{ABSENT_DOC}"
+ newvalue(:absent) { self.should = :absent }
+ newvalue(%r{(0|1)}) { }
+ end
+
+ newstate(:timeout, Puppet::IniState) do
+ desc "Number of seconds to wait for a connection before timing
+ out.\n#{ABSENT_DOC}"
+ newvalue(:absent) { self.should = :absent }
+ newvalue(%r{[0-9]+}) { }
+ end
+
+ newstate(:metadata_expire, Puppet::IniState) do
+ desc "Number of seconds after which the metadata will expire.
+ #{ABSENT_DOC}"
+ newvalue(:absent) { self.should = :absent }
+ newvalue(%r{[0-9]+}) { }
+ end
+
+
+
end
end