diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-03 01:28:46 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-03 01:28:46 +0000 |
commit | 989716e5a7519d6635617a87c0effb5d9373b9b0 (patch) | |
tree | 1100d4a1a07ae4a3f218ca9e5234625b504399ec /lib | |
parent | 96350b20cd2e6b651dc9f488a9ab7b319f6b8f57 (diff) | |
download | puppet-989716e5a7519d6635617a87c0effb5d9373b9b0.tar.gz puppet-989716e5a7519d6635617a87c0effb5d9373b9b0.tar.xz puppet-989716e5a7519d6635617a87c0effb5d9373b9b0.zip |
Adding zone patches
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1530 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/type/zone.rb | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/puppet/type/zone.rb b/lib/puppet/type/zone.rb index 82656e068..de94e51ca 100644 --- a/lib/puppet/type/zone.rb +++ b/lib/puppet/type/zone.rb @@ -246,6 +246,14 @@ end end end + newstate(:shares, :parent => ZoneConfigState) do + desc "Number of FSS CPU shares allocated to the zone." + + def configtext + "add rctl\nset name=zone.cpu-shares\nadd value (priv=privileged,limit=#{self.should},action=none)\nend" + end + end + newstate(:inherit, :parent => ZoneMultiConfigState) do desc "The list of directories that the zone inherits from the global zone. All directories must be fully qualified." @@ -288,7 +296,7 @@ end timeserver=localhost name_service=DNS {domain_name=<%= domain %> name_server=<%= nameserver %>} - network_interface=primary {hostname=<%= name %> + network_interface=primary {hostname=<%= realhostname %> ip_address=<%= ip %> netmask=<%= netmask %> protocol_ipv6=no @@ -300,7 +308,8 @@ end zone { myzone: ip => "bge0:192.168.0.23", sysidcfg => template(sysidcfg), - path => "/opt/zones/myzone" + path => "/opt/zones/myzone", + realhostname => "fully.qualified.domain.name" } The sysidcfg only matters on the first booting of the zone, @@ -329,6 +338,10 @@ end end end + newparam(:realhostname) do + desc "The actual hostname of the zone." + end + # If Puppet is also managing the base dir or its parent dir, list them # both as prerequisites. autorequire(:file) do @@ -530,6 +543,8 @@ set zonepath=%s # Nothing; this is set in the zoneadm list command when :pool: self.is = [:pool, value] + when :shares: + self.is = [:shares, value] when "inherit-pkg-dir": dirs = value.collect do |hash| hash[:dir] |