PSARC/2013/218 Puppet Phase 2
authorDrew Fisher <drew.fisher@oracle.com>
Mon, 29 Jul 2013 16:02:38 -0600
changeset 1409 9db4ba32e740
parent 1408 8bc5df437e67
child 1410 ca9946e5736c
PSARC/2013/218 Puppet Phase 2 16453463 Update Puppet's offerings on Solaris
components/facter/facter.p5m
components/facter/files/solaris/lib/facter/zone.rb
components/facter/patches/facter-01-physicalprocessor-psrinfo.patch
components/facter/patches/facter-02-virtual-zones-facts.patch
components/puppet/Makefile
components/puppet/ext/extconf.rb
components/puppet/ext/puppet_audit.c
components/puppet/files/puppet-agent.xml
components/puppet/files/puppet-master.xml
components/puppet/files/puppet.stencil
components/puppet/files/puppet.xml
components/puppet/files/puppet_agent
components/puppet/files/puppet_master
components/puppet/files/solaris/lib/puppet/provider/address_object/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/address_properties/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/boot_environment/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/dns/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/etherstub/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/interface_properties/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/ip_interface/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/ip_tunnel/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/ipmp_interface/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/ldap/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/link_aggregation/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/link_properties/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/nis/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/nsswitch/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/pkg_facet/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/pkg_mediator/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/pkg_publisher/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/pkg_variant/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/protocol_properties/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/solaris_vlan/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/svccfg/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/vni_interface/solaris.rb
components/puppet/files/solaris/lib/puppet/provider/vnic/solaris.rb
components/puppet/files/solaris/lib/puppet/type/address_object.rb
components/puppet/files/solaris/lib/puppet/type/address_properties.rb
components/puppet/files/solaris/lib/puppet/type/boot_environment.rb
components/puppet/files/solaris/lib/puppet/type/dns.rb
components/puppet/files/solaris/lib/puppet/type/etherstub.rb
components/puppet/files/solaris/lib/puppet/type/interface_properties.rb
components/puppet/files/solaris/lib/puppet/type/ip_interface.rb
components/puppet/files/solaris/lib/puppet/type/ip_tunnel.rb
components/puppet/files/solaris/lib/puppet/type/ipmp_interface.rb
components/puppet/files/solaris/lib/puppet/type/ldap.rb
components/puppet/files/solaris/lib/puppet/type/link_aggregation.rb
components/puppet/files/solaris/lib/puppet/type/link_properties.rb
components/puppet/files/solaris/lib/puppet/type/nis.rb
components/puppet/files/solaris/lib/puppet/type/nsswitch.rb
components/puppet/files/solaris/lib/puppet/type/pkg_facet.rb
components/puppet/files/solaris/lib/puppet/type/pkg_mediator.rb
components/puppet/files/solaris/lib/puppet/type/pkg_publisher.rb
components/puppet/files/solaris/lib/puppet/type/pkg_variant.rb
components/puppet/files/solaris/lib/puppet/type/protocol_properties.rb
components/puppet/files/solaris/lib/puppet/type/solaris_vlan.rb
components/puppet/files/solaris/lib/puppet/type/svccfg.rb
components/puppet/files/solaris/lib/puppet/type/vni_interface.rb
components/puppet/files/solaris/lib/puppet/type/vnic.rb
components/puppet/files/user_attr
components/puppet/patches/puppet-00-s12pkg.patch
components/puppet/patches/puppet-01-installrb-nogzip-manpage.patch
components/puppet/patches/puppet-02-zone-type.patch
components/puppet/patches/puppet-02-zoneprovider.patch
components/puppet/patches/puppet-03-zone-provider.patch
components/puppet/patches/puppet-03-zonetype.patch
components/puppet/patches/puppet-04-agent-auditing.patch
components/puppet/patches/puppet-05-apply-auditing.patch
components/puppet/patches/puppet-06-provider-smf.patch
components/puppet/puppet.p5m
components/puppet/resolve.deps
make-rules/shared-macros.mk
--- a/components/facter/facter.p5m	Sat Jul 27 07:19:32 2013 -0700
+++ b/components/facter/facter.p5m	Mon Jul 29 16:02:38 2013 -0600
@@ -117,5 +117,7 @@
 file path=usr/ruby/1.8/lib/ruby/vendor_ruby/1.8/facter/virtual.rb
 file path=usr/ruby/1.8/lib/ruby/vendor_ruby/1.8/facter/vlans.rb
 file path=usr/ruby/1.8/lib/ruby/vendor_ruby/1.8/facter/xendomains.rb
+file files/solaris/lib/facter/zone.rb \
+    path=usr/ruby/1.8/lib/ruby/vendor_ruby/1.8/facter/zone.rb mode=0555
 file path=usr/share/man/man8/facter.8
 license facter.license license="Apache v2.0"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/facter/files/solaris/lib/facter/zone.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,30 @@
+
+# A facter fact to determine if zones are supported
+# on a system.
+
+Facter.add("kernel_zone") do
+  confine :operatingsystem => :Solaris
+  setcode do
+      virtinfo = %x{/sbin/virtinfo list -H -o class kernel-zone 2>/dev/null}
+      case virtinfo.chomp!
+      when "supported", "current", "parent"
+          virtinfo
+      else
+	  "unsupported"
+      end
+  end
+end
+
+Facter.add("non_global_zone") do
+  confine :operatingsystem => :Solaris
+  setcode do
+      virtinfo = %x{/sbin/virtinfo list -H -o class non-global-zone 2>/dev/null}
+      case virtinfo.chomp!
+      when "supported", "current"
+          virtinfo
+      else
+          "unsupported"
+      end 
+  end 
+end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/facter/patches/facter-01-physicalprocessor-psrinfo.patch	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,15 @@
+Fix psrinfo output to handle kernel zones.
+--- facter-1.6.16/lib/facter/physicalprocessorcount.rb.orig	2013-06-10 15:28:25.355442031 -0600
++++ facter-1.6.16/lib/facter/physicalprocessorcount.rb	2013-06-10 15:31:09.056896313 -0600
+@@ -75,7 +75,10 @@
+     cmd = "/usr/sbin/psrinfo"
+     result = nil
+     if (major_version > 5) or (major_version == 5 and minor_version >= 8) then
+-      result = Facter::Util::Resolution.exec("#{cmd} -p")
++      result = Facter::Util::Resolution.exec("#{cmd} -p 2> /dev/null")
++        if result.nil?
++          result = 0
++        end
+     else
+       output = Facter::Util::Resolution.exec(cmd)
+       result = output.split("\n").length.to_s
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/facter/patches/facter-02-virtual-zones-facts.patch	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,69 @@
+Add output for kernel zones and fix prtdiag output so that it doesn't report
+an error in a kernel zone.
+--- facter-1.6.16/lib/facter/virtual.rb.orig	2013-06-10 15:19:45.461022623 -0600
++++ facter-1.6.16/lib/facter/virtual.rb	2013-06-10 15:22:54.164653119 -0600
+@@ -119,9 +119,9 @@
+             result = "hyperv" if pd =~ /Product Name: Virtual Machine/
+           end
+         elsif Facter.value(:kernel) == 'SunOS'
+-          res = Facter::Util::Resolution.new('prtdiag')
++          res = Facter::Util::Resolution.new('/usr/sbin/prtdiag 2>/dev/null')
+           res.timeout = 6
+-          res.setcode('prtdiag')
++          res.setcode('/usr/sbin/prtdiag 2>/dev/null')
+           output = res.value
+           if not output.nil?
+             output.each_line do |pd|
+@@ -210,3 +210,52 @@
+     end
+   end
+ end
++
++#
++# Fact: kernel_zone
++#
++# Purpose: A facter fact to report kernel zones status on a system.
++#
++# Resolution: Provides the following kernel zone information.
++# supported: kernel zones are supported
++# unsupported: kernel zones are not supported
++# current: the current environment is a kernel zone
++# parent: the current environment is a child of a kernel zone
++#
++Facter.add("kernel_zone") do
++  confine :operatingsystem => :Solaris
++  setcode do
++      virtinfo = %x{/sbin/virtinfo list -H -o class kernel-zone 2>/dev/null}
++      case virtinfo.chomp!
++      when "supported"
++      when "current"
++      when "parent"
++          virtinfo
++      else
++          "unsupported"
++      end
++  end
++end
++
++#
++# Fact: non_global_zone
++#
++# Purpose: A facter fact to report non-global zone status on a system.
++#
++# Resolution: Provides the following kernel zone information.
++# current: the current environment is a non-global zone
++# Otherwise returns supported because non-global zones are supported
++# in Solaris in both global and kernel zones.
++#
++Facter.add("non_global_zone") do
++  confine :operatingsystem => :Solaris
++  setcode do
++      virtinfo = %x{/sbin/virtinfo list -H -o class non-global-zone 2>/dev/null}
++      case virtinfo.chomp!
++      when "current"
++          virtinfo
++      else
++          "supported"
++     end
++  end
++end
--- a/components/puppet/Makefile	Sat Jul 27 07:19:32 2013 -0700
+++ b/components/puppet/Makefile	Mon Jul 29 16:02:38 2013 -0600
@@ -47,10 +47,15 @@
 
 # common targets
 build:		$(BUILD_32)
+	# Ruby extension for auditing
+	(cd ext; $(RUBY) extconf.rb; $(GMAKE))
 
 # make sure facter is installed first
 install:	../facter/build/$(MACH32)/.installed $(INSTALL_32)
 
+clean::
+	(cd ext; $(GMAKE) clean; $(RM) Makefile)
+
 # puppet requires the installation of the following rubygems to run
 # the unittests:  rspec rspec-expectations mocha rake rack hiera rgen
 # Disable the tests until these rubygems are available.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/ext/extconf.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,5 @@
+require 'mkmf'
+$CPPFLAGS = "-I/usr/include -I/usr/include/bsm"
+$LDFLAGS  = "-L/usr/lib"
+$LOCAL_LIBS = "-lbsm"
+create_makefile("PuppetAudit")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/ext/puppet_audit.c	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,169 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ */
+
+/*
+ * Ruby binding for libbsm used by Puppet to record audit events
+ */
+
+#include <ruby.h>
+#include <pwd.h>
+#include <nss_dbdefs.h>
+#include <bsm/adt.h>
+#include <bsm/adt_event.h>
+
+VALUE cPuppetAudit;
+
+VALUE
+audit_new(VALUE class)
+{
+	adt_session_data_t	*ah;
+	VALUE			data;
+
+	if (adt_start_session(&ah, NULL, 0) != 0) {
+		perror("puppet adt_start_session");
+		exit(1);
+	}
+	data = Data_Wrap_Struct(class, 0, 0, ah);
+	rb_obj_call_init(data, 0, 0);
+	return (data);
+}
+
+static VALUE
+audit_init(VALUE self)
+{
+	adt_session_data_t	*ah;
+	adt_termid_t		*tid;
+	struct passwd		pwd, *result;
+	char			*buffer;
+	size_t			size = NSS_BUFLEN_PASSWD;
+
+	Data_Get_Struct(self, adt_session_data_t, ah);
+
+	if (adt_load_hostname(NULL, &tid) != 0) {
+		perror("puppet adt_load_hostname");
+		(void) adt_end_session(ah);
+		exit(1);
+	}
+
+	if ((buffer = malloc(size)) == NULL)
+		exit(1);
+
+	/* set "puppet" as user name and preselection */
+	if (getpwnam_r("puppet", &pwd, buffer, size, &result) != 0) {
+		perror("puppet getpwnam_r(puppet)");
+		(void) adt_end_session(ah);
+		free(buffer);
+		exit(1);
+	}
+
+	if (result == NULL) {
+		perror("puppet getpwnam_r(puppet)");
+		(void) adt_end_session(ah);
+		free(buffer);
+		exit(1);
+	}
+
+	if (adt_set_user(ah, result->pw_uid, result->pw_gid, result->pw_uid,
+	    result->pw_gid, tid, ADT_NEW) != 0) {
+		perror("puppet adt_set_user");
+		free(tid);
+		(void) adt_end_session(ah);
+		free(buffer);
+		exit(1);
+	}
+	free(tid);
+
+	/* set audit context on this process */
+	if (adt_set_proc(ah) != 0) {
+		perror("puppet adt_set_proc");
+		(void) adt_end_session(ah);
+		free(buffer);
+		exit(1);
+	}
+	free(buffer);
+	return (self);
+}
+
+static VALUE
+audit_start(VALUE self)
+{
+	adt_event_data_t	*event;
+	adt_session_data_t	*ah;
+
+	Data_Get_Struct(self, adt_session_data_t, ah);
+
+	if ((event = adt_alloc_event(ah, ADT_puppet_session_start)) == NULL) {
+		perror("adt_alloc_event(ADT_puppet_session_start)");
+		(void) adt_end_session(ah);
+		ah = NULL;
+	} else {
+		if (adt_put_event(event, ADT_SUCCESS, ADT_SUCCESS) != 0) {
+			perror("adt_put_event(ADT_puppet_session_start)");
+		}
+		adt_free_event(event);
+	}
+	return (self);
+}
+
+static VALUE
+audit_stop(VALUE self)
+{
+	adt_event_data_t	*event;
+	adt_session_data_t	*ah;
+
+	Data_Get_Struct(self, adt_session_data_t, ah);
+
+	if ((event = adt_alloc_event(ah, ADT_puppet_session_end)) == NULL) {
+		perror("adt_alloc_event(ADT_puppet_session_end)");
+	} else {
+		if (adt_put_event(event, ADT_SUCCESS, ADT_SUCCESS) != 0) {
+			perror("adt_put_event(ADT_puppet_session_end)");
+		}
+		adt_free_event(event);
+	}
+	return (self);
+}
+
+static VALUE
+audit_teardown(VALUE self)
+{
+	adt_session_data_t	*ah;
+
+	Data_Get_Struct(self, adt_session_data_t, ah);
+
+	(void) adt_end_session(ah);
+	return (self);
+}
+
+void
+Init_PuppetAudit()
+{
+	cPuppetAudit = rb_define_class("PuppetAudit", rb_cObject);
+	rb_define_singleton_method(cPuppetAudit, "new", audit_new, 0);
+	rb_define_method(cPuppetAudit, "initialize", audit_init, 0);
+	rb_define_method(cPuppetAudit, "audit_start", audit_start, 0);
+	rb_define_method(cPuppetAudit, "audit_stop", audit_stop, 0);
+	rb_define_method(cPuppetAudit, "audit_teardown", audit_teardown, 0);
+}
--- a/components/puppet/files/puppet-agent.xml	Sat Jul 27 07:19:32 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
-<!--
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License (the "License").
- You may not use this file except in compliance with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
-
- Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
-
- NOTE:  This service manifest is not editable; its contents will
- be overwritten by package or patch operations, including
- operating system upgrade.  Make customizations in a different
- file.
--->
-
-<service_bundle type='manifest' name='puppetagent'>
-
-<service
-	name='application/puppet/agent'
-	type='service'
-	version='1'>
-
-	<dependency
-		name='filesystem'
-		grouping='require_all'
-		restart_on='error'
-		type='service'>
-		    <service_fmri value='svc:/system/filesystem/minimal' />
-	</dependency>
-
-	<exec_method
-		type='method'
-		name='start'
-		exec='/lib/svc/method/puppet_agent %m'
-		timeout_seconds='600'>
-	</exec_method>
-
-	<exec_method
-		type='method'
-		name='stop'
-		exec=':kill'
-		timeout_seconds='60' >
-	</exec_method>
-
-	<property_group name='general' type='framework'>
-		<!-- to start stop puppet -->
-		<propval name='action_authorization' type='astring'
-		value='solaris.smf.manage.puppet' />
-		<!-- to change puppet properties -->
-		<propval name='value_authorization' type='astring'
-		value='solaris.smf.value.puppet' />
-	</property_group>
-
-	<instance name='default' enabled='false'>
-		<property_group name='config' type='application'>
-			<propval name='logdest' type='astring'
-			    value='/var/log/puppet/puppet-agent.log'/>
-			<propval name='server' type='host' value=''/>
-		</property_group>
-	</instance>
-
-	<stability value='Unstable' />
-
-	<template>
-		<common_name>
-			<loctext xml:lang='C'>
-			Puppet agent version 3.0.1
-			</loctext>
-		</common_name>
-		<documentation>
-			<manpage title='puppet-agent' section='8' manpath='/usr/share/man' />
-		</documentation>
-		<pg_pattern name='config' type='application' required='false'>
-			<prop_pattern name='server' type='host'
-			    required='false'>
-				<common_name>
-					<loctext xml:lang='C'>
-					Server name or IP address of puppet master
-					</loctext>
-				</common_name>
-			</prop_pattern>
-			<prop_pattern name='logdest' type='astring'
-			    required='false'>
-				<common_name>
-					<loctext xml:lang='C'>
-					Logfile destination
-					</loctext>
-				</common_name>
-			</prop_pattern>
-		</pg_pattern>
-	</template>
-</service>
-
-</service_bundle>
--- a/components/puppet/files/puppet-master.xml	Sat Jul 27 07:19:32 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
-<!--
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License (the "License").
- You may not use this file except in compliance with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
-
- Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
-
- NOTE:  This service manifest is not editable; its contents will
- be overwritten by package or patch operations, including
- operating system upgrade.  Make customizations in a different
- file.
--->
-
-<service_bundle type='manifest' name='puppetmaster'>
-
-<service
-	name='application/puppet/master'
-	type='service'
-	version='1'>
-
-	<dependency
-		name='filesystem'
-		grouping='require_all'
-		restart_on='error'
-		type='service'>
-		    <service_fmri value='svc:/system/filesystem/minimal' />
-	</dependency>
-
-	<exec_method
-		type='method'
-		name='start'
-		exec='/lib/svc/method/puppet_master %m'
-		timeout_seconds='600' >
-	</exec_method>
-
-	<exec_method
-		type='method'
-		name='stop'
-		exec=':kill'
-		timeout_seconds='60' >
-	</exec_method>
-
-	<property_group name='general' type='framework'>
-		<!-- to start stop puppet -->
-		<propval name='action_authorization' type='astring'
-		value='solaris.smf.manage.puppet' />
-		<!-- to change puppet properties -->
-		<propval name='value_authorization' type='astring'
-		value='solaris.smf.value.puppet' />
-	</property_group>
-
-	<instance name='default' enabled='false'>
-		<property_group name='config' type='application'>
-			<propval name='logdest' type='astring'
-			    value='/var/log/puppet/puppet-master.log'/>
-			<propval name='server' type='host' value=''/>
-		</property_group>
-	</instance>
-
-	<stability value='Unstable' />
-
-	<template>
-		<common_name>
-			<loctext xml:lang='C'>
-			Puppet master version 3.0.1
-			</loctext>
-		</common_name>
-		<documentation>
-			<manpage title='puppet-master' section='8' manpath='/usr/share/man' />
-		</documentation>
-		<pg_pattern name='config' type='application' required='false'>
-			<prop_pattern name='server' type='host'
-			    required='false'>
-				<common_name>
-					<loctext xml:lang='C'>
-					Server name or IP address of puppet master
-					</loctext>
-				</common_name>
-			</prop_pattern>
-			<prop_pattern name='logdest' type='astring'
-			    required='false'>
-				<common_name>
-					<loctext xml:lang='C'>
-					Logfile destination
-					</loctext>
-				</common_name>
-			</prop_pattern>
-		</pg_pattern>
-	</template>
-</service>
-
-</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/puppet.stencil	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,13 @@
+# WARNING: THIS FILE GENERATED FROM SMF DATA.
+#     DO NOT EDIT THIS FILE.  EDITS WILL BE LOST.
+#
+# See puppet.conf(5) and http://docs.puppetlabs.com/guides/configuring.html
+# for details.
+; walk each instance and extract all properties from the config PG
+$%/(svc:/$%s:(.*)/:properties)/ {
+$%{$%1/general/enabled:?
+[$%2]
+$%/$%1/config/(.*)/ {
+$%3 = $%{$%1/config/$%3} }
+}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/puppet.xml	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,1323 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+ CDDL HEADER START
+
+ The contents of this file are subject to the terms of the
+ Common Development and Distribution License (the "License").
+ You may not use this file except in compliance with the License.
+
+ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ or http://www.opensolaris.org/os/licensing.
+ See the License for the specific language governing permissions
+ and limitations under the License.
+
+ When distributing Covered Code, include this CDDL HEADER in each
+ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ If applicable, add the following below this CDDL HEADER, with the
+ fields enclosed by brackets "[]" replaced with your own identifying
+ information: Portions Copyright [yyyy] [name of copyright owner]
+
+ CDDL HEADER END
+
+ Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+
+ NOTE:  This service manifest is not editable; its contents will
+ be overwritten by package or patch operations, including
+ operating system upgrade.  Make customizations in a different
+ file.
+-->
+
+<service_bundle type='manifest' name='puppet'>
+
+<service
+    name='application/puppet'
+    type='service'
+    version='1'>
+
+    <dependency
+        name='filesystem'
+        grouping='require_all'
+        restart_on='error'
+        type='service'>
+            <service_fmri value='svc:/system/filesystem/minimal' />
+    </dependency>
+
+    <exec_method type='method' name='stop' exec=':kill' timeout_seconds='60' />
+
+    <property_group name='general' type='framework'>
+        <!-- to start stop puppet -->
+        <propval name='action_authorization' type='astring'
+        value='solaris.smf.manage.puppet' />
+        <!-- to change puppet properties -->
+        <propval name='value_authorization' type='astring'
+        value='solaris.smf.value.puppet' />
+    </property_group>
+
+    <property_group name='puppet_stencil' type='configfile'>
+        <propval name='path' type='astring' value='/etc/puppet/puppet.conf'/>
+        <propval name='stencil' type='astring' value='puppet.stencil'/>
+        <propval name='mode' type='astring' value='0444'/>
+    </property_group>
+
+    <instance name='master' enabled='false'>
+      <exec_method type='method' name='start'
+        exec='/usr/sbin/puppet master --logdest %{config/logdest}'
+        timeout_seconds='600' />
+
+        <property_group name='config' type='application'>
+            <propval name='logdest' type='astring'
+                value='/var/log/puppet/puppet-master.log'/>
+        </property_group>
+    </instance>
+
+    <instance name='agent' enabled='false'>
+      <exec_method type='method' name='start'
+        exec='/usr/sbin/puppet agent --logdest %{config/logdest}'
+        timeout_seconds='600' />
+
+        <property_group name='config' type='application'>
+            <propval name='logdest' type='astring'
+                value='/var/log/puppet/puppet-agent.log'/>
+        </property_group>
+    </instance>
+
+    <stability value='Unstable' />
+
+    <template>
+        <common_name>
+            <loctext xml:lang='C'>
+            Puppet version 3.1.1
+            </loctext>
+        </common_name>
+        <documentation>
+            <manpage title='puppet-master' section='8' manpath='/usr/share/man' />
+        </documentation>
+        <pg_pattern name='config' type='application' required='false'>
+            <prop_pattern name='server' type='host'
+                required='false'>
+                <common_name>
+                    <loctext xml:lang='C'>
+                    Server name or IP address of puppet master
+                    </loctext>
+                </common_name>
+            </prop_pattern>
+            <prop_pattern name='logdest' type='astring'
+                required='false'>
+                <common_name>
+                    <loctext xml:lang='C'>
+                    Logfile destination
+                    </loctext>
+                </common_name>
+            </prop_pattern>
+                <prop_pattern name='agent_catalog_run_lockfile' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                             A lock file to indicate agent catalog run in progress
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='agent_disabled_lockfile' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                             A lock file to indicate disabled puppet agent
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='allow_duplicate_certs' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to allowing duplication of existing certificates
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='allow_variables_with_dashes' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Permit hyphens in variable name. Always set it to False
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='archive_file_server' type='host'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Allow archiving files on file bucket server
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='archive_files' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Permit to archive files whose contents are audited
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='async_storeconfigs' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Permit queueing system to provide asynchronous database integration
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='autoflush' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether log files should always flush to disk
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='autosign' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to enable autosign
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='bindaddress' type='net_address'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The address a listening server should bind to
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='bucketdir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where FileBucket files are stored
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ca' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether the master should function as a certificate authority
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ca_name' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The name to use the Certificate Authority certificate
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ca_port' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The port to use for the certificate authority
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ca_server' type='host'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Server to use for certificate authority requests
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ca_ttl' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The default TTL for new cetificates
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='cacert' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The CA certificate
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='cacrl' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The certificate revocation list for the CA
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='cadir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The root directory for the certificate authority
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='cakey' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The CA private key
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='capass' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The CA stores the password for the private key
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='caprivatedir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The CA stores private certificate information
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='capub' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The CA public key
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='catalog_cache_terminus' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Storing cached catalogs and valid values are json and yaml
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='catalog_format' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            What format to use to dump the catalog
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='catalog_terminus' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Location to access node catalogs
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='cert_inventory' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            A complete listing of all certificates
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='certdir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The certificate directory
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='certificate_expire_warning' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The window of time leading up to a certificate's expiration
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='certificate_revocation' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                             Whether Certificate revocation should be supported
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='certname' type='hostname'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The FQDN use to handle certificates
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='classfile' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The file in which agent stores a list of classes associated with the retrieved configuration
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='client_datadir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The directory in which serialized data is stored on the client
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='clientbucketdir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where FileBucket files are stores locally
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='clientyamldir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The directory in which client-side YAML data is stored
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='code' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Code to parse directly and only used by puppet
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='color' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Set colors when logging to the console
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='confdir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The main Puppet configuration directory
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='config' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The configuration file for the current puppet application
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='config_file_name' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The name of the puppet config file
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='config_version' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Process to determine configuration version
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='configprint' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Print the value of a specific configuration setting
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='configtimeout' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Duration for which client should wait for the configuration to retrived
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='couchdb_url' type='uri'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The url where the puppet couchdb database will be created
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='csrdir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where the CA stores certificate requests
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='deamonize' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Send the process into the background
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='data_binding_terminus' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where to retrive information about data
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dbadapter' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The type of database to use
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dbconnections' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The number of database connections for networked databases
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dblocation' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The database cache for client configurations
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dbmigrate' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to automatically migrate the database
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dbname' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The name of the database to use
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dbpassword' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The database password for caching
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dbport' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The database port for caching
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dbserver' type='host'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The database server for caching
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dbsocket' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The database socket location
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dbuser' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The database user for caching
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='default_file_terminus' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The default source for files if no server is given in a uri
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='deviceconfig' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Path to the device config file for puppet device
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='devicedir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The root directory of devices
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='diff' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The command diff to see difference between files
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='diff_args' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Arguments to pass to the diff command
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dns_alt_names' type='host'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The list of alternative DNS names to use for the local host
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='document_all' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Document all resources
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='dynamicfacts' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Facts that are dynamic
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='environment' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The environment puppet is running in
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='evaltrace' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                           Whether each resource should log when it is being evaluated
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='external_nodes' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            An external command that can produce node information
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='factpath' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where Puppet should look for facts
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='facts_terminus' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The node facts terminus
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='fileserverconfig' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where the fileserver configuration is stored
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='filetimeout' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The minimum time to wait between checking for updates in configuration files
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='freeze_main' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Freezes the main class, disallowing any code to be added to it
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='genconfig' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to just print a configuration to stdout and exit
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='genmanifest' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to just print a manifest to stdout and exit
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='graph' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to create dot graph files for different configuration graphs
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='graphdir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Location to store dot-outputted graphs
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='group' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The group puppet master should run as
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='hiera_config' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The hiera configuration file
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='hostcert' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where individual hosts store and look for their certificates
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='hostcrl' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where the host's certificate revocation list can be found
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='hostcsr' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where individual hosts store and look for their certificate requests
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='hostprivkey' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where individual hosts store and look for their private key
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='hostpubkey' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where individual hosts store and look for their public key
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='http_compression' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Allow http compression in REST communication with the master
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='http_proxy_host' type='host'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The HTTP proxy host to use for outgoing connections
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='http_proxy_port' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The HTTP proxy port to use for outgoing connections
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='httplog' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where the puppet agent web server logs
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ignorecache' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Ignore cache and always recomplie the configuration
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ignoreimport' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Allows the parser to continue without requiring all files referenced with import statements to exist
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ignoreschedules' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether puppet agent should ignore schedules
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='inventory_port' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The server which send facts
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='inventory_server' type='host'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The server which send facts
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='inventory_terminus' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Should usually be the same as the facts terminus
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='keylength' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The bit length of keys
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='lastrunfile' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Location where puppet agent stores the last run report summary
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='lastrunreport' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Location where puppet agent stores the last run report
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldapattrs' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The LDAP attributes to include when querying LDAP for nodes
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldapbase' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The search base for LDAP searches
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldapclassattrs' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The LDAP attributes to use to define Puppet classes
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldapparentattr' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The attribute to use to define the parent node
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldappassword' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The password to use to connect to LDAP
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldapport' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The LDAP port
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldapserver' type='host'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The LDAP server
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldapssl' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Set SSL to be used when searching for nodes
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldapstackedattrs' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Stacked LDAP attributes in a tree
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldapstring' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The search string used to find an LDAP node
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldaptls' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether TLS should be used when searching for nodes
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ldapuser' type='hostname'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The user to use to connect to LDAP
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='libdir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            An extra search for puppet
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='listen' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether puppet agent should listen for connections
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='localcacert' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where each client stores the CA certificate
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='localconfig' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where each client stores the CA certificate
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='logdir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The directory in which to store log files
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='manage_internal_files_permissions' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether puppet should manager the owner, group and mode of files it uses internally
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='manifest' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The entry-point manifest for puppet master
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='manifestdir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where puppet master look for its manifests
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='masterhttplog' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where puppet master web server logs
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='masterlog' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where puppet master logs
+                        </loctext> </description>
+                </prop_pattern>
+               <prop_pattern name='masterport' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Which port puppet master listens on
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='maximum_uid' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The maximum allowed UID
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='mkusers' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to create the necessary user and group that puppet agent will run as
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='module_repository' type='uri'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The module repository
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='module_working_dir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The directory into which module tool data is stored
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='modulepath' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The search path for modules, as a list of directories
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='name' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The name of the application, if we are running as one
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='node_cache_terminus' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            How to store cached nodes
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='node_name' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Puppet master determines the client's identity
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='node_name_fact' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The fact name used to determine the node name
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='node_name_value' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The explicit value used for the node name
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='node_terminus' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where to find information about nodes
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='noop' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether puppet agent should be run in noop mode
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='onetime' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Run the configuration once
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='passfile' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where puppet agent stores the password for its private key
+                        </loctext> </description>
+                </prop_pattern>
+        <prop_pattern name='path' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The shell search path
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='pidfile' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The file containing the PID of a running process
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='plugindest' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where puppet should store plugins that it pulls down from the central server
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='pluginsignore' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            What files to ignore when pulling down plugins
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='pluginsource' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Location to retrieve plugins
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='pluginsync' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether plugins should be synced with the central server
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='postrun_command' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            A command to run after every agent run
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='preferred_serialization_format' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The preferred means of serializing ruby instances
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='prerun_command' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            A command to run before every agrent run
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='privatedir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where the client stores private certificate information
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='privatekeydir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The private key directory
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='publickeydir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The public key directory
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='puppetdlog' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Which port puppet agent listens on
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='queue_source' type='uri'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Which type of queue to use for asynchronous processing
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='queue_type' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Which type of queue to use for asynchronous procesing
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='rails_loglevel' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The log level for Rails connections
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='railslog' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where Rails-specific logs are sent
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='report' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to send reports after every transaction
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='report_port' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The port to communicate with the report_server
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='report_server' type='host'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The server to send transcation reports to
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='reportdir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The directory in which to store reports received from the client
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='reportfrom' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The 'from' email address for the reports
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='reports' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The list of reports to generate
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='reporturl' type='uri'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The URL used by the http reports processor to send reports
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='req_bits' type='integer'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The bit length of the certificates
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='requestdir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where host certificate requests are stored
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='resourcefile' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The file in which puppet agent stores a list of the resources associated with the retrieved configuration
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='rest_authconfig' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The configuration file that defines the rights to the different rest indirections
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='route_file' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The YAML file containing indirector route configuration
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='rrddir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The directory where RRD database files are stored
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='rrdinterval' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Duration of how often RRD should expect data
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='rundir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where PuppetPID files are kept
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='runinterval' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Duration of how often puppet agent applies the client configuraiton
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='sendmail' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where to find the sendmail binary with which to send email
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='serial' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where the serial number for certificates is stored
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='server_datadir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The directory in which serialized data is stored
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='show_diff' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to log and report a contextual diff when files are being replaced
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='signeddir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where the CA stores signed certificates
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='smtpserver' type='host'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The server through which to send email reports
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='splay' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to sleep for a pseudo-random amount of time before a run
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='splaylimit' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The maximum time to delay before runs
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='srv_domain' type='host'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The domain which will be queried to find the SRV records of servers to use
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ssl_client_ca_auth' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Certificate authorities who issue server certificates
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ssl_client_header' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The header containing an authenticated client's SSL DN
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ssl_client_verify_header' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The header containing the status message of the client verification
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ssl_server_ca_auth' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Certificate authorities who issue client certificates
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='ssldir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where SSL ceritifcates are kept
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='statedir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The directory where Puppet state is stored
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='statefile' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where puppet agent and master store state associates with the running configuration
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='storeconfigs' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to store each client's configuration
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='storeconfigs_backend' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Configure the backend terminus used for StoreConfigs
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='strict_hostname_checking' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to only search for the complete hostname
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='summarize' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to print a transaction summary
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='syslogfacility' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            What syslog facility to use when logging to syslog
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='tagmap' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The mapping between reporting tags and email addresses
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='tags' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Tags to use to find resources
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='templatedir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where Puppet looks for template files
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='thin_storeconfigs' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether Puppet should store only facts and exported resources in the storeconfigs database
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='trace' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to print stacks traces on some errors
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='use_cached_catalog' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to only use the catalog rather than compiling a new catalog on every run
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='use_srv_records' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether the server will search for SRV records in DNS for the curent domain
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='usecacheonfailure' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to use the cached configuration when the remote configuration will not compile
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='user' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The user puppet master should run as
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='vardir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Where Puppet stores dynamic and growing data
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='waitforcert' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The time interval 'puppet agent' should connect to the server and ask it to sign a certificate request
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='yamldir' type='astring'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            The directory in which YAML data is stored, usually in a subdirectory
+                        </loctext> </description>
+                </prop_pattern>
+                <prop_pattern name='zlib' type='boolean'
+                    required='false'>
+                        <description> <loctext xml:lang='C'>
+                            Whether to use the zib library
+                        </loctext> </description>
+                </prop_pattern>
+        </pg_pattern>
+    </template>
+</service>
+
+</service_bundle>
--- a/components/puppet/files/puppet_agent	Sat Jul 27 07:19:32 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-#!/usr/bin/ksh -p
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
-#
-
-# Load SMF constants and functions
-. /lib/svc/share/smf_include.sh
-
-# Establish PATH for non-built in commands
-export PATH=/usr/bin:/usr/sbin
-
-case "$1" in
-'start')
-	# handles startup of puppet agent
-
-	flags=""
-
-	#
-	# retrieve the server property.  If the variable is left
-	# empty, do not add the --server flag to the CLI
-	#
-	server=$(svcprop -p config/server $SMF_FMRI)
-	if [[ $? -eq 0 ]] && [[ "$server" != '' ]]; then
-		flags+=" --server $server"
-	fi
-
-	# retrieve the logfile property.
-	logdest=$(svcprop -p config/logdest $SMF_FMRI)
-	if [[ "$logdest" != '' ]]; then
-		flags+=" --logdest $logdest"
-	fi
-
-	cmd="puppet agent ${flags}"
-
-	exec $cmd
-
-	;;
-*)
-	echo "Usage: $0 { start }"
-	exit $SMF_EXIT_ERR_CONFIG
-	;;
-esac
-exit $SMF_EXIT_OK
--- a/components/puppet/files/puppet_master	Sat Jul 27 07:19:32 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-#!/usr/bin/ksh -p
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
-#
-
-# Load SMF constants and functions
-. /lib/svc/share/smf_include.sh
-
-# Establish PATH for non-built in commands
-export PATH=/usr/bin:/usr/sbin
-
-case "$1" in
-'start')
-	# handles startup of puppet master
-
-	flags=""
-
-	#
-	# retrieve the server property.  If the variable is left
-	# empty, do not add the --server flag to the CLI
-	#
-	server=$(svcprop -p config/server $SMF_FMRI)
-	if [[ $? -eq 0 ]] && [[ "$server" != '' ]]; then
-		flags+=" --server $server"
-	fi
-
-	# retrieve the logfile property.
-	logdest=$(svcprop -p config/logdest $SMF_FMRI)
-	if [[ "$logdest" != '' ]]; then
-		flags+=" --logdest $logdest"
-	fi
-
-	cmd="puppet master ${flags}"
-	exec $cmd
-
-	;;
-*)
-	echo "Usage: $0 { start }"
-	exit $SMF_EXIT_ERR_CONFIG
-	;;
-esac
-exit $SMF_EXIT_OK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/address_object/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,150 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:address_object).provide(:address_object) do
+    desc "Provider for creating Oracle Solaris address objects"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :ipadm => '/usr/sbin/ipadm'
+
+    def self.instances
+        ipadm("show-addr", "-p", "-o", "addrobj,type,state,addr").split(
+              "\n").collect do |line|
+            addrobj, type, state, addr = line.split(":", 4)
+
+            # replace any hypen with an underscore
+            type = type.gsub(/\-/, "_")
+
+            # look to see if this is a point-to-point address object
+            if addr.include?("->")
+                local, remote = addr.split("->")
+                local = locale.delete("\\")
+                remote = remote.delete("\\")
+            elsif type.downcase == "dhcp" and addr == "?"
+                local = nil
+                remote = nil
+            else
+                local = addr.delete("\\")
+                remote = nil
+            end
+
+            if state == "ok"
+                enable = :true
+            else
+                enable = :false
+            end
+
+            new(:name => addrobj,
+                :ensure => :present,
+                :address_type => type,
+                :enable => enable,
+                :address => local,
+                :remote_address => remote)
+        end
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        addrobjs = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = addrobjs.find{ |addrobj| addrobj.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    # property getters
+    Puppet::Type.type(:address_object).validproperties.each do |field|
+        next if field == :ensure
+        define_method(field) do
+            @property_hash[field]
+        end
+    end
+
+    def add_options
+        options = []
+        if @resource[:temporary] == :true
+            options << "-t"
+        end
+
+        if address_type = @resource[:address_type]
+            options << "-T" << address_type
+        end
+
+        if address = @resource[:address]
+            options << "-a" << "local=#{address}"
+        end
+
+        if remote_address = @resource[:remote_address]
+            options << "-a" << "remote=#{remote_address}"
+        end
+
+        if down = @resource[:down]
+            options << "-d" << down
+        end
+
+        if seconds = @resource[:seconds]
+            options << "-w" << seconds
+        end
+
+        if hostname = @resource[:hostname]
+            options << "-h" << hostname
+        end
+
+        if interface_id = @resource[:interface_id]
+            options << "-i" << "local=#{interface_id}"
+        end
+
+        if remote_interface_id = @resource[:remote_interface_id]
+            options << "-i" << "remote=#{remote_interface_id}"
+        end
+
+        if stateful = @resource[:stateful]
+            options << "-p" << "stateful=#{stateful}"
+        end
+
+        if stateless = @resource[:stateless]
+            options << "-p" << "stateless=#{stateless}"
+        end
+        options
+    end
+
+    def exists?
+        @property_hash[:ensure] == :present
+    end
+
+    def create
+        ipadm("create-addr", add_options, @resource[:name])
+        if @resource[:enable] == :true
+            ipadm("enable-addr", @resource[:name])
+        end
+    end
+
+    def destroy
+        ipadm("delete-addr", @resource[:name])
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/address_properties/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,113 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:address_properties).provide(:address_properties) do
+    desc "Provider for managing Oracle Solaris address object properties"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :ipadm => '/usr/sbin/ipadm'
+
+    def initialize(value={})
+        super(value)
+        @addrprops = {}
+    end
+
+    def self.instances
+        props = {}
+
+        ipadm("show-addrprop", "-c", "-o", "ADDROBJ,PROPERTY,CURRENT").split(
+              "\n").collect do |line|
+            addrobj, property, value = line.strip().split(":")
+            next if value == nil
+            if not props.has_key? addrobj
+                props[addrobj] = {}
+            end
+            props[addrobj][property] = value
+        end
+
+        addresses = []
+        props.each do |key, value|
+            addresses << new(:name => key,
+                             :ensure => :present,
+                             :properties => value)
+        end
+        addresses
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        props = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = props.find{ |prop| prop.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    def properties
+        @property_hash[:properties]
+    end
+
+    def properties=(value)
+        value.each do |key, value|
+            ipadm("set-addrprop", "-p", "#{key}=#{value}", @resource[:name])
+        end
+    end
+
+    def exists?
+        if @resource[:properties] == nil
+            return :false
+        end
+
+        @resource[:properties].each do |key, value|
+            p = exec_cmd(command(:ipadm), "show-addrprop","-c", "-p", key,
+                         "-o", "CURRENT", @resource[:address])
+            if p[:exit] == 1
+                Puppet.warning "Property '#{key}' not found for address " \
+                               "#{@resource[:address]}"
+                next
+            end
+
+            if p[:out].strip != value
+                @addrprops[key] = value
+            end
+        end
+
+        return @addrprops.empty?
+    end
+
+    def create
+        @addrprops.each do |key, value|
+            ipadm("set-addrprop", "-p", "#{key}=#{value}", @resource[:address])
+        end
+    end
+
+    def exec_cmd(*cmd)
+        output = Puppet::Util::Execution.execute(cmd, :failonfail => false)
+        {:out => output, :exit => $CHILD_STATUS.exitstatus}
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/boot_environment/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,136 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:boot_environment).provide(:boot_environment) do
+    desc "Provider for Oracle Solaris Boot Environments (BEs)"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :beadm => '/usr/sbin/beadm', :zpool => '/usr/sbin/zpool'
+
+    def self.instances
+        beadm(:list, "-H").split("\n").collect do |line|
+            data = line.split(";")
+            name = data[0]
+            if data[2].include? "R"
+                activate = :true
+            else
+                activate = :false
+            end
+
+            new(:name => name,
+                :ensure => :present,
+                :activate => activate)
+        end
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        bes = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = bes.find{ |be| be.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    def activate
+        @property_hash[:activate]
+    end
+
+    def activate=(value)
+        if value == :true
+            beadm("activate", @resource[:name])
+        end
+    end
+
+    def exists?
+        @property_hash[:ensure] == :present
+    end
+
+    def build_flags
+        flags = []
+
+        if description = @resource[:description]
+            flags << "-d" << "'#{description}'"
+        end
+
+        if clone_be = @resource[:clone_be]
+            if clone_be.include? "@"
+                if beadm(:list, "-H", "-s").split("\n").detect \
+                    { |line| line.split(";")[1] == clone_be }
+                        flags << "-e" << clone_be
+                else
+                    Puppet.warning "BE #{clone_be} not found.  Skipping -e
+                                    argument."
+                end
+            else
+                if beadm(:list, "-H").split("\n").detect \
+                    { |line| line.split(";")[0] == clone_be }
+                        flags << "-e" << clone_be
+                else
+                    Puppet.warning "BE #{clone_be} not found.  Skipping -e 
+                                    argument."
+                end
+            end
+        end
+
+        if options = @resource[:options]
+            options.each { |key, value| flags << "-o" << "#{key}=#{value}" }
+        end
+
+        if zp = @resource[:zpool]
+            found = false
+            for line in zpool(:list, "-o", "name", "-H") do
+                if zp == line.strip
+                    found = true
+                    flags << "-p" << zp
+                end
+            end
+            if not found
+                raise Puppet::Error, \
+                    "Unable to create BE in zpool #{zp} -- #{zp} does not exist"
+            end
+        end
+        flags
+    end
+
+    def create
+        beadm(:create, build_flags, @resource[:name])
+        if @resource[:activate] == :true
+            beadm(:activate, @resource[:name])
+        end
+    end
+
+    def destroy
+        if beadm(:list, "-H", @resource[:name]).split(";")[2] =~ /N/
+            Puppet.warning "Unable to destroy #{@resource[:name]} as it is 
+                            the active BE."
+        else
+            beadm(:destroy, "-f", "-F", @resource[:name])
+        end
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/dns/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,80 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:dns).provide(:dns) do
+    desc "Provider for management of DNS for Oracle Solaris"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :svccfg => '/usr/sbin/svccfg', :svcprop => '/usr/bin/svcprop'
+
+    class << self; attr_accessor :dns_fmri end
+    @@dns_fmri = "svc:/network/dns/client"
+
+    def self.instances
+        props = {}
+        svcprop("-p", "config", @@dns_fmri).split("\n").each do |line|
+            fullprop, type, value = line.split(" ", 2)
+            pg, prop = fullprop.split("/")
+            props[prop] = value \
+                if Puppet::Type.type(:dns).validproperties.include? prop
+        end
+
+        props[:name] = "current"
+        return Array new(props)
+    end
+
+    Puppet::Type.type(:dns).validproperties.each do |field|
+        define_method(field) do
+            begin
+                svcprop("-p", "config/" + field.to_s, @@dns_fmri).strip()
+            rescue
+                # if the property isn't set, don't raise an error
+                nil
+            end
+        end
+
+        define_method(field.to_s + "=") do |should|
+            begin
+                if should.is_a? Array
+                    # the first entry needs the open paren and the last entry
+                    # needs the close paren
+                    should[0] = "(" + should[0]
+                    should[-1] = should[-1] + ")"
+
+                    svccfg("-s", @@dns_fmri, "setprop",
+                           "config/" + field.to_s, "=", should)
+                else
+                    svccfg("-s", @@dns_fmri, "setprop",
+                           "config/" + field.to_s, "=", '"' + should + '"')
+                end
+                svccfg("-s", @@dns_fmri, "refresh")
+            rescue => detail
+                raise Puppet::Error,
+                    "Unable to set #{field.to_s} to #{should.inspect}\n"
+                    "#{detail}\n"
+            end
+        end
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/etherstub/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,71 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:etherstub).provide(:etherstub) do
+    desc "Provider for creating Solaris etherstubs"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :dladm => '/usr/sbin/dladm'
+
+    def self.instances
+        dladm("show-etherstub", "-p", "-o", "link").split(
+              "\n").collect do |line|
+            link = line.strip()
+            new(:name => link, :ensure => :present)
+        end
+    end
+
+    def add_options
+        options = []
+        if @resource[:temporary] == :true
+            options << "-t"
+        end
+        options
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        etherstubs = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = etherstubs.find{ |etherstub| etherstub.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    def exists?
+        @property_hash[:ensure] == :present
+    end
+
+    def create
+        dladm("create-etherstub", add_options, @resource[:name])
+    end
+
+    def destroy
+        dladm("delete-etherstub", add_options, @resource[:name])
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/interface_properties/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,117 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:interface_properties).provide(:interface_properties) do
+    desc "Provider for managing Oracle Solaris interface properties"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :ipadm => '/usr/sbin/ipadm'
+
+    def initialize(value={})
+        super(value)
+        @ifprops = {}
+    end
+
+    def self.instances
+        props = {}
+
+        ipadm("show-ifprop", "-c", "-o",
+              "IFNAME,PROPERTY,PROTO,CURRENT").split("\n").collect do |line|
+            ifname, property, proto, value = line.strip().split(":")
+            fullname = ifname + "/" + proto
+            if not props.has_key? fullname
+                props[fullname] = {}
+            end
+            props[fullname][property] = value
+        end
+
+        interfaces = []
+        props.each do |key, value|
+            interfaces << new(:name => key,
+                              :ensure => :present,
+                              :properties => value)
+        end
+        interfaces
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        props = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = props.find{ |prop| prop.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    def properties
+        @property_hash[:properties]
+    end
+
+    def properties=(value)
+        value.each do |key, value|
+            ipadm("set-ifprop", "-p", "#{key}=#{value}", @resource[:name])
+        end
+    end
+
+    def exists?
+        if @resource[:properties] == nil
+            return :false
+        end
+
+        ifname, protocol = @resource[:interface].split("/")
+
+        @resource[:properties].each do |key, value|
+            p = exec_cmd(command(:ipadm), "show-ifprop", "-m", protocol,
+                         "-p", key, "-c", "-o", "CURRENT", ifname)
+
+            if p[:exit] == 1
+                Puppet.warning "Property '#{key}' not found for interface
+                                #{ifname}"
+                next
+            end
+
+            if p[:out].strip != value
+                @ifprops[key] = value
+            end
+        end
+
+        return @ifprops.empty?
+    end
+
+    def create
+        name, proto = @resource[:interface].split("/")
+        @ifprops.each do |key, value|
+            ipadm("set-ifprop", "-m", proto, "-p", "#{key}=#{value}", name)
+        end
+    end
+
+    def exec_cmd(*cmd)
+        output = Puppet::Util::Execution.execute(cmd, :failonfail => false)
+        {:out => output, :exit => $CHILD_STATUS.exitstatus}
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/ip_interface/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,62 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:ip_interface).provide(:ip_interface) do
+    desc "Provider for management of IP interfaces for Oracle Solaris"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :ipadm => '/usr/sbin/ipadm'
+
+    def self.instances
+        # iterate over all interfaces, skipping loopback interfaces
+        ipadm("show-if", "-p", "-o", "IFNAME,CLASS").split(
+              "\n").reject{ |line| line.include? "loopback"}.collect do |line|
+            name, ip_class = line.split(":")
+            new(:name => name,
+                :ensure => :present)
+        end
+    end
+
+    def add_options
+       options = []
+       if @resource[:temporary] == :true
+         options << "-t"
+       end
+       options
+    end
+
+    def exists?
+        ipadm("show-if", "-p", "-o", "IFNAME").split(
+              "\n").include? @resource[:name]
+    end
+
+    def create
+        ipadm('create-ip', add_options, @resource[:name])
+    end
+
+    def destroy
+        ipadm('delete-ip', @resource[:name])
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/ip_tunnel/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,103 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:ip_tunnel).provide(:ip_tunnel) do
+    desc "Provider for managing Oracle Solaris IP Tunnel links"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :dladm => '/usr/sbin/dladm'
+
+    def self.instances
+        dladm("show-iptun", "-p", "-o", "link,type,local,remote").split(
+              "\n").collect do |line|
+            link, type, local, remote = line.split(":")
+            new(:name => link,
+                :ensure => :present,
+                :tunnel_type => type,
+                :local_address => local,
+                :remote_address => remote)
+        end
+    end
+        
+    def self.prefetch(resources)
+        # pull the instances on the system
+        ip_tunnels = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = ip_tunnels.find{ |ip_tunnel| ip_tunnel.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    [:tunnel_type, :local_address, :remote_address].each do |field|
+        define_method(field) do
+            begin
+                @property_hash[field]
+            end
+        end
+    end
+
+    def local_address=(value)
+        dladm("modify-iptun", "-a", "local=#{value}", @resource[:name])
+    end
+
+    def remote_address=(value)
+        dladm("modify-iptun", "-a", "remote=#{value}", @resource[:name])
+    end
+
+    def add_options
+       options = []
+       if @resource[:temporary] == :true
+         options << "-t"
+       end
+
+       if tunnel_type = @resource[:tunnel_type] and tunnel_type != nil
+           options << "-T" << resource[:tunnel_type]
+       end
+
+       if local = @resource[:local_address] and local != nil
+           options << "-a" << "local=#{local}"
+       end
+
+       if remote = @resource[:remote_address] and remote != nil
+           options << "-a" << "remote=#{remote}"
+       end
+       options
+    end
+
+    def exists?
+        @property_hash[:ensure] == :present
+    end
+
+    def create
+        dladm('create-iptun', add_options, @resource[:name])
+    end
+
+    def destroy
+        dladm('delete-iptun', @resource[:name])
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/ipmp_interface/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,108 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:ipmp_interface).provide(:ipmp_interface) do
+    desc "Provider for management of IPMP interfaces for Oracle Solaris"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :ipadm => '/usr/sbin/ipadm'
+
+    def self.instances
+        ifaces = []
+        ipadm("show-if", "-p", "-o", "IFNAME,CLASS,OVER").split(
+              "\n").each do |line|
+            name, linkclass, over = line.strip().split(":", 3)
+            next if linkclass != "ipmp"
+            ifaces << new(:name => name.strip(),
+                          :ensure => :present,
+                          :interfaces => over)
+        end
+        ifaces
+    end
+        
+    def self.prefetch(resources)
+        # pull the instances on the system
+        ifaces = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = ifaces.find{ |iface| iface.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    def interfaces
+        @property_hash[:interfaces]
+    end
+
+    def interfaces=(value)
+        current = self.interfaces.split()
+
+        remove_list = []
+        for entry in current - value
+            remove_list << "-i" << entry
+        end
+
+        add_list = []
+        for entry in value - current
+            add_list << "-i" << entry
+        end
+
+        if not add_list.empty?
+            ipadm("add-ipmp", add_list, @resource[:name])
+        end
+
+        if not remove_list.empty?
+            ipadm("remove-ipmp", remove_list, @resource[:name])
+        end
+    end
+
+    def add_options
+        options = []
+        if @resource[:temporary] == :true
+            options << "-t"
+        end
+        for iface in @resource[:interfaces] do
+            options << "-i" << iface
+        end
+        options
+    end
+
+    def exists?
+        @property_hash[:ensure] == :present
+    end
+
+    def create
+        ipadm('create-ipmp', add_options, @resource[:name])
+    end
+
+    def destroy
+        for iface in self.interfaces do
+            ipadm("remove-ipmp", "-i", iface, @resource[:name])
+        end
+        ipadm('delete-ipmp', @resource[:name])
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/ldap/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,103 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:ldap).provide(:ldap) do
+    desc "Provider for management of the LDAP client for Oracle Solaris"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :svccfg => '/usr/sbin/svccfg', :svcprop => '/usr/bin/svcprop'
+
+    class << self; attr_accessor :ldap_fmri end
+    @@ldap_fmri = "svc:/network/ldap/client"
+
+    def self.instances
+        if Process.euid != 0
+            return []
+        end
+        props = {}
+        validprops = Puppet::Type.type(:ldap).validproperties
+
+        svcprop("-p", "config", @@ldap_fmri).split("\n").collect do |line|
+            data = line.split()
+            fullprop = data[0]
+            type = data[1]
+            if data.length > 2
+                value = data[2..-1].join(" ")
+            else
+                value = nil
+            end
+
+            pg, prop = fullprop.split("/")
+
+            # handle the domainname differently as it's not in validprops
+            if prop == "profile"
+                props[:name] = value
+            else
+                props[prop] = value if validprops.include? prop.to_sym
+            end
+        end
+        props[:bind_passwd] = svcprop("-p", "cred/bind_passwd",
+                                      "svc:/network/ldap/client").strip
+        return Array new(props)
+    end
+
+    Puppet::Type.type(:ldap).validproperties.each do |field|
+        # get the property group
+        pg = Puppet::Type.type(:ldap).propertybyname(field).pg
+        define_method(field) do
+            begin
+                svcprop("-p", pg + "/" + field.to_s, @@ldap_fmri).strip()
+            rescue
+                # if the property isn't set, don't raise an error
+                nil
+            end
+        end
+
+        define_method(field.to_s + "=") do |should|
+            begin
+                if should.is_a? Array
+                    should.collect! { |value| value.to_s }
+
+                    # the first entry needs the open paren and the last entry
+                    # needs the close paren
+                    should[0] = "(" + should[0]
+                    should[-1] = should[-1] + ")"
+
+                    svccfg("-s", @@ldap_fmri, "setprop",
+                           pg + "/" + field.to_s, "=", should)
+                else
+                    svccfg("-s", @@ldap_fmri, "setprop",
+                           pg + "/" + field.to_s, "=", should.to_s)
+                end
+                svccfg("-s", @@ldap_fmri, "refresh")
+            rescue => detail
+                raise Puppet::Error,
+                    "Unable to set #{field.to_s} to #{should.inspect}\n"
+                    "#{detail}\n"
+            end
+        end
+
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/link_aggregation/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,186 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:link_aggregation).provide(:link_aggregation) do
+    desc "Provider for creating Oracle Solaris link aggregations"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :dladm => '/usr/sbin/dladm'
+
+    def self.instances
+        dladm("show-aggr", "-p", "-o",
+              "link,mode,policy,addrpolicy,lacpactivity,lacptimer").split(
+              "\n").collect do |line|
+            link, mode, policy, addrpolicy, lacpactivity, lacptimer = \
+                line.split(":")
+
+            links = []
+            dladm("show-aggr", "-x", "-p", "-o", "port").split(
+                  "\n").each do |portline|
+                next if portline.strip() == ""
+                links << portline.strip()
+            end
+
+            new(:name => link,
+                :ensure => :present,
+                :lower_links => links.join(" "),
+                :mode => mode,
+                :policy => policy,
+                :address => addrpolicy,
+                :lacpmode => lacpactivity,
+                :lacptimer => lacptimer)
+        end
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        aggrs = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = aggrs.find{ |aggr| aggr.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    # property getters
+    [:lower_links, :mode, :policy, :lacpmode, :lacptimer,
+     :address].each do |field|
+        define_method(field) do
+            @property_hash[field]
+        end
+    end
+
+    # property setters
+    def lower_links=(value)
+        is_temporary?(@resource[:name])
+        current = self.lower_links.split()
+        remove_list = []
+        for entry in current - value
+            remove_list << "-l" << entry
+        end
+
+        add_list = []
+        for entry in value - current
+            add_list << "-l" << entry
+        end
+
+        if not add_list.empty?
+            dladm("add-aggr", add_list, @resource[:name])
+        end
+
+        if not remove_list.empty?
+            dladm("remove-aggr", remove_list, @resource[:name])
+        end
+    end
+
+    def mode=(value)
+        is_temporary?(@resource[:name])
+        dladm("modify-aggr", "-m", value, @resource[:name])
+    end
+
+    def policy=(value)
+        is_temporary?(@resource[:name])
+        dladm("modify-aggr", "-P", value, @resource[:name])
+    end
+
+    def lacpmode=(value)
+        is_temporary?(@resource[:name])
+        dladm("modify-aggr", "-L", value, @resource[:name])
+    end
+
+    def lacptimer=(value)
+        is_temporary?(@resource[:name])
+        dladm("modify-aggr", "-T", value, @resource[:name])
+    end
+
+    def address=(value)
+        is_temporary?(@resource[:name])
+        dladm("modify-aggr", "-u", value, @resource[:name])
+    end
+
+    def add_options
+        options = []
+        if @resource[:temporary] == :true
+            options << "-t"
+        end
+
+        if lowerlinks = @resource[:lower_links]
+            if lowerlinks.is_a? Array
+                for link in lowerlinks
+                    options << "-l" << link
+                end
+            else
+                options << "-l" << lowerlinks
+            end
+        end
+
+        if mode = @resource[:mode]
+            options << "-m" << mode
+        end
+
+        if policy = @resource[:policy]
+            options << "-P" << policy
+        end
+
+        if lacpmode = @resource[:lacpmode]
+            options << "-L" << lacpmode
+        end
+
+        if lacptimer = @resource[:lacptimer]
+            options << "-T" << lacptimer
+        end
+
+        if address = @resource[:address]
+            options << "-u" << address
+        end
+        options
+    end
+
+    def exists?
+        @property_hash[:ensure] == :present
+    end
+
+    def create
+        dladm("create-aggr", add_options, @resource[:name])
+    end
+
+    def destroy
+        dladm("delete-aggr", add_options, @resource[:name])
+    end
+
+    def is_temporary?(name)
+        p = exec_cmd(command(:dladm), "show-aggr", "-P", name)
+        raise Puppet::Error, "Unable to change attributes of temporary " \
+            "aggregation #{@resource[:name]}" if p[:exit] == 1
+    end
+
+    def exec_cmd(*cmd)
+        output = Puppet::Util::Execution.execute(cmd, :failonfail => false)
+        {:out => output, :exit => $CHILD_STATUS.exitstatus}
+    end
+end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/link_properties/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,106 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:link_properties).provide(:link_properties) do
+    desc "Provider for managing Oracle Solaris link properties"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :dladm => '/usr/sbin/dladm'
+
+    def initialize(value={})
+        super(value)
+        @linkprops = {}
+    end
+
+    def self.instances
+        dladm("show-link", "-p", "-o", "link").
+        split("\n").collect do |link|
+            props = {}
+            dladm("show-linkprop", "-c", "-o", "property,value",
+                  link.strip()).split("\n").collect do |line|
+                next if line.strip.end_with? ":"
+                data = line.split(":", 2)
+                name, value = data
+                props[name] = value.delete("\\")  # remove the escape character
+            end
+
+            new(:name => link.strip(),
+                :ensure => :present,
+                :properties => props)
+        end
+    end
+
+    def properties
+        @property_hash[:properties]
+    end
+
+    def properties=(value)
+        value.each do |key, value|
+            dladm("set-linkprop", "-p", "#{key}=#{value}", @resource[:name])
+        end
+    end
+
+    def add_properties
+        return [] if not @linkprops
+        if @linkprops
+            a = []
+            @linkprops.each do |key, value|
+                a << "#{key}=#{value}"
+            end
+        end
+        properties = Array["-p", a.join(",")]
+    end
+
+    def exists?
+        if @resource[:properties] == nil
+            return :false
+        end
+
+        @resource[:properties].each do |key, value|
+            p = exec_cmd(command(:dladm), "show-linkprop", @resource[:link],
+                         "-c", "-p", key, "-o", "value")
+            if p[:exit] == 1
+                Puppet.warning "Property '#{key}' not found for link " \
+                               "#{@resource[:link]}"
+                next
+            end
+
+            if p[:out].strip != value
+                @linkprops[key] = value
+            end
+        end
+
+        return @linkprops.empty?
+    end
+
+    def create
+        dladm("set-linkprop", add_properties, @resource[:link])
+    end
+
+    def exec_cmd(*cmd)
+        output = Puppet::Util::Execution.execute(cmd, :failonfail => false)
+        {:out => output, :exit => $CHILD_STATUS.exitstatus}
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/nis/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,121 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:nis).provide(:nis) do
+    desc "Provider for management of NIS client for Oracle Solaris"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :svccfg => '/usr/sbin/svccfg', :svcprop => '/usr/bin/svcprop'
+
+    class << self; attr_accessor :client_fmri, :domain_fmri end
+    @@client_fmri = "svc:/network/nis/client"
+    @@domain_fmri = "svc:/network/nis/domain"
+
+    def self.instances
+        props = {}
+        validprops = Puppet::Type.type(:nis).validproperties
+
+        [@@client_fmri, @@domain_fmri].each do |svc|
+            svcprop("-p", "config", svc).split("\n").collect do |line|
+                data = line.split()
+                fullprop = data[0]
+                type = data[1]
+                if data.length > 2
+                    value = data[2..-1].join(" ")
+                else
+                    value = nil
+                end
+
+                pg, prop = fullprop.split("/")
+
+                # handle the domainname differently as it's not in validprops
+                if prop == "domainname"
+                    props[:name] = value
+                else
+                    props[prop] = value if validprops.include? prop.to_sym
+                end
+            end
+        end
+        return Array new(props)
+    end
+
+    # svc:/network/nis/client properties
+    [:use_broadcast, :use_ypsetme].each do |field|
+        define_method(field) do
+            begin
+                svcprop("-p", "config/" + field.to_s, @@client_fmri).strip()
+            rescue
+                # if the property isn't set, don't raise an error
+                nil
+            end
+        end
+
+        define_method(field.to_s + "=") do |should|
+            begin
+                svccfg("-s", @@client_fmri, "setprop", "config/" + field.to_s,
+                       "=", '"' + should.to_s + '"')
+                svccfg("-s", @@client_fmri, "refresh")
+            rescue => detail
+                raise Puppet::Error,
+                    "Unable to set #{field.to_s} to #{should.inspect}\n"
+                    "#{detail}\n"
+            end
+        end
+    end
+
+    # svc:/network/nis/domain properties
+    [:domainname, :ypservers, :securenets].each do |field|
+        define_method(field) do
+            begin
+                svcprop("-p", "config/" + field.to_s, @@domain_fmri).strip()
+            rescue
+                # if the property isn't set, don't raise an error
+                nil
+            end
+        end
+
+        define_method(field.to_s + "=") do |should|
+            begin
+                if should.is_a? Array
+                    # the first entry needs the open paren and the last entry
+                    # needs the close paren
+                    should[0] = "(" + should[0]
+                    should[-1] = should[-1] + ")"
+
+                    svccfg("-s", @@domain_fmri, "setprop",
+                           "config/" + field.to_s, "=", should)
+                else
+                    svccfg("-s", @@domain_fmri, "setprop",
+                           "config/" + field.to_s, "=", '"' + should + '"')
+                end
+                svccfg("-s", @@domain_fmri, "refresh")
+            rescue => detail
+                raise Puppet::Error,
+                    "Unable to set #{field.to_s} to #{should.inspect}\n"
+                    "#{detail}\n"
+            end
+        end
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/nsswitch/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,72 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:nsswitch).provide(:nsswitch) do
+    desc "Provider for name service switch configuration data"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :svccfg => '/usr/sbin/svccfg', :svcprop => '/usr/bin/svcprop'
+
+    class << self; attr_accessor :nsswitch_fmri end
+    @@nsswitch_fmri = "svc:/system/name-service/switch"
+
+    def self.instances
+        props = {}
+        svcprop("-p", "config", @@frmi).split("\n").collect do |line|
+            fullprop, type, value = line.split(" ", 2)
+            pg, prop = fullprop.split("/")
+            props[prop] = value \
+                if Puppet::Type.type(:nsswitch).validproperties.include? prop
+        end
+
+        props[:name] = "current"
+        return Array new(props)
+    end
+
+    Puppet::Type.type(:nsswitch).validproperties.each do |field|
+        define_method(field) do
+            begin
+                out = svcprop("-p", "config/" + field.to_s,
+                              @@nsswitch_fmri).strip()
+                out = out.delete("\\")
+            rescue
+                # if the property isn't set, don't raise an error
+                nil
+            end
+        end
+
+        define_method(field.to_s + "=") do |should|
+            begin
+                svccfg("-s", @@nsswitch_fmri, "setprop",
+                       "config/" + field.to_s, "=", '"' + should + '"')
+                svccfg("-s", @@nsswitch_fmri, "refresh")
+            rescue => detail
+                raise Puppet::Error,
+                    "Unable to set #{field.to_s} to #{should.inspect}\n"
+                    "#{detail}\n"
+            end
+        end
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/pkg_facet/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,77 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:pkg_facet).provide(:pkg_facet) do
+    desc "Provider for Oracle Solaris facets"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :pkg => '/usr/bin/pkg'
+
+    def self.instances
+        pkg(:facet, "-H", "-F", "tsv").split("\n").collect do |line|
+            name, value = line.split
+            new(:name => name,
+                :ensure => :present,
+                :value => value.downcase)
+        end 
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        facets = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = facets.find{ |facet| facet.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    def value
+        @property_hash[:value]
+    end
+
+    def exists?
+        # only compare against @resource if one is provided via manifests
+        if @property_hash[:ensure] == :present and @resource[:value] != nil
+            # retrieve the string representation of @resource[:value] since it
+            # gets translated to an object by Puppet
+            return (@property_hash[:ensure] == :present and \
+                    @property_hash[:value].downcase == \
+                        @resource[:value].downcase)
+        end
+        @property_hash[:ensure] == :present
+    end
+
+    # required puppet functions
+    def create
+        pkg("change-facet", "#{@resource[:name]}=#{@resource[:value]}")
+    end
+
+    def destroy
+        pkg("change-facet", "#{@resource[:name]}=None")
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/pkg_mediator/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,99 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:pkg_mediator).provide(:pkg_mediator) do
+    desc "Provider for Oracle Solaris mediators"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :pkg => '/usr/bin/pkg'
+
+    def self.instances
+        pkg(:mediator, "-H", "-F", "tsv").split("\n").collect do |line|
+            name, ver_src, version, impl_src, impl, impl_ver = line.split("\t")
+            
+            # Because implementation is an optional parameter, it may not be set.
+            # If the implementation is not set, that needs to be captured in 
+            # the output.
+            if not impl
+                impl = 'None'
+            end
+
+            new(:name => name,
+                :ensure => :present,
+                :implementation => impl,
+                :version => version)
+        end 
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        mediators = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = mediators.find{ |mediator| mediator.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    def exists?
+        # only compare against @resource if one is provided via manifests
+        if @property_hash[:ensure] == :present and @resource[:version] != nil
+            return (@property_hash[:ensure] == :present and \
+                   @property_hash[:version] == @resource[:version])
+        end
+        @property_hash[:ensure] == :present
+    end
+
+    def version
+        @property_hash[:version]
+    end
+
+    def implementation
+        @property_hash[:implementation]
+    end
+
+    def build_flags
+        flags = []
+        if version = @resource[:version] and version != nil
+            flags << "-V" << @resource[:version]
+        end
+
+        if implementation = @resource[:implementation] and implementation != nil
+            flags << "-I" << @resource[:implementation]
+        end
+        flags
+    end
+
+    # required puppet functions
+    def create
+        pkg("set-mediator", build_flags, @resource[:name])
+    end
+
+    def destroy
+        pkg("unset-mediator", build_flags, @resource[:name])
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/pkg_publisher/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,244 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:pkg_publisher).provide(:pkg_publisher) do
+    desc "Provider for Solaris publishers"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :pkg => '/usr/bin/pkg'
+
+    def self.instances
+        publishers = {}
+        publisher_order = []
+        pkg(:publisher, "-H", "-F", "tsv").split("\n").collect do |line|
+            name, sticky, syspub, enabled, type, status, origin, proxy = \
+                line.split("\t")
+
+            # set the order of the publishers
+            if not publisher_order.include?("name")
+                publisher_order << name
+            end
+
+            # strip off any trailing "/" characters
+            if origin.end_with?("/")
+                origin = origin[0..-2]
+            end
+
+            if publishers.has_key?(name):
+                # if we've seen this publisher before, simply update the origin
+                # array
+                publishers[name]["origin"] << origin
+            else
+                # create a new hash entry for this publisher
+                publishers[name] = {'sticky' => sticky, 'enable' => enabled,
+                                    'origin' => Array[origin]}
+                publishers[name]["proxy"] = proxy if proxy != "-"
+
+                index = publisher_order.index(name)
+                if index == 0:
+                    publishers[name]["searchfirst"] = true
+                    publishers[name]["searchafter"] = nil
+                else
+                    publishers[name]["searchfirst"] = nil
+                    publishers[name]["searchafter"] = publisher_order[index-1]
+                end
+            end
+        end
+
+        # create new entries for the system
+        publishers.keys.collect do |publisher|
+            new(:name => publisher,
+                :ensure => :present,
+                :sticky => publishers[publisher]["sticky"],
+                :enable => publishers[publisher]["enable"],
+                :origin => publishers[publisher]["origin"],
+                :proxy => publishers[publisher]["proxy"],
+                :searchfirst => publishers[publisher]["searchfirst"],
+                :searchafter => publishers[publisher]["searchafter"],
+                :searchbefore => nil,
+                :sslkey => nil,
+                :sslcert => nil)
+        end
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        publishers = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = publishers.find{ |publisher| publisher.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    # property getters - each getter does exactly the same thing so create
+    # dynamic methods to handle them
+    [:sticky, :enable, :origin, :proxy, :searchfirst, :searchafter,
+     :searchbefore, :sslkey, :sslcert].each do |property|
+        define_method(property) do
+            begin
+                @property_hash[property]
+            rescue
+            end
+        end
+    end
+
+    def exists?
+        # only compare against @resource if one is provided via manifests
+        if @property_hash[:ensure] == :present and @resource[:origin] != nil
+            return @property_hash[:origin].sort() == @resource[:origin].sort()
+        end
+        @property_hash[:ensure] == :present
+    end
+
+    def build_origin
+        origins = []
+        
+        # add all the origins from the manifest
+        for o in @resource[:origin] do
+            origins << "-g" << o
+        end
+
+        # remove all the existing origins
+        if @property_hash != {}
+            for o in @property_hash[:origin] do
+                origins << "-G" << o
+            end
+        end
+        origins
+    end
+
+    def build_flags
+        flags = []
+        if enable = @resource[:enable] and enable != nil
+            if enable == :true
+                flags << "--enable"
+            elsif enable == :false
+                flags << "--disable"
+            end
+        end
+
+        if searchfirst = @resource[:searchfirst] and searchfirst != ""
+            if searchfirst == :true
+                flags << "--search-first"
+            end
+        end
+
+        if sticky = @resource[:sticky] and sticky != nil
+            if sticky == :true
+                flags << "--sticky"
+            elsif sticky == :false
+                flags << "--non-sticky"
+            end
+        end
+
+        if searchafter = @resource[:searchafter] and searchafter != ""
+            if pkg(:publisher, "-H", "-F", "tsv").split("\n").detect \
+                { |line| line.split()[0] == searchafter }
+                    flags << "--search-after" << searchafter
+            else
+                Puppet.warning "Publisher #{searchafter} not found.  " \
+                               "Skipping --search-after argument"
+            end
+        end
+
+        if searchbefore = @resource[:searchbefore] and searchbefore != ""
+            if pkg(:publisher, "-H", "-F", "tsv").split("\n").detect \
+                { |line| line.split()[0] == searchbefore }
+                    flags << "--search-before" << searchbefore
+            else
+                Puppet.warning "Publisher #{searchbefore} not found.  " \
+                               "Skipping --search-before argument"
+            end
+        end
+
+        if proxy = @resource[:proxy]
+            flags << "--proxy" << proxy
+        end
+
+        if sslkey = @resource[:sslkey]
+            flags << "-k" << sslkey
+        end
+
+        if sslcert = @resource[:sslcert]
+            flags << "-c" << sslcert
+        end
+        flags
+    end
+
+    # property setters
+    def sticky=(value)
+        if value == :true
+            pkg("set-publisher", "--sticky", @resource[:name])
+        else
+            pkg("set-publisher", "--non-sticky", @resource[:name])
+        end
+    end
+
+    def enable=(value)
+        if value == :true
+            pkg("set-publisher", "--enable", @resource[:name])
+        else
+            pkg("set-publisher", "--disable", @resource[:name])
+        end
+    end
+
+    def searchfirst=(value)
+        if value == :true
+            pkg("set-publisher", "--search-first", @resource[:name])
+        end
+    end
+
+    def searchbefore=(value)
+        pkg("set-publisher", "--search-before", value, @resource[:name])
+    end
+
+    def searchafter=(value)
+        pkg("set-publisher", "--search-after", value, @resource[:name])
+    end
+
+    def proxy=(value)
+        pkg("set-publisher", "--proxy", value, @resource[:name])
+    end
+
+    def sslkey=(value)
+        pkg("set-publisher", "-k", value, @resource[:name])
+    end
+
+    def sslcert=(value)
+        pkg("set-publisher", "-c", value, @resource[:name])
+    end
+
+    # required puppet functions
+    def create
+        pkg("set-publisher", build_flags, build_origin, @resource[:name])
+    end
+
+    def destroy
+        pkg("unset-publisher", @resource[:name])
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/pkg_variant/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,71 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:pkg_variant).provide(:pkg_variant) do
+    desc "Provider for Oracle Solaris variants"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :pkg => '/usr/bin/pkg'
+
+    def self.instances
+        pkg(:variant, "-H", "-F", "tsv").split("\n").collect do |line|
+            name, value = line.split
+            new(:name => name,
+                :ensure => :present,
+                :value => value)
+        end 
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        variants = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = variants.find{ |variant| variant.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    def value
+        @property_hash[:value]
+    end
+
+    def exists?
+        # only compare against @resource if one is provided via manifests
+        if @property_hash[:ensure] == :present and @resource[:value] != nil
+            # cast @resource[:value] to a string since it gets translated to an
+            # object by Puppet
+            return (@property_hash[:ensure] == :present and \
+                    @property_hash[:value] == @resource[:value].to_s)
+        end
+        @property_hash[:ensure] == :present
+    end
+
+    def create
+        pkg("change-variant", "#{@resource[:name]}=#{@resource[:value]}")
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/protocol_properties/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,113 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:protocol_properties).provide(:protocol_properties) do
+    desc "Provider for managing Oracle Solaris protocol object properties"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :ipadm => '/usr/sbin/ipadm'
+
+    def initialize(value={})
+        super(value)
+        @protoprops = {}
+    end
+
+    def self.instances
+        props = {}
+
+        ipadm("show-prop", "-c", "-o", "PROTO,PROPERTY,CURRENT").split(
+              "\n").collect do |line|
+            protocol, property, value = line.strip().split(":")
+            next if value == nil
+            if not props.has_key? protocol
+                props[protocol] = {}
+            end
+            props[protocol][property] = value
+        end
+
+        protocols = []
+        props.each do |key, value|
+            protocols << new(:name => key,
+                             :ensure => :present,
+                             :properties => value)
+        end
+        protocols
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        props = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = props.find{ |prop| prop.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    def properties
+        @property_hash[:properties]
+    end
+
+    def properties=(value)
+        value.each do |key, value|
+            ipadm("set-prop", "-p", "#{key}=#{value}", @resource[:name])
+        end
+    end
+
+    def exists?
+        if @resource[:properties] == nil
+            return :false
+        end
+
+        @resource[:properties].each do |key, value|
+            p = exec_cmd(command(:ipadm), "show-prop","-c", "-p", key,
+                         "-o", "CURRENT", @resource[:protocol])
+            if p[:exit] == 1
+                Puppet.warning "Property '#{key}' not found for protocol " \
+                               "#{@resource[:protocol]}"
+                next
+            end
+
+            if p[:out].strip != value
+                @protoprops[key] = value
+            end
+        end
+
+        return @protoprops.empty?
+    end
+
+    def create
+        @protoprops.each do |key, value|
+            ipadm("set-prop", "-p", "#{key}=#{value}", @resource[:name])
+        end
+    end
+
+    def exec_cmd(*cmd)
+        output = Puppet::Util::Execution.execute(cmd, :failonfail => false)
+        {:out => output, :exit => $CHILD_STATUS.exitstatus}
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/solaris_vlan/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,94 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:solaris_vlan).provide(:solaris_vlan) do
+    desc "Provider for creating Solaris VLANs"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :dladm => '/usr/sbin/dladm'
+
+    def self.instances
+        dladm("show-vlan", "-p", "-o", "link,over,vid").split(
+              "\n").collect do |line|
+            link, over, vlanid = line.split(":")
+            new(:name => link,
+                :ensure => :present,
+                :lower_link => over,
+                :vlanid => vlanid)
+        end
+    end
+
+    def self.prefetch(resources)
+        # pull the instances on the system
+        vlans = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = vlans.find{ |vlan| vlan.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    def lower_link
+        @property_hash[:lower_link]
+    end
+
+    def lower_link=(value)
+        dladm("modify-vlan", "-l", value, @resource[:name])
+    end
+
+    def vlanid
+        @property_hash[:vlanid]
+    end
+
+    def vlanid=(value)
+        dladm("modify-vlan", "-v", value, @resource[:name])
+    end
+
+    def add_options
+        options = []
+        if @resource[:temporary] == :true
+            options << "-t"
+        end
+        if @resource[:ensure] == :present and @resource[:force] == :true
+            options << "-f"
+        end
+        options
+    end
+
+    def exists?
+        @property_hash[:ensure] == :present
+    end
+
+    def create
+        dladm("create-vlan", add_options, "-l", @resource[:lower_link],
+              "-v", @resource[:vlanid], @resource[:name])
+    end
+
+    def destroy
+        dladm("delete-vlan", add_options, @resource[:name])
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/svccfg/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,109 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:svccfg).provide(:svccfg) do
+    desc "Provider for svccfg actions on Oracle Solaris"
+    defaultfor :operatingsystem => :solaris
+    commands :svccfg => "/usr/sbin/svccfg", :svcprop => "/usr/bin/svcprop"
+
+    def exists?
+        p = exec_cmd(command(:svcprop), "-p", @resource[:property],
+                     @resource[:fmri])
+        if @resource[:ensure] == :absent
+            # only test for the existance of the property and not the value
+            return p[:exit] == 0
+        elsif @resource[:ensure] == :present
+            # if the property doesn't exist at all, the exit code will be 1
+            return false if p[:exit] != 0
+
+            # strip the leading and trailing parens if resource[:property]
+            # contains a slash as this indicates that a value is associated
+            # with it.
+            if @resource[:property].include? "/"
+                return p[:out].strip == \
+                    @resource[:value][1..-2].join(" ")[1..-2]
+            end
+            # resource[:property] is a property group, not a property.
+            # There is no value to manipulate, but the property needs to be
+            # created, so return true.
+            return p[:exit] == 0
+        end
+    end
+
+    def create
+        # Check to see if the service instance exists
+        cmd = Array[command(:svccfg), "select", @resource[:fmri]]
+        svc_exist = exec_cmd(cmd)
+
+        # Create the service instance if it doesn't exist
+        if svc_exist[:exit] != 0
+            service, instance = \
+                @resource[:fmri].split(":").reject{|n| n == "svc"}
+            svccfg("-s", service, "add", instance)
+        end
+
+        # Add the property
+        if @resource[:property].include? "/"
+            svccfg("-s", @resource[:fmri], "setprop", @resource[:property],
+                   "=", @resource[:type] + ":", @resource[:value])
+        else
+            svccfg("-s", @resource[:fmri], "addpg", @resource[:property],
+                   @resource[:type])
+        end
+        svccfg("-s", @resource[:fmri], "refresh")
+    end
+
+    def destroy
+        svccfg("-s", @resource[:fmri], "delprop", @resource[:property])
+        svccfg("-s", @resource[:fmri], "refresh")
+    end
+
+    def delcust
+        list_cmd = Array[command(:svccfg), "-s", @resource[:fmri], "listprop",
+                         "-l", "admin"]
+        delcust_cmd = Array[command(:svccfg), "-s", @resource[:fmri]]
+        if @resource[:property] != nil
+            list_cmd += Array[@resource[:property]]
+            delcust_cmd += Array[@resource[:property]]
+        end
+
+        # look for any admin layer customizations for this entity
+        p = exec_cmd(list_cmd)
+        if p[:out].strip != ''
+            # there are admin customizations
+            if @resource[:property] == nil
+                svccfg("-s", @resource[:fmri], "delcust")
+            else
+                svccfg("-s", @resource[:fmri], "delcust", @resource[:property])
+            end
+            svccfg("-s", @resource[:fmri], "refresh")
+        end
+    end
+
+    def exec_cmd(*cmd)
+        output = Puppet::Util::Execution.execute(cmd, :failonfail => false)
+        {:out => output, :exit => $CHILD_STATUS.exitstatus}
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/vni_interface/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,79 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:vni_interface).provide(:vni_interface) do
+    desc "Provider for management of VNI interfaces for Oracle Solaris"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :ipadm => '/usr/sbin/ipadm'
+
+    def self.instances
+        vnis = []
+        ipadm("show-if", "-p", "-o", "IFNAME,CLASS").split(
+              "\n").each do |line|
+            ifname, ifclass = line.split(":", 2)
+            next if ifclass != "vni"
+            vnis << new(:name => ifname, :ensure => :present)
+        end
+        vnis
+    end
+
+    def add_options
+       options = []
+       if @resource[:temporary] == :true
+         options << "-t"
+       end
+       options
+    end
+
+    def exists?
+        p = exec_cmd(command(:ipadm), "show-if", "-p", "-o", "IFNAME,CLASS",
+                     @resource[:name])
+        if p[:exit] == 1:
+            return false
+        end
+
+        ifname, ifclass = p[:out].strip().split(":", 2)
+        if ifclass == "vni"
+            return true
+        end
+
+        # for all other cases, return false
+        return false
+    end
+
+    def create
+        ipadm('create-vni', add_options, @resource[:name])
+    end
+
+    def destroy
+        ipadm('delete-vni', @resource[:name])
+    end
+
+    def exec_cmd(*cmd)
+        output = Puppet::Util::Execution.execute(cmd, :failonfail => false)
+        {:out => output, :exit => $CHILD_STATUS.exitstatus}
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/provider/vnic/solaris.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,95 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.type(:vnic).provide(:vnic) do
+    desc "Provider for creating VNICs in the Solaris OS"
+    confine :operatingsystem => [:solaris]
+    defaultfor :osfamily => :solaris, :kernelrelease => ['5.11', '5.12']
+    commands :dladm => '/usr/sbin/dladm'
+
+    def self.instances
+        dladm("show-vnic", "-p", "-o", "link,over,macaddress").split(
+              "\n").collect do |line|
+            link, over, mac = line.split(":", 3)
+            new(:name => link,
+                :ensure => :present,
+                :lower_link => over,
+                :mac_address => mac.delete("\\"))  # remove the escape character
+        end
+    end
+        
+    def self.prefetch(resources)
+        # pull the instances on the system
+        vnics = instances
+
+        # set the provider for the resource to set the property_hash
+        resources.keys.each do |name|
+            if provider = vnics.find{ |vnic| vnic.name == name}
+                resources[name].provider = provider
+            end
+        end
+    end
+
+    def lower_link
+        @property_hash[:lower_link]
+    end
+
+    def lower_link=(value)
+        dladm("modify-vnic", "-l", value, @resource[:name])
+    end
+
+    def mac_address
+        @property_hash[:mac_address]
+    end
+
+    def mac_address=(value)
+        dladm("modify-vnic", "-m", value, @resource[:name])
+    end
+
+    def add_options
+       options = []
+       if @resource[:temporary] == :true
+         options << "-t"
+       end
+
+       if @resource[:mac_address]
+           options << "-m" << @resource[:mac_address]
+       end
+       options
+    end
+
+    def exists?
+        @property_hash[:ensure] == :present
+    end
+
+    def create
+        dladm('create-vnic', '-l', @resource[:lower_link], add_options,
+              @resource[:name])
+    end
+
+    def destroy
+        dladm('delete-vnic', @resource[:name])
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/address_object.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,111 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:address_object) do
+    @doc = "Manage the configuration of Oracle Solaris address objects"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The name of the address object or interface"
+        isnamevar
+    end
+
+    newparam(:temporary) do
+        desc "Optional parameter that specifies that the address object is
+              temporary.  Temporary aggreation links last until the next
+              reboot."
+        newvalues(:true, :false)
+    end
+
+    newproperty(:address_type) do
+        desc "The type of address object to create.  Valid values are static,
+              dhcp, addrconf."
+        # add from_gz as a valid value, even though users should not specify it
+        newvalues(:static, :dhcp, :addrconf, :from_gz)
+    end
+
+    newproperty(:enable) do
+        desc "Specifies the address object should be enabled or disabled.
+              Valid values are true, false"
+        newvalues(:true, :false)
+    end
+
+    newproperty(:address) do
+        desc "A literal IP address or a hostname corresponding to the local
+              end-point.  An optional prefix length may be specified.  Only
+              valid with an address_type of 'static'"
+    end
+
+    newproperty(:remote_address) do
+        desc "A literal IP address or a hostname corresponding to an optional
+              remote end-point.  An optional prefix length may be specified.
+              Only valid with an address_type of 'static'"
+    end
+
+    newproperty(:down) do
+        desc "Specifies that the configured address should be marked down.
+              Only valid with an address_type of 'static'.  Valid values are
+              true, false"
+        newvalues(:true, :false)
+    end
+
+    newproperty(:seconds) do
+        desc "Specifies the amount of time in seconds to wait until the
+              operation completes.  Only valid with an address_type of
+              'dhcp'.  Valid values are a numerical value in seconds or
+              'forever'"
+    end
+
+    newproperty(:hostname) do
+        desc "Specifies the hostname to which the client would like the DHCP
+              server to map the client's leased IPv4 address.  Only valid
+              with an address_type of 'dhcp'"
+    end
+
+    newproperty(:interface_id) do
+        desc "Specifies the local interface ID to be used for generating
+              auto-configured addresses.  Only valid with an address_type of
+              'addrconf'"
+    end
+
+    newproperty(:remote_interface_id) do
+        desc "Specifies an optional remote interface ID to be used for
+              generating auto-configured addresses.  Only valid with an
+              address_type of 'addrconf'"
+    end
+
+    newproperty(:stateful) do
+        desc "Specifies if stateful auto-configuration should be enabled or
+              not.  Valid values are yes, no"
+        newvalues(:yes, :no)
+    end
+
+    newproperty(:stateless) do
+        desc "Specifies if stateless auto-configuration should be enabled or
+              not.  Valid values are yes, no"
+        newvalues(:yes, :no)
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/address_properties.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,51 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:address_properties) do
+    @doc = "Manage Oracle Solaris address properties"
+
+    ensurable do
+        # remove the ability to specify :absent.  New values must be set.
+        newvalue(:present) do
+            provider.create
+        end
+    end
+
+    newparam(:address) do
+        desc "The name of the address object"
+        isnamevar
+    end
+
+    newparam(:temporary) do
+        desc "Optional parameter that specifies changes to the address object
+              are temporary.  Changes last until the next reboot."
+        newvalues(:true, :false)
+    end
+
+    newproperty(:properties) do
+        desc "A hash table of propname=propvalue entries to apply to an
+              address object"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/boot_environment.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,61 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:boot_environment) do
+    @doc = "Manage Oracle Solaris Boot Environments (BEs)"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The BE name"
+        validate do |value|
+            raise Puppet::Error, "Invalid BE name:  #{value}" unless
+                value =~ /^[\d\w\.\-\:\_]+$/
+        end
+        isnamevar
+    end
+
+    newparam(:description) do
+        desc "Description for the new BE"
+    end
+
+    newparam(:clone_be) do
+        desc "Create a new BE from an existing inactive BE"
+    end
+
+    newparam(:options) do
+        desc "Create the datasets for a new BE with specific ZFS
+              properties.  Specify options as a hash."
+    end
+
+    newparam(:zpool) do
+        desc "Create the new BE in the specified zpool"
+    end
+
+    newproperty(:activate) do
+        desc "Activate the specified BE"
+        newvalues(:true, :false)
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/dns.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,170 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+require 'ipaddr'
+require 'puppet/property/list'
+
+# DNS options
+simple_opts = ["debug", "rotate", "no-check-names", "inet6"]
+arg_opts =  ["ndots", "timeout", "retrans", "attempts", "retry"]
+
+Puppet::Type.newtype(:dns) do
+    @doc = "Manage the configuration of the DNS client for Oracle Solaris"
+
+    newparam(:name) do
+        desc "The symbolic name for the DNS client settings to use.  This name
+              is used for human reference only."
+        isnamevar
+    end
+
+    newproperty(:nameserver, :parent => Puppet::Property::List) do
+        desc "The IP address(es) the resolver is to query.  A maximum of
+              3 IP addresses may be specified.  Specify multiple IP addresses
+              as an array"
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+
+        validate do |value|
+            begin
+                ip = IPAddr.new(value)
+            rescue ArgumentError
+                raise Puppet::Error, "nameserver IP address:  #{value} is 
+                    invalid"
+            end
+        end
+    end
+
+    newproperty(:domain) do
+        desc "The local domain name"
+    end
+
+    newproperty(:search, :parent => Puppet::Property::List) do
+        desc "The search list for host name lookup.  A maximum of 6 search
+              entries may be specified.  Specify multiple search entries as an
+              array."
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+    end
+
+    newproperty(:sortlist, :parent => Puppet::Property::List) do
+        desc "Addresses returned by gethostbyname() to be sorted.  Entries must
+              be specified in IP 'slash notation'.  A maximum of 10 sortlist
+              entries may be specified.  Specify multiple entries as an array."
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+
+        validate do |value|
+            begin
+                ip = IPAddr.new(value)
+            rescue ArgumentError
+                raise Puppet::Error, "sortlist IP address: #{value} is invalid"
+            end
+        end
+    end
+
+    newproperty(:options, :parent => Puppet::Property::List) do
+        desc "Set internal resolver variables.  Valid values are debug,
+              ndots:n, timeout:n, retrans:n, attempts:n, retry:n, rotate,
+              no-check-names, inet6.  For values with 'n', specify 'n' as an
+              integer.  Specify multiple options as an array."
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+
+        validate do |value|
+            data = value.split(":")
+            if data.length == 1
+                raise Puppet::Error, "option #{value} is invalid" \
+                    if not simple_opts.include? data[0]
+            elsif data.length == 2
+                # XXX
+                raise Puppet::Error, "svccfg is bugged with prop:N options"
+
+                raise Puppet::Error, "option #{value} is invalid" \
+                    if not arg_opts.include? data[0]
+
+                # attempt to cast the integer specified
+                begin
+                    check = Integer(data[1])
+                rescue ArgumentError
+                    raise Puppet::Error, "option #{value} is invalid"
+                end 
+            else
+                raise Puppet::Error, "option #{value} is invalid"
+            end
+        end
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/etherstub.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,41 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:etherstub) do
+    @doc = "Manage the configuration of Solaris etherstubs"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The name of the etherstub"
+        isnamevar
+    end
+
+    newparam(:temporary) do
+        desc "Optional parameter that specifies that the etherstub is 
+              temporary.  Temporary etherstubs last until the next reboot."
+        newvalues(:true, :false)
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/interface_properties.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,57 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:interface_properties) do
+    @doc = "Manage Oralce Solaris interface properties"
+
+    ensurable do
+        # remove the ability to specify :absent.  New values must be set.
+        newvalue(:present) do
+            provider.create
+        end
+    end
+
+    newparam(:interface) do
+        desc "The name of the interface with protocol (if appropriate)"
+        validate do |iface|
+            if not iface =~ /^.*?\/.*?$/i
+                raise Puppet::Error, "Invalid interface name.  Interface name
+                    must specify name and protocol."
+            end
+        end
+        isnamevar
+    end
+
+    newparam(:temporary) do
+        desc "Optional parameter that specifies changes to the interface are
+              temporary.  Changes last until the next reboot."
+        newvalues(:true, :false)
+    end
+
+    newproperty(:properties) do
+        desc "A hash table of propname=propvalue entries to apply to the
+              interface"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/ip_interface.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,48 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:ip_interface) do
+    @doc = "Manage the configuration of Oracle Solaris IP interfaces"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The name of the IP interface"
+        isnamevar
+
+        validate do |name|
+            cmd = Array["/usr/sbin/dladm", "show-phys", "-p", "-o", "link"]
+            output = Puppet::Util::Execution.execute(cmd).split("\n")
+            raise Puppet::Error, "Invalid IP interface name: #{name}" \
+                if not output.include?(name)
+        end
+    end
+
+    newparam(:temporary)  do
+        desc "Optional parameter that specifies that the IP interface is
+              temporary.  Temporary interfaces last until the next reboot."
+        newvalues(:true, :false)
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/ip_tunnel.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,55 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:ip_tunnel) do
+    @doc = "Manage the configuration of Oracle Solaris IP Tunnel links"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The name of the iptunnel link"
+        isnamevar
+    end
+
+    newparam(:temporary)  do
+        desc "Optional parameter that specifies that the IP tunnel is
+              temporary.  Temporary IP tunnels last until the next reboot."
+        newvalues(:true, :false)
+    end
+
+    newproperty(:tunnel_type) do
+        desc "Specifies the type of tunnel to be created.  Valid values are
+              ipv4, ipv6, 6to4"
+        newvalues("ipv4", "ipv6", "6to4")
+    end
+
+    newproperty(:local_address) do
+        desc "IP address or hostname corresponding to the local tunnel address"
+    end
+
+    newproperty(:remote_address) do
+        desc "IP address or hostname corresponding to the remote tunnel address"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/ipmp_interface.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,75 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+require 'puppet/property/list'
+
+Puppet::Type.newtype(:ipmp_interface) do
+    @doc = "Manage the configuration of Oracle Solaris IPMP interfaces"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The name of the IP interface"
+        isnamevar
+    end
+
+    newparam(:temporary)  do
+        desc "Optional parameter that specifies that the IP interface is
+              temporary.  Temporary interfaces last until the next reboot."
+        newvalues(:true, :false)
+    end
+
+    newproperty(:interfaces, :parent => Puppet::Property::List) do
+        desc "An array of interface names to use for the IPMP interface"
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # ipadm returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+
+        validate do |name|
+            cmd = Array["/usr/sbin/ipadm", "show-if", "-p", "-o", "IFNAME"]
+            output = Puppet::Util::Execution.execute(cmd).split("\n")
+            if name.class == Array
+                check = output - name
+                raise Puppet::Error, "Invalid interface(s) specified:  "
+                    "#{check.inspect}" if not check.empty?
+            else
+                raise Puppet::Error, "Invalid interface specified: #{name}" \
+                    if not output.include?(name)
+            end
+        end
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/ldap.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,362 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+require 'ipaddr'
+require 'puppet/property/list'
+
+def valid_hostname?(hostname)
+    return false if hostname.length > 255 or hostname.scan('..').any?
+    hostname = hostname[0...-1] if hostname.index('.', -1)
+    return hostname.split('.').collect { |i|
+        i.size <= 63 and
+        not (i.rindex('-', 0) or i.index('-', -1) or i.scan(/[^a-z\d-]/i).any?)
+    }.all?
+end
+
+def valid_ip?(value)
+    begin
+        ip = IPAddr.new(value)
+    rescue ArgumentError
+        return false
+    end
+    return true
+end
+
+Puppet::Type.newtype(:ldap) do
+    @doc = "Manage the configuration of the LDAP client for Oracle Solaris"
+
+    newparam(:name) do
+        desc "The LDAP profile name"
+        isnamevar
+    end
+
+    newproperty(:server_list, :parent => Puppet::Property::List) do
+        desc "LDAP server names or addresses.  Specify multiple servers as an
+              array"
+
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+
+        validate do |value|
+            raise Puppet::Error, "default_server entry:  #{value} is 
+                invalid" if not valid_ip?(value) and not valid_hostname?(value)
+        end
+    end
+
+    newproperty(:preferred_server_list, :parent => Puppet::Property::List) do
+        desc "LDAP server(s) to contact before any servers listed in
+              default_server_list"
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+
+        validate do |value|
+            raise Puppet::Error, "preferred_server entry:  #{value} is 
+                invalid" if not valid_ip?(value) and not valid_hostname?(value)
+        end
+    end
+
+    newproperty(:search_base) do
+        desc "The default search base DN"
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+    end
+
+    newproperty(:search_scope) do
+        desc "The default search scope for the client's search operations.
+              Valid values are base, one, sub."
+        newvalues("base", "one", "sub")
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+    end
+
+    newproperty(:authentication_method, :parent => Puppet::Property::List) do
+        desc "The default authentication method(s).  Specify multiple methods
+              as an array.  Valid values are none, simple, sasl/CRAM-MD5,
+              sasl/DIGEST-MD5, sasl/GSSAPI, tls:simple, tls:sasl/CRAM-MD5,
+              tls:sasl/DIGEST-MD5"
+
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+        
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+
+        newvalues("none", "simple", "sasl/CRAM-MD5", "sasl/DIGEST-MD5",
+                  "sasl/GSSAPI", "tls:simple", "tls:sasl/CRAM-MD5",
+                  "tls:sasl/DIGEST-MD5")
+    end
+
+    newproperty(:credential_level) do
+        desc "The credential level the client should use to contact the
+              directory.  Valid values are anonymous, proxy, self"
+        newvalues("anonymous", "proxy", "self")
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+    end
+
+    newproperty(:search_time_limit) do
+        desc "The maximum number of seconds allowed for an LDAP search
+              operation."
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+    end
+
+    newproperty(:bind_time_limit) do
+        desc "The maximum number of seconds a client should spend performing a
+              bind operation."
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+    end
+
+    newproperty(:follow_referrals) do
+        desc "The referral setting.  Valid values are true, false"
+        newvalues(:true, :false)
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+    end
+
+    newproperty(:profile_ttl) do
+        desc "The TTL value in seconds for the client information"
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+    end
+
+    newproperty(:attribute_map, :parent => Puppet::Property::List) do
+        desc "A mapping from an attribute defined by a service to an attribute
+              in an alternative schema.  Specify multiple mappings as an array."
+
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+        
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+    end
+
+    newproperty(:objectclass_map, :parent => Puppet::Property::List) do
+        desc "A  mapping from an objectclass defined by a service to an
+              objectclass in an alternative schema.  Specify multiple mappings
+              as an array."
+        
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+    end
+
+    newproperty(:service_credential_level) do
+        desc "The credential level to be used by a service.  Value values are
+              anonymous, proxy"
+        newvalues("anonymous", "proxy")
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+    end
+
+    newproperty(:service_authentication_method,
+                :parent => Puppet::Property::List) do
+        desc "The authentication method to be used by a service.  Specify
+              multiple methods as an array."
+
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "config"
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+    end
+
+    newproperty(:bind_dn, :parent => Puppet::Property::List) do
+        desc "An entry that has read permission for the requested database.
+              Specify multiple entries as an array."
+
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "cred"
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+    end
+    
+    newproperty(:bind_passwd) do
+        desc "password to be used for authenticating the bind DN."
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "cred"
+    end
+
+    newproperty(:enable_shadow_update) do
+        desc "Specify whether the client is allowed to update shadow
+              information.  Valid values are true, false"
+        newvalues(:true, :false)
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "cred"
+    end
+
+    newproperty(:admin_dn) do
+        desc "The Bind Distinguised Name for the administrator identity that
+              is used for shadow information update"
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "cred"
+    end
+
+    newproperty(:admin_password) do
+        desc "The administrator password"
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "cred"
+    end
+
+    newproperty(:certificate_path) do
+        desc "The location of the certificate files"
+        class << self
+            attr_accessor :pg
+        end
+        self.pg = "cred"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/link_aggregation.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,91 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+require 'puppet/property/list'
+
+Puppet::Type.newtype(:link_aggregation) do
+    @doc = "Manage the configuration of Oracle Solaris link aggregations"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The name of the link aggregration"
+        isnamevar
+    end
+
+    newparam(:temporary) do
+        desc "Optional parameter that specifies that the aggreation is
+              temporary.  Temporary aggreation links last until the next
+              reboot."
+        newvalues(:true, :false)
+    end
+
+    newproperty(:lower_links, :parent => Puppet::Property::List) do
+        desc "Specifies an array of links over which the aggrestion is created."
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # dladm returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+
+    end
+
+    newproperty(:mode) do
+        desc "Specifies which mode to set.  Valid values are trunk or dlmp.
+              Defaults to :trunk"
+        newvalues(:trunk, :dlmp)
+    end
+
+    newproperty(:policy) do
+        desc "Specifies the port selection policy to use for load spreading
+              of outbound traffic."
+    end
+
+    newproperty(:lacpmode) do
+        desc "Specifies whether LACP should be used and, if used, the mode
+              in which it should operate"
+        newvalues(:off, :active, :passive)
+    end
+
+    newproperty(:lacptimer) do
+        desc "Specifies the LACP timer value"
+        newvalues(:short, :long)
+    end
+
+    newproperty(:address) do
+        desc "Specifies a fixed unicast hardware address to be used for the
+              aggregation"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/link_properties.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,45 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:link_properties) do
+    @doc = "Manage Oralce Solaris link properties"
+
+    ensurable
+
+    newparam(:link) do
+        desc "The name of the link"
+        isnamevar
+    end
+
+    newparam(:temporary) do
+        desc "Optional parameter that specifies changes to the link are
+              temporary.  Changes last until the next reboot."
+        newvalues(:true, :false)
+    end
+
+    newproperty(:properties) do
+        desc "A hash table of propname=propvalue entries to apply to the link"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/nis.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,129 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+require 'ipaddr'
+require 'puppet/property/list'
+
+def valid_hostname?(hostname)
+    return false if hostname.length > 255 or hostname.scan('..').any?
+    hostname = hostname[0...-1] if hostname.index('.', -1)
+    return hostname.split('.').collect { |i|
+        i.size <= 63 and 
+        not (i.rindex('-', 0) or i.index('-', -1) or i.scan(/[^a-z\d-]/i).any?)
+    }.all?
+end
+
+Puppet::Type.newtype(:nis) do
+    @doc = "Manage the configuration of the NIS client for Oracle Solaris"
+
+    newparam(:domainname) do
+        desc "The NIS domainname"
+        isnamevar
+    end
+
+    newproperty(:ypservers, :parent => Puppet::Property::List) do
+        desc "The hosts or IP addresses to use as NIS servers.  Specify
+              multiple entries as an array"
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+
+        validate do |value|
+            begin
+                ip = IPAddr.new(value)
+            rescue ArgumentError
+                # the value wasn't a valid IP address, so check the hostname
+                raise Puppet::Error, "ypserver entry:  #{value} is 
+                    invalid" if not valid_hostname? value
+            end
+        end
+    end
+
+    newproperty(:securenets, :parent => Puppet::Property::List) do
+        desc "Entries for /var/yp/securenets.  Each entry must be a 2 element
+              array.  The first element must be either a host or a netmask.
+              The second element must be an IP network address.  Specify
+              multiple entires as an array of arrays"
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        # svcprop returns multivalue entries delimited with a space
+        def delimiter
+            " "
+        end
+
+        validate do |value|
+            netmask, network = value
+            # check the netmask
+            begin
+                ip = IPAddr.new(netmask)
+            rescue ArgumentError
+                # the value wasn't a valid IP address, so check the hostname
+                raise Puppet::Error, "securenets entry:  #{value} has an
+                    invalid netmask" if not valid_hostname? netmask
+            end
+
+            begin
+                ip = IPAddr.net(network)
+            rescue ArgumentError
+                # the value wasn't a valid IP address
+                raise Puppet::Error, "securenets entry:  #{value} has an 
+                    invalid network"
+            end
+        end
+    end
+
+    newproperty(:use_broadcast) do
+        desc "Send a broadcast datagram requesting needed bind information for
+              a specific NIS server.  Valid vales are true, false"
+        newvalues(:true, :false)
+    end
+
+    newproperty(:use_ypsetme) do
+        desc "Only allow root on the client to change the binding to a desired
+              server.  Valid values are true, false"
+        newvalues(:true, :false)
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/nsswitch.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,114 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:nsswitch) do
+    @doc = "Name service switch configuration data"
+
+    newparam(:name) do
+        desc "The symbolic name for the nsswitch settings to use.  This name
+              is used for human reference only."
+        isnamevar
+    end
+
+    newproperty(:default) do
+        desc "The default configuration entry"
+    end
+
+    newproperty(:host) do
+        desc "The host database lookup override"
+    end
+
+    newproperty(:password) do
+        desc "The password database lookup override"
+    end
+
+    newproperty(:group) do
+        desc "The group database lookup override"
+    end
+
+    newproperty(:network) do
+        desc "The network database lookup override"
+    end
+
+    newproperty(:rpc) do
+        desc "The rpc database lookup override"
+    end
+
+    newproperty(:ether) do
+        desc "The ether database lookup override"
+    end
+
+    newproperty(:netmask) do
+        desc "The netmask database lookup override"
+    end
+
+    newproperty(:bootparam) do
+        desc "The bootparam database lookup override"
+    end
+
+    newproperty(:publickey) do
+        desc "The publickey database lookup override"
+    end
+
+    newproperty(:netgroup) do
+        desc "The netgroup database lookup override"
+    end
+
+    newproperty(:automount) do
+        desc "The automount database lookup override"
+    end
+
+    newproperty(:alias) do
+        desc "The alias database lookup override"
+    end
+
+    newproperty(:servicde) do
+        desc "The servicde database lookup override"
+    end
+
+    newproperty(:project) do
+        desc "The project database lookup override"
+    end
+
+    newproperty(:auth_attr) do
+        desc "The auth_attr database lookup override"
+    end
+
+    newproperty(:prof_attr) do
+        desc "The prof_attr database lookup override"
+    end
+
+    newproperty(:tnrhtp) do
+        desc "The tnrhtp database lookup override.  Requires trusted extensions"
+    end
+
+    newproperty(:tnrhdb) do
+        desc "The tnrhdb database lookup override.  Requires trusted extensions"
+    end
+
+    newproperty(:sudoer) do
+        desc "The sudoer database lookup override.  Used with sudo only"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/pkg_facet.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,40 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:pkg_facet) do
+    @doc = "Manage Oracle Solaris package facets"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The facet name"
+        isnamevar
+    end
+
+    newproperty(:value) do
+        desc "The value for the facet"
+        newvalues(/[tT]rue/, /[fF]alse/, /[nN]one/)
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/pkg_mediator.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,43 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:pkg_mediator) do
+    @doc = "Manage Oracle Solaris package mediators"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The mediator name"
+        isnamevar
+    end
+
+    newproperty(:version) do
+        desc "The version of the mediated interface to use"
+    end
+
+    newproperty(:implementation) do
+        desc "The implementation of the mediated interface to use"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/pkg_publisher.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,93 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+require 'puppet/property/list'
+Puppet::Type.newtype(:pkg_publisher) do
+    @doc = "Manage Oracle Solaris package publishers"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The publisher name"
+        isnamevar
+    end
+
+    newproperty(:origin, :parent => Puppet::Property::List) do
+        desc "Which origin URI(s) to set.  For multiple origins, specify them
+              as a list"
+
+        # ensure should remains an array
+        def should
+            @should
+        end
+
+        def insync?(is)
+            is = [] if is == :absent or is.nil?
+            is.sort == self.should.sort
+        end
+
+        def retrieve
+            provider.origin
+        end
+    end
+
+    newproperty(:enable) do
+        desc "Enable the publisher"
+        newvalues(:true, :false)
+    end
+
+    newproperty(:sticky) do
+        desc "Set the publisher 'sticky'"
+        newvalues(:true, :false)
+    end
+
+    newproperty(:searchfirst) do
+        desc "Set the publisher first in the search order"
+        newvalues(:true)
+    end
+
+    newproperty(:searchafter) do
+        desc "Set the publisher after the specified publisher in the search
+              order"
+    end
+
+    newproperty(:searchbefore) do
+        desc "Set the publisher before the specified publisher in the search
+              order"
+    end
+
+    newproperty(:proxy) do
+        desc "Use the specified web proxy URI to retrieve content for the
+              specified origin or mirror"
+    end
+
+    newproperty(:sslkey) do
+        desc "Specify the client SSL key"
+    end
+
+    newproperty(:sslcert) do
+        desc "Specify the client SSL certificate"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/pkg_variant.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,45 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:pkg_variant) do
+    @doc = "Manage Oracle Solaris package variants"
+
+    ensurable do
+        # remove the ability to specify :absent as deletion of variants is not
+        # supported.  New values must be set.
+        newvalue(:present) do
+            provider.create
+        end
+    end
+
+    newparam(:name) do
+        desc "The variant name"
+        isnamevar
+    end
+
+    newproperty(:value) do
+        desc "The value for the variant"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/protocol_properties.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,51 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:protocol_properties) do
+    @doc = "Manage Oracle Solaris protocol properties"
+
+    ensurable do
+        # remove the ability to specify :absent.  New values must be set.
+        newvalue(:present) do
+            provider.create
+        end
+    end
+
+    newparam(:protocol) do
+        desc "The name of the protocol"
+        isnamevar
+    end
+
+    newparam(:temporary) do
+        desc "Optional parameter that specifies changes to the protocol are
+              temporary.  Changes last until the next reboot."
+        newvalues(:true, :false)
+    end
+
+    newproperty(:properties) do
+        desc "A hash table of propname=propvalue entries to apply to an
+              protocol"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/solaris_vlan.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,54 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:solaris_vlan) do
+    @doc = "Manage the configuration of Oracle Solaris VLAN links"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The name of the VLAN"
+        isnamevar
+    end
+
+    newparam(:force) do
+        desc "Optional parameter to force the creation of the VLAN link"
+        newvalues(:true, :false)
+    end
+
+    newparam(:temporary) do
+        desc "Optional parameter that specifies that the VLAN is 
+              temporary.  Temporary VLAN links last until the next reboot."
+        newvalues(:true, :false)
+    end
+
+    newproperty(:lower_link) do
+        desc "Specifies Ethernet link over which VLAN is created"
+    end
+
+    newproperty(:vlanid) do
+        desc "VLAN link ID"
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/svccfg.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,76 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:svccfg) do
+    @doc = "Manage SMF service properties with svccfg(1M)."
+
+    ensurable do
+        newvalue(:present) do
+            provider.create
+        end
+
+        newvalue(:absent) do
+            provider.destroy
+        end
+
+        newvalue(:delcust) do
+            provider.delcust
+        end
+    end
+
+    newparam(:name) do
+        desc "The symbolic name for properties to manipulate.  This name is
+              used for human reference only"
+        isnamevar
+    end
+
+    newparam(:fmri) do
+        desc "SMF service FMRI to manipulate"
+    end
+
+    newparam(:property) do
+        desc "Name of property - includes Property Group and Propery"
+    end
+
+    newparam(:type) do
+        desc "Type of the property"
+    end
+
+    newparam(:value) do
+        desc "Value of the property"
+        munge do |value|
+            # cast the value to an array
+            if not value.is_a? Array
+                value = Array[value]
+            end
+
+            # wrap each entry in quotes
+            value = value.collect{ |v| "\"#{v}\"" }
+
+            value.insert(0, "(")
+            value.insert(-1, ")")
+        end
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/vni_interface.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,42 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:vni_interface) do
+    @doc = "Manage the configuration of Solaris VNI interfaces"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The name of the VNI interface"
+        isnamevar
+    end
+
+    newparam(:temporary)  do
+        desc "Optional parameter that specifies that the VNI interface is
+              temporary.  Temporary interfaces last until the next reboot.  
+              Defaults to `false`."
+        newvalues(:true, :false)
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/solaris/lib/puppet/type/vnic.rb	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,67 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+#
+
+Puppet::Type.newtype(:vnic) do
+    @doc = "Manage the configuration of Oracle Solaris Virtual NICs (VNICs)"
+
+    ensurable
+
+    newparam(:name) do
+        desc "The name of the VNIC"
+
+        isnamevar
+
+        validate do |vnic_value|
+           if not vnic_value =~ /^[[:alpha:]]([\w.]){1,29}([\d])$/i
+               raise Puppet::Error, "Invalid VNIC name: #{vnic_value}"
+           end
+        end
+    end
+
+    newparam(:temporary)  do
+        desc "Optional parameter that specifies that  the  VNIC  is  temporary. 
+              Temporary VNICs last until the next reboot."
+        newvalues(:true, :false)
+    end
+
+    newproperty(:lower_link) do
+        desc "The name of the physical datalink over which the VNIC is 
+              operating"
+        validate do |link_value|
+            if not link_value =~ /^[[:alpha:]]([\w.]){1,29}([\d])$/i
+                raise Puppet::Error, "Invalid lower-link: #{link_value}"
+            end
+        end
+    end
+
+    newproperty(:mac_address) do
+        desc "Sets the VNIC's MAC address based on  the  specified value."
+        validate do |mac_value|
+            if not mac_value =~ /^([[:xdigit:]]{1,2}[:-]){5}[[:xdigit:]]{1,2}$/i
+                raise Puppet::Error, "Invalid MAC address: #{mac_value}" 
+            end
+        end
+    end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/files/user_attr	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,1 @@
+puppet::RO::audit_flags=cusa\:no
--- a/components/puppet/patches/puppet-00-s12pkg.patch	Sat Jul 27 07:19:32 2013 -0700
+++ b/components/puppet/patches/puppet-00-s12pkg.patch	Mon Jul 29 16:02:38 2013 -0600
@@ -1,7 +1,7 @@
 Add Solaris 12 to the pkg(5) pkg provider
 
---- puppet-3.0.1/lib/puppet/provider/package/pkg.rb.orig	2012-10-19 22:57:51.000000000 -0600
-+++ puppet-3.0.1/lib/puppet/provider/package/pkg.rb	2012-10-24 15:55:23.203830708 -0600
+--- puppet-3.2.2/lib/puppet/provider/package/pkg.rb.orig	2012-10-19 22:57:51.000000000 -0600
++++ puppet-3.2.2/lib/puppet/provider/package/pkg.rb	2012-10-24 15:55:23.203830708 -0600
 @@ -23,7 +23,7 @@
  
    confine :osfamily => :solaris
--- a/components/puppet/patches/puppet-01-installrb-nogzip-manpage.patch	Sat Jul 27 07:19:32 2013 -0700
+++ b/components/puppet/patches/puppet-01-installrb-nogzip-manpage.patch	Mon Jul 29 16:02:38 2013 -0600
@@ -1,8 +1,8 @@
 Prevent puppet's build script from gzipping the manpages.  Our version
 of man doesn't understand manpages with a .gz extension
 
---- puppet-3.0.1/install.rb.orig	2013-01-04 14:05:09.892870020 -0700
-+++ puppet-3.0.1/install.rb	2013-01-04 14:05:40.466062888 -0700
+--- puppet-3.2.2/install.rb.orig	2013-01-04 14:05:09.892870020 -0700
++++ puppet-3.2.2/install.rb	2013-01-04 14:05:40.466062888 -0700
 @@ -146,9 +146,6 @@
        FileUtils.chmod(0755, om)
        FileUtils.install(mf, omf, {:mode => 0644, :verbose => true})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/patches/puppet-02-zone-type.patch	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,281 @@
+Enhance the zone type to configure zones using a zonecfg export file format.
+Enhance the output of the puppet resource zone.
+
+--- puppet-3.2.2/lib/puppet/type/zone.rb.orig	2013-07-16 16:44:01.005467245 -0600
++++ puppet-3.2.2/lib/puppet/type/zone.rb	2013-07-16 16:45:04.216692249 -0600
+@@ -1,10 +1,5 @@
+-require 'puppet/property/list'
+ Puppet::Type.newtype(:zone) do
+-  @doc = "Manages Solaris zones.
+-
+-**Autorequires:** If Puppet is managing the directory specified as the root of
+-the zone's filesystem (with the `path` attribute), the zone resource will
+-autorequire that directory."
++  @doc = "Manages Solaris zones."
+ 
+   class StateMachine
+     # A silly little state machine.
+@@ -73,7 +68,7 @@
+ 
+     # This is seq value because the order of declaration is important.
+     # i.e we go linearly from :absent -> :configured -> :installed -> :running
+-    seqvalue :absent, :down => :destroy
++    seqvalue :absent, :down => :unconfigure
+     seqvalue :configured, :up => :configure, :down => :uninstall
+     seqvalue :installed, :up => :install, :down => :stop
+     seqvalue :running, :up => :start
+@@ -102,10 +97,10 @@
+         sleep 1
+       end
+       provider.send(method)
+-      provider.flush()
+     end
+ 
+     def sync
++
+       method = nil
+       direction = up? ? :up : :down
+ 
+@@ -129,127 +124,34 @@
+ 
+   newparam(:name) do
+     desc "The name of the zone."
+-
+     isnamevar
+   end
+ 
+-  newparam(:id) do
+-    desc "The numerical ID of the zone.  This number is autogenerated
+-      and cannot be changed."
+-  end
+-
+-  newparam(:clone) do
+-    desc "Instead of installing the zone, clone it from another zone.
+-      If the zone root resides on a zfs file system, a snapshot will be
+-      used to create the clone; if it resides on a ufs filesystem, a copy of the
+-      zone will be used. The zone from which you clone must not be running."
+-  end
+-
+-  newproperty(:ip, :parent => Puppet::Property::List) do
+-    require 'ipaddr'
+-
+-    desc "The IP address of the zone.  IP addresses must be specified
+-      with the interface, separated by a colon, e.g.: bge0:192.168.0.1.
+-      For multiple interfaces, specify them in an array."
+-
+-    # The default action of list should is to lst.join(' '). By specifying
+-    # @should, we ensure the should remains an array. If we override should, we
+-    # should also override insync?() -- property/list.rb
+-    def should
+-      @should
+-    end
+-
+-    # overridden so that we match with self.should
+-    def insync?(is)
+-      return true unless is
+-      is = [] if is == :absent
+-      is.sort == self.should.sort
+-    end
+-  end
+-
+-  newproperty(:iptype) do
+-    desc "The IP stack type of the zone."
+-    defaultto :shared
+-    newvalue :shared
+-    newvalue :exclusive
+-  end
+-
+-  newproperty(:autoboot, :boolean => true) do
+-    desc "Whether the zone should automatically boot."
+-    defaultto true
+-    newvalues(:true, :false)
++  newparam(:config_profile) do
++    desc "Path to the config_profile to use to configure a solaris zone.
++          This is set when providing a sysconfig profile instead of running the
++	  sysconfig SCI tool on first boot of the zone."
+   end
+ 
+-  newproperty(:path) do
+-    desc "The root of the zone's filesystem.  Must be a fully qualified
+-      file name.  If you include `%s` in the path, then it will be
+-      replaced with the zone's name.  Currently, you cannot use
+-      Puppet to move a zone. Consequently this is a readonly property."
+-
+-    validate do |value|
+-      raise ArgumentError, "The zone base must be fully qualified" unless value =~ /^\//
+-    end
+-
+-    munge do |value|
+-      if value =~ /%s/
+-        value % @resource[:name]
+-      else
+-        value
+-      end
+-    end
+-  end
+-
+-  newproperty(:pool) do
+-    desc "The resource pool for this zone."
++  newparam(:zonecfg_export) do
++    desc "Contains the zone configuration information. This can be passed in
++    in the form of a file generated by the zonecfg command, in the form
++    of a template, or a string."
+   end
+ 
+-  newproperty(:shares) do
+-    desc "Number of FSS CPU shares allocated to the zone."
++  newparam(:archive) do
++    desc "The archive file containing an archived zone."
+   end
+ 
+-  newproperty(:dataset, :parent => Puppet::Property::List ) do
+-    desc "The list of datasets delegated to the non-global zone from the
+-      global zone.  All datasets must be zfs filesystem names which are
+-      different from the mountpoint."
+-
+-    def should
+-      @should
+-    end
+-
+-    # overridden so that we match with self.should
+-    def insync?(is)
+-      return true unless is
+-      is = [] if is == :absent
+-      is.sort == self.should.sort
+-    end
+-
+-    validate do |value|
+-      unless value !~ /^\//
+-        raise ArgumentError, "Datasets must be the name of a zfs filesystem"
+-      end
+-    end
++  newparam(:archived_zonename) do
++    desc "The archived zone to configure and install"
+   end
+-
+-  newproperty(:inherit, :parent => Puppet::Property::List) do
+-    desc "The list of directories that the zone inherits from the global
+-      zone.  All directories must be fully qualified."
+-
+-    def should
+-      @should
+-    end
+-
+-    # overridden so that we match with self.should
+-    def insync?(is)
+-      return true unless is
+-      is = [] if is == :absent
+-      is.sort == self.should.sort
+-    end
+-
+-    validate do |value|
+-      unless value =~ /^\//
+-        raise ArgumentError, "Inherited filesystems must be fully qualified"
+-      end
+-    end
++  
++  newparam(:clone) do
++    desc "Instead of installing the zone, clone it from another zone.
++      If the zone root resides on a zfs file system, a snapshot will be
++      used to create the clone; if it resides on a ufs filesystem, a copy of the
++      zone will be used. The zone from which you clone must not be running."
+   end
+ 
+   # Specify the sysidcfg file.  This is pretty hackish, because it's
+@@ -286,70 +188,11 @@
+       so Puppet only checks for it at that time.}
+   end
+ 
+-  newparam(:create_args) do
+-    desc "Arguments to the `zonecfg` create command.  This can be used to create branded zones."
+-  end
+-
+   newparam(:install_args) do
+     desc "Arguments to the `zoneadm` install command.  This can be used to create branded zones."
+   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
+-    if @parameters.include? :path
+-      [@parameters[:path].value, ::File.dirname(@parameters[:path].value)]
+-    else
+-      nil
+-    end
+-  end
+-
+-  # If Puppet is also managing the zfs filesystem which is the zone dataset
+-  # then list it as a prerequisite.  Zpool's get autorequired by the zfs
+-  # type.  We just need to autorequire the dataset zfs itself as the zfs type
+-  # will autorequire all of the zfs parents and zpool.
+-  autorequire(:zfs) do
+-    # Check if we have datasets in our zone configuration and autorequire each dataset
+-    self[:dataset] if @parameters.include? :dataset
+-  end
+-
+-  def validate_ip(ip, name)
+-    IPAddr.new(ip) if ip
+-  rescue ArgumentError
+-    self.fail "'#{ip}' is an invalid #{name}"
+-  end
+-
+-  def validate_exclusive(interface, address, router)
+-    return if !interface.nil? and address.nil?
+-    self.fail "only interface may be specified when using exclusive IP stack: #{interface}:#{address}"
+-  end
+-  def validate_shared(interface, address, router)
+-    self.fail "ip must contain interface name and ip address separated by a \":\"" if interface.nil? or address.nil?
+-    [address, router].each do |ip|
+-      validate_ip(address, "IP address") unless ip.nil?
+-    end
+-  end
+-
+-  validate do
+-    return unless self[:ip]
+-    # self[:ip] reflects the type passed from proeprty:ip.should. If we
+-    # override it and pass @should, then we get an array here back.
+-    self[:ip].each do |ip|
+-      interface, address, router = ip.split(':')
+-      if self[:iptype] == :shared
+-        validate_shared(interface, address, router)
+-      else
+-        validate_exclusive(interface, address, router)
+-      end
+-    end
+-  end
+-
+   def retrieve
+-    provider.flush
+     hash = provider.properties
+     return setstatus(hash) unless hash.nil? or hash[:ensure] == :absent
+     # Return all properties as absent.
+@@ -372,4 +215,25 @@
+     end
+     prophash
+   end
++
++  # Private Properties
++  # The following properties are used in conjunction with the "puppet resource zone"
++  # output. They are valid properties for configuring a zone.
++
++  newproperty(:id) do
++    desc "The numerical ID of the zone.  This number is autogenerated
++    and cannot be changed."
++  end
++
++  newproperty(:zonepath) do
++    desc "The path to zone's file system."
++  end
++
++  newproperty(:iptype) do
++    desc "Displays exclusive or shared instance of IP."
++  end
++
++  newproperty(:brand) do
++    desc "The zone's brand type"
++  end
+ end
--- a/components/puppet/patches/puppet-02-zoneprovider.patch	Sat Jul 27 07:19:32 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-Enables puppet provider basic functionality with Solaris 11 zones. Also fixes a bug that
-was introduced with the putback of 15886 into the puppet gate that prevented
-zones networking from being created.
---- puppet-3.0.1/lib/puppet/provider/zone/solaris.rb.orig	2013-02-15 15:00:38.925896083 -0700
-+++ puppet-3.0.1/lib/puppet/provider/zone/solaris.rb	2013-02-15 15:00:48.805231725 -0700
-@@ -31,7 +31,7 @@
- 
-   def multi_conf(name, should, &action)
-     has = properties[name]
--    has = [] if has == :absent
-+    has = [] if has == :absent or has.nil?
-     rms = has - should
-     adds = should - has
-     (rms.map{|o| action.call(:rm,o)} + adds.map{|o| action.call(:add,o)}).join("\n")
-@@ -60,12 +60,36 @@
-     end
-   end
- 
-+  def self.def_net_prop(var, &conf)
-+     define_method(var.to_s) do |v|
-+        o = properties[var]
-+        return '' if o.nil? or o == :absent
-+        o.join(' ')
-+     end
-+     define_method('%s_conf'% var.to_s) do |v| 
-+        multi_conf(var, v, &conf) 
-+     end 
-+  end 
-+
-   def_prop :iptype, "set ip-type=%s"
-   def_prop :autoboot, "set autoboot=%s"
-   def_prop :path, "set zonepath=%s"
-   def_prop :pool, "set pool=%s"
-   def_prop :shares, "add rctl\nset name=zone.cpu-shares\nadd value (priv=privileged,limit=%s,action=none)\nend"
- 
-+  if ['5.11', '5.12'].include? Facter.value(:kernelrelease)
-+    def_net_prop :net_resource do |action, str|
-+       case action
-+        when :add
-+          cmd = [" add anet"]
-+	  cmd << "end"
-+	  cmd.join("\n")
-+        when :rm
-+          " remove anet"
-+        end
-+     end
-+  end
-+
-   def_multiprop :ip do |action, str|
-     interface, ip, defrouter = str.split(':')
-     case action
-@@ -96,20 +120,27 @@
-     end
-   end
- 
--  def_multiprop :inherit do |action, str|
--    case action
--    when :add; ['add inherit-pkg-dir', "set dir=#{str}",'end'].join("\n")
--    when :rm; "remove inherit-pkg-dir dir=#{str}"
--    else self.fail action
-+  if ['5.10'].include? Facter.value(:kernelrelease)
-+    def_multiprop :inherit do |action, str|
-+      case action
-+        when :add; ['add inherit-pkg-dir', "set dir=#{str}",'end'].join("\n")
-+        when :rm; "remove inherit-pkg-dir dir=#{str}"
-+      else self.fail action
-+      end
-     end
-   end
- 
-   def my_properties
--    [:path, :iptype, :autoboot, :pool, :shares, :ip, :dataset, :inherit]
-+    if ['5.11', '5.12'].include? Facter.value(:kernelrelease)
-+       [:path, :iptype, :autoboot, :pool, :shares, :ip, :dataset, :net_resource]
-+    elsif ['5.10'].include? Facter.value(:kernelrelease)
-+       [:path, :iptype, :autoboot, :pool, :shares, :ip, :dataset, :inherit]
-+    end
-   end
- 
-   # Perform all of our configuration steps.
-   def configure
-+
-     self.fail "Path is required" unless @resource[:path]
-     arr = ["create -b #{@resource[:create_args]}"]
- 
-@@ -161,6 +192,14 @@
-   end
- 
-   def install(dummy_argument=:work_arround_for_ruby_GC_bug)
-+    if ['5.11', '5.12'].include? Facter.value(:kernelrelease)
-+       if !@resource[:install_args] and @resource[:config_profile]
-+           @resource[:install_args] = "-c " + @resource[:config_profile]
-+       else
-+	  @resource[:install_args] << "-c " + @resource[:config_profile]
-+       end
-+    end
-+       
-     if @resource[:clone] # TODO: add support for "-s snapshot"
-       zoneadm :clone, @resource[:clone]
-     elsif @resource[:install_args]
-@@ -183,6 +222,7 @@
-       end
-     end
-     @property_hash.dup
-+    
-   end
- 
-   # We need a way to test whether a zone is in process.  Our 'ensure'
-@@ -253,6 +293,7 @@
- 
-   def start
-     # Check the sysidcfg stuff
-+   if ['5.10'].include? Facter.value(:kernelrelease)
-     if cfg = @resource[:sysidcfg]
-       self.fail "Path is required" unless @resource[:path]
-       zoneetc = File.join(@resource[:path], "root", "etc")
-@@ -273,6 +314,7 @@
-         end
-       end
-     end
-+   end
- 
-     zoneadm :boot
-   end
-@@ -300,7 +342,11 @@
-   end
- 
-   def stop
--    zoneadm :halt
-+   if ['5.10'].include? Facter.value(:kernelrelease)
-+     execute_zoneadm :halt
-+   elsif ['5.11', '5.12'].include? Facter.value(:kernelrelease)
-+    zoneadm :shutdown
-+   end
-   end
- 
-   def unconfigure
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/patches/puppet-03-zone-provider.patch	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,362 @@
+Enhance the zone provider to configure zones using a zonecfg export file format.
+Enhance the output of puppet resource zone, and fix zone clone functionality.
+--- puppet-3.2.2/lib/puppet/provider/zone/solaris.rb.orig	2013-07-29 15:48:58.118553584 -0600
++++ puppet-3.2.2/lib/puppet/provider/zone/solaris.rb	2013-07-29 15:49:21.053204412 -0600
+@@ -1,5 +1,5 @@
+ Puppet::Type.type(:zone).provide(:solaris) do
+-  desc "Provider for Solaris Zones."
++  desc "Provider for Solaris zones."
+ 
+   commands :adm => "/usr/sbin/zoneadm", :cfg => "/usr/sbin/zonecfg"
+   defaultfor :osfamily => :solaris
+@@ -8,20 +8,20 @@
+ 
+   # Convert the output of a list into a hash
+   def self.line2hash(line)
+-    fields = [:id, :name, :ensure, :path, :uuid, :brand, :iptype]
++    fields = [:id, :name, :ensure, :zonepath, :uuid, :brand, :iptype ]
+     properties = Hash[fields.zip(line.split(':'))]
+ 
+-    del_id = [:brand, :uuid]
++    del_id = [:id, :uuid]
++
+     # Configured but not installed zones do not have IDs
+     del_id << :id if properties[:id] == "-"
+     del_id.each { |p| properties.delete(p) }
+-
+     properties[:ensure] = properties[:ensure].intern
+-    properties[:iptype] = 'exclusive' if properties[:iptype] == 'excl'
+ 
+     properties
+   end
+ 
++
+   def self.instances
+     # LAK:NOTE See http://snurl.com/21zf8  [groups_google_com]
+     x = adm(:list, "-cp").split("\n").collect do |line|
+@@ -29,109 +29,64 @@
+     end
+   end
+ 
+-  def multi_conf(name, should, &action)
+-    has = properties[name]
+-    has = [] if has == :absent
+-    rms = has - should
+-    adds = should - has
+-    (rms.map{|o| action.call(:rm,o)} + adds.map{|o| action.call(:add,o)}).join("\n")
+-  end
+-
+-  def self.def_prop(var, str)
+-    define_method('%s_conf' % var.to_s) do |v|
+-      str % v
+-    end
+-    define_method('%s=' % var.to_s) do |v|
+-      setconfig self.send( ('%s_conf'% var).intern, v)
+-    end
+-  end
++  
++  # Read in the zone configuration parameters and properties and
++  # perform the zone configuration. Options are cloning the zone,
++  # which needs a zonecfg_export file, configuring an archive, which
++  # takes optional zonecfg_export and archived_zonename parameters,
++  # or performing a zone configuration, which requires a zonecfg_export
++  # file or string.
++  def configure
+ 
+-  def self.def_multiprop(var, &conf)
+-    define_method(var.to_s) do |v|
+-      o = properties[var]
+-      return '' if o.nil? or o == :absent
+-      o.join(' ')
+-    end
+-    define_method('%s=' % var.to_s) do |v|
+-      setconfig self.send( ('%s_conf'% var).intern, v)
+-    end
+-    define_method('%s_conf' % var.to_s) do |v|
+-      multi_conf(var, v, &conf)
++    if @resource[:archive].nil? && @resource[:zonecfg_export].nil?
++      raise Puppet::Error, "No configuration resource is defined."
+     end
+-  end
+ 
+-  def_prop :iptype, "set ip-type=%s"
+-  def_prop :autoboot, "set autoboot=%s"
+-  def_prop :path, "set zonepath=%s"
+-  def_prop :pool, "set pool=%s"
+-  def_prop :shares, "add rctl\nset name=zone.cpu-shares\nadd value (priv=privileged,limit=%s,action=none)\nend"
+-
+-  def_multiprop :ip do |action, str|
+-    interface, ip, defrouter = str.split(':')
+-    case action
+-    when :add
+-      cmd = ["add net"]
+-      cmd << "set physical=#{interface}" if interface
+-      cmd << "set address=#{ip}" if ip
+-      cmd << "set defrouter=#{defrouter}" if defrouter
+-      cmd << "end"
+-      cmd.join("\n")
+-    when :rm
+-      if ip
+-        "remove net address=#{ip}"
+-      elsif interface
+-        "remove net physical=#{interface}"
+-      else
+-        raise ArgumentError, "can not remove network based on default router"
++    command = String.new
++    if @resource[:clone]
++      if !@resource[:zonecfg_export]
++        raise Puppet::Error, "A zone configuration must be defined to
++        clone a zone."
++      end
++      command = "#{command(:cfg)} -z #{@resource[:name]} -f #{@resource[:zonecfg_export]}"
++    else
++      unless @resource[:zonecfg_export].nil? || @resource[:zonecfg_export].empty?
++        begin
++          file = File.open(@resource[:zonecfg_export], "rb")
++          str = file.read.gsub(/[\n]\n*\s*/, "; ")
++        rescue
++          str = @resource[:zonecfg_export].gsub(/[\n]\n*\s*/, "; ")
++        ensure
++          file.close unless file.nil?
++        end
++        @property_hash.clear
+       end
+-    else self.fail action
+-    end
+-  end
+ 
+-  def_multiprop :dataset do |action, str|
+-    case action
+-    when :add; ['add dataset',"set name=#{str}",'end'].join("\n")
+-    when :rm; "remove dataset name=#{str}"
+-    else self.fail action
+-    end
+-  end
++      unless @resource[:archive].nil? || @resource[:archive].empty?
++        if !str.nil?
++          command = "#{command(:cfg)} -z #{@resource[:name]} \'create -a #{@resource[:archive]};#{str}\'"
++        else
++          command = "#{command(:cfg)} -z #{@resource[:name]} create -a #{@resource[:archive]} "
++        end
++        if @resource[:archived_zonename]
++          command << " -z #{@resource[:archived_zonename]}"
++        end
++      end
+ 
+-  def_multiprop :inherit do |action, str|
+-    case action
+-    when :add; ['add inherit-pkg-dir', "set dir=#{str}",'end'].join("\n")
+-    when :rm; "remove inherit-pkg-dir dir=#{str}"
+-    else self.fail action
++      if !@resource[:zonecfg_export].nil? && @resource[:archive].nil?
++        command = "#{command(:cfg)} -z #{@resource[:name]} \'#{str}\'"
++      end
+     end
+-  end
+ 
+-  def my_properties
+-    [:path, :iptype, :autoboot, :pool, :shares, :ip, :dataset, :inherit]
+-  end
+-
+-  # Perform all of our configuration steps.
+-  def configure
+-    self.fail "Path is required" unless @resource[:path]
+-    arr = ["create -b #{@resource[:create_args]}"]
+-
+-    # Then perform all of our configuration steps.  It's annoying
+-    # that we need this much internal info on the resource.
+-    self.resource.properties.each do |property|
+-      next unless my_properties.include? property.name
+-      method = (property.name.to_s + '_conf').intern
+-      arr << self.send(method ,@resource[property.name]) unless property.safe_insync?(properties[property.name])
++    if command
++      r = exec_cmd(:cmd => command)
+     end
+-    setconfig(arr.join("\n"))
+   end
+ 
+   def destroy
+     zonecfg :delete, "-F"
+   end
+ 
+-  def add_cmd(cmd)
+-    @cmds = [] if @cmds.nil?
+-    @cmds << cmd
+-  end
+-
+   def exists?
+     properties[:ensure] != :absent
+   end
+@@ -139,31 +94,31 @@
+   # We cannot use the execpipe in util because the pipe is not opened in
+   # read/write mode.
+   def exec_cmd(var)
+-    # In bash, the exit value of the last command is the exit value of the
+-    # entire pipeline
+-    out = execute("echo \"#{var[:input]}\" | #{var[:cmd]}", :failonfail => false, :combine => true)
+-    st = $?.exitstatus
+-    {:out => out, :exit => st}
+-  end
+-
+-  # Clear out the cached values.
+-  def flush
+-    return if @cmds.nil? || @cmds.empty?
+-    str = (@cmds << "commit" << "exit").join("\n")
+-    @cmds = []
+-    @property_hash.clear
+-
+-    command = "#{command(:cfg)} -z #{@resource[:name]} -f -"
+-    r = exec_cmd(:cmd => command, :input => str)
+-    if r[:exit] != 0 or r[:out] =~ /not allowed/
+-      raise ArgumentError, "Failed to apply configuration"
++    if var[:input]
++    	execute("echo \"#{var[:input]}\" | #{var[:cmd]}", :failonfail => true, :combine => true)
++    else
++        execute("#{var[:cmd]}", :failonfail => true, :combine => true)
+     end
+   end
+ 
++
+   def install(dummy_argument=:work_arround_for_ruby_GC_bug)
++    if ['5.11', '5.12'].include? Facter.value(:kernelrelease)
++       if !@resource[:install_args] and @resource[:config_profile]
++         @resource[:install_args] = " -c " + @resource[:config_profile]
++       elsif !@resource[:install_args] and @resource[:archive]
++         @resource[:install_args] = " -a " + @resource[:archive]
++	     if @resource[:archived_zonename]
++	       @resource[:install_args] << " -z " + @resource[:archived_zonename]
++	     end
++       elsif @resource[:config_profile]
++	     @resource[:install_args] << " -c " + @resource[:config_profile]
++       end
++    end
++       
+     if @resource[:clone] # TODO: add support for "-s snapshot"
+-      zoneadm :clone, @resource[:clone]
+-    elsif @resource[:install_args]
++      zoneadm :clone, @resource[:clone] 
++    elsif @resource[:install_args] 
+       zoneadm :install, @resource[:install_args].split(" ")
+     else
+       zoneadm :install
+@@ -183,11 +138,12 @@
+       end
+     end
+     @property_hash.dup
++    
+   end
+ 
+   # We need a way to test whether a zone is in process.  Our 'ensure'
+   # property models the static states, but we need to handle the temporary ones.
+-  def processing?
++  def processing?  
+     hash = status
+     return false unless hash
+     ["incomplete", "ready", "shutting_down"].include? hash[:ensure]
+@@ -215,7 +171,6 @@
+   #
+   def getconfig
+     output = zonecfg :info
+-
+     name = nil
+     current = nil
+     hash = {}
+@@ -245,14 +200,9 @@
+     hash
+   end
+ 
+-  # Execute a configuration string.  Can't be private because it's called
+-  # by the properties.
+-  def setconfig(str)
+-    add_cmd str
+-  end
+-
+   def start
+     # Check the sysidcfg stuff
++   if ['5.10'].include? Facter.value(:kernelrelease)
+     if cfg = @resource[:sysidcfg]
+       self.fail "Path is required" unless @resource[:path]
+       zoneetc = File.join(@resource[:path], "root", "etc")
+@@ -273,7 +223,9 @@
+         end
+       end
+     end
++   end
+ 
++    # Boots the zone
+     zoneadm :boot
+   end
+ 
+@@ -286,64 +238,35 @@
+     end
+ 
+     main = self.class.line2hash(output.chomp)
+-
+-    # Now add in the configuration information
+-    config_status.each do |name, value|
+-      main[name] = value
+-    end
+-
+     main
+   end
+ 
+   def ready
++    # Prepare the zone
+     zoneadm :ready
+   end
+ 
+   def stop
+-    zoneadm :halt
++     # Shutdown the zone
++     zoneadm :halt
+   end
++  
+ 
+   def unconfigure
++    # Unconfigure and delete the zone
+     zonecfg :delete, "-F"
+   end
+ 
+   def uninstall
++    # Uninstall the zone
+     zoneadm :uninstall, "-F"
+   end
+ 
+   private
+ 
+-  # Turn the results of getconfig into status information.
+-  def config_status
+-    config = getconfig
+-    result = {}
+-
+-    result[:autoboot] = config[:autoboot] ? config[:autoboot].intern : :true
+-    result[:pool] = config[:pool]
+-    result[:shares] = config[:shares]
+-    if dir = config["inherit-pkg-dir"]
+-      result[:inherit] = dir.collect { |dirs| dirs[:dir] }
+-    end
+-    if datasets = config["dataset"]
+-      result[:dataset] = datasets.collect { |dataset| dataset[:name] }
+-    end
+-    result[:iptype] = config[:'ip-type'] if config[:'ip-type']
+-    if net = config["net"]
+-      result[:ip] = net.collect do |params|
+-        if params[:defrouter]
+-          "#{params[:physical]}:#{params[:address]}:#{params[:defrouter]}"
+-        elsif params[:address]
+-          "#{params[:physical]}:#{params[:address]}"
+-        else
+-          params[:physical]
+-        end
+-      end
+-    end
+-
+-    result
+-  end
+-
+   def zoneadm(*cmd)
++    # Execute the zoneadm command with the arguments
++    # provided
+     adm("-z", @resource[:name], *cmd)
+   rescue Puppet::ExecutionFailure => detail
+     self.fail "Could not #{cmd[0]} zone: #{detail}"
--- a/components/puppet/patches/puppet-03-zonetype.patch	Sat Jul 27 07:19:32 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-The puppet zone type changes that enable basic functionality with Solaris 11
-zones. Includes the type changes to fix a bug introduced by the putback of
-15886 into the puppet gate that prevented zones networking from being created.  
-
---- puppet-3.0.1/lib/puppet/type/zone.rb.orig	2013-02-15 16:08:16.530618507 -0700
-+++ puppet-3.0.1/lib/puppet/type/zone.rb	2013-02-15 08:24:18.530373776 -0700
-@@ -133,6 +133,12 @@
-     isnamevar
-   end
- 
-+  newparam(:config_profile) do
-+    desc "Path to the config_profile to use for installation of a solaris zone.
-+          This is set when providing a sysconfig profile instead of running the
-+	  sysconfig SCI tool on first boot of the zone."
-+  end
-+
-   newparam(:id) do
-     desc "The numerical ID of the zone.  This number is autogenerated
-       and cannot be changed."
-@@ -161,19 +167,44 @@
- 
-     # overridden so that we match with self.should
-     def insync?(is)
--      return true unless is
--      is = [] if is == :absent
-+      is = [] if is == :absent or is.nil?
-       is.sort == self.should.sort
-     end
-   end
- 
-   newproperty(:iptype) do
--    desc "The IP stack type of the zone."
--    defaultto :shared
-+    desc "The IP stack type of the zone. The default is to exclusive."
-+    if ['5.11', '5.12'].include? Facter.value(:kernelrelease)
-+       defaultto :exclusive
-+    else
-+       defaultto :shared
-+    end
-     newvalue :shared
-     newvalue :exclusive
-   end
- 
-+  newproperty(:net_resource, :parent => Puppet::Property::List) do
-+    desc "The net resource assigned network resource to a zone. The net
-+          resource represents the assignment of a physical network resource
-+	   to a zone. The anet resource represents the automatic creation of a
-+	   network resource for an exclusive-IP zone. This property only needs
-+          to be set if additional network resources are desired. By default
-+          an anet resource is created for the zone. To add additional net
-+          or anet services"
-+    newvalue :anet
-+    newvalue :net
-+
-+    def should
-+      @should
-+    end
-+
-+    # overridden so that we match with self.should
-+    def insync?(is)
-+      is = [] if is == :absent or is.nil?
-+      is.sort == self.should.sort
-+    end
-+  end
-+
-   newproperty(:autoboot, :boolean => true) do
-     desc "Whether the zone should automatically boot."
-     defaultto true
-@@ -218,8 +249,7 @@
- 
-     # overridden so that we match with self.should
-     def insync?(is)
--      return true unless is
--      is = [] if is == :absent
-+      is = [] if is == :absent or is.nil?
-       is.sort == self.should.sort
-     end
- 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/patches/puppet-04-agent-auditing.patch	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,36 @@
+Add auditing support to agent execution
+
+--- puppet-3.2.2/lib/puppet/agent.rb.orig	2013-03-08 16:03:45.000000000 -0700
++++ puppet-3.2.2/lib/puppet/agent.rb	2013-03-08 16:03:45.000000000 -0700
+@@ -1,5 +1,8 @@
+ require 'sync'
+ require 'puppet/application'
++if Facter.value(:osfamily) == "Solaris"
++  require 'PuppetAudit'
++end
+ 
+ # A general class for triggering a run of another
+ # class.
+@@ -35,6 +38,11 @@
+       return
+     end
+ 
++    if Facter.value(:osfamily) == "Solaris"
++        audit_handle = PuppetAudit.new
++        audit_handle.audit_start
++    end
++
+     result = nil
+     block_run = Puppet::Application.controlled_run do
+       splay
+@@ -50,6 +58,10 @@
+           end
+         end
+       end
++      if Facter.value(:osfamily) == "Solaris"
++          audit_handle.audit_stop
++          audit_handle.audit_teardown
++      end
+       true
+     end
+     Puppet.notice "Shutdown/restart in progress (#{Puppet::Application.run_status.inspect}); skipping run" unless block_run
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/patches/puppet-05-apply-auditing.patch	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,38 @@
+Add auditing hooks for puppet apply
+--- puppet-3.2.2/lib/puppet/application/apply.rb.orig	2013-06-13 12:15:55.000000000 -0600
++++ puppet-3.2.2/lib/puppet/application/apply.rb	2013-07-01 14:02:10.263603171 -0600
+@@ -1,5 +1,8 @@
+ require 'puppet/application'
+ require 'puppet/configurer'
++if Facter.value(:osfamily) == "Solaris"
++  require 'PuppetAudit'
++end
+ 
+ class Puppet::Application::Apply < Puppet::Application
+ 
+@@ -204,6 +207,12 @@
+     end
+ 
+     begin
++      # configure auditing on Solaris
++      if Facter.value(:osfamily) == "Solaris"
++          audit_handle = PuppetAudit.new
++          audit_handle.audit_start
++      end
++
+       # Compile our catalog
+       starttime = Time.now
+       catalog = Puppet::Resource::Catalog.indirection.find(node.name, :use_node => node)
+@@ -232,6 +241,12 @@
+     rescue => detail
+       Puppet.log_exception(detail)
+       exit(1)
++    ensure
++      # clean up auditing records on Solaris
++      if Facter.value(:osfamily) == "Solaris"
++          audit_handle.audit_stop
++          audit_handle.audit_teardown
++      end
+     end
+   end
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/puppet/patches/puppet-06-provider-smf.patch	Mon Jul 29 16:02:38 2013 -0600
@@ -0,0 +1,24 @@
+Add check for existence of smf service
+--- puppet-3.2.2/lib/puppet/provider/service/smf.rb.orig	2013-07-15 09:23:24.667341073 -0600
++++ puppet-3.2.2/lib/puppet/provider/service/smf.rb	2013-07-15 10:13:03.196178924 -0600
+@@ -80,9 +80,18 @@
+       return
+     end
+ 
++    # get the current state and the next state, and if the next
++    # state is set (i.e. not "-") use it for state comparison
++
++    # Check to see if the service exists
++    cmd = Array[command(:svccfg), "select", @resource[:name]]
++    output = Puppet::Util::Execution.execute(
++        cmd, :combine => true, :failonfail => false)
++    if $CHILD_STATUS.exitstatus != 0
++      info output
++    end
++
+     begin
+-      # get the current state and the next state, and if the next
+-      # state is set (i.e. not "-") use it for state comparison
+       states = svcs("-H", "-o", "state,nstate", @resource[:name]).chomp.split
+       state = states[1] == "-" ? states[0] : states[1]
+     rescue Puppet::ExecutionFailure
--- a/components/puppet/puppet.p5m	Sat Jul 27 07:19:32 2013 -0700
+++ b/components/puppet/puppet.p5m	Mon Jul 29 16:02:38 2013 -0600
@@ -42,12 +42,134 @@
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
 dir  path=etc/puppet owner=puppet group=puppet mode=0755
 file path=etc/puppet/auth.conf owner=puppet group=bin mode=0444
+file files/solaris/lib/puppet/provider/address_object/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/address_object/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/address_properties/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/address_properties/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/boot_environment/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/boot_environment/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/dns/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/dns/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/etherstub/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/etherstub/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/interface_properties/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/interface_properties/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/ip_interface/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/ip_interface/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/ip_tunnel/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/ip_tunnel/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/ipmp_interface/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/ipmp_interface/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/ldap/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/ldap/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/link_aggregation/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/link_aggregation/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/link_properties/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/link_properties/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/nis/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/nis/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/nsswitch/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/nsswitch/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/pkg_facet/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/pkg_facet/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/pkg_mediator/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/pkg_mediator/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/pkg_publisher/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/pkg_publisher/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/pkg_variant/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/pkg_variant/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/protocol_properties/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/protocol_properties/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/solaris_vlan/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/solaris_vlan/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/svccfg/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/svccfg/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/vni_interface/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/vni_interface/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/provider/vnic/solaris.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/provider/vnic/solaris.rb \
+    mode=0555
+file files/solaris/lib/puppet/type/address_object.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/address_object.rb mode=0555
+file files/solaris/lib/puppet/type/address_properties.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/address_properties.rb \
+    mode=0555
+file files/solaris/lib/puppet/type/boot_environment.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/boot_environment.rb \
+    mode=0555
+file files/solaris/lib/puppet/type/dns.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/dns.rb mode=0555
+file files/solaris/lib/puppet/type/etherstub.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/etherstub.rb mode=0555
+file files/solaris/lib/puppet/type/interface_properties.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/interface_properties.rb \
+    mode=0555
+file files/solaris/lib/puppet/type/ip_interface.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/ip_interface.rb mode=0555
+file files/solaris/lib/puppet/type/ip_tunnel.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/ip_tunnel.rb mode=0555
+file files/solaris/lib/puppet/type/ipmp_interface.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/ipmp_interface.rb mode=0555
+file files/solaris/lib/puppet/type/ldap.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/ldap.rb mode=0555
+file files/solaris/lib/puppet/type/link_aggregation.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/link_aggregation.rb \
+    mode=0555
+file files/solaris/lib/puppet/type/link_properties.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/link_properties.rb \
+    mode=0555
+file files/solaris/lib/puppet/type/nis.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/nis.rb mode=0555
+file files/solaris/lib/puppet/type/nsswitch.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/nsswitch.rb mode=0555
+file files/solaris/lib/puppet/type/pkg_facet.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/pkg_facet.rb mode=0555
+file files/solaris/lib/puppet/type/pkg_mediator.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/pkg_mediator.rb mode=0555
+file files/solaris/lib/puppet/type/pkg_publisher.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/pkg_publisher.rb mode=0555
+file files/solaris/lib/puppet/type/pkg_variant.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/pkg_variant.rb mode=0555
+file files/solaris/lib/puppet/type/protocol_properties.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/protocol_properties.rb \
+    mode=0555
+file files/solaris/lib/puppet/type/solaris_vlan.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/solaris_vlan.rb mode=0555
+file files/solaris/lib/puppet/type/svccfg.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/svccfg.rb mode=0555
+file files/solaris/lib/puppet/type/vni_interface.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/vni_interface.rb mode=0555
+file files/solaris/lib/puppet/type/vnic.rb \
+    path=etc/puppet/modules/solaris/lib/puppet/type/vnic.rb mode=0555
 file files/auth_attr path=etc/security/auth_attr.d/puppet
 file files/prof_attr path=etc/security/prof_attr.d/puppet
-file files/puppet-agent.xml path=lib/svc/manifest/application/puppet-agent.xml
-file files/puppet-master.xml path=lib/svc/manifest/application/puppet-master.xml
-file files/puppet_agent path=lib/svc/method/puppet_agent mode=0555
-file files/puppet_master path=lib/svc/method/puppet_master mode=0555
+file files/user_attr path=etc/user_attr.d/puppet
+file files/puppet.xml path=lib/svc/manifest/application/puppet.xml
+file files/puppet.stencil path=lib/svc/stencils/puppet.stencil
+file ext/PuppetAudit.so \
+    path=usr/ruby/1.8/lib/ruby/vendor_ruby/1.8/$(MACH)-solaris$(SOLARIS_VERSION)/PuppetAudit.so
 file path=usr/ruby/1.8/lib/ruby/vendor_ruby/1.8/hiera/backend/puppet_backend.rb
 file path=usr/ruby/1.8/lib/ruby/vendor_ruby/1.8/hiera/scope.rb
 file path=usr/ruby/1.8/lib/ruby/vendor_ruby/1.8/hiera_puppet.rb
--- a/components/puppet/resolve.deps	Sat Jul 27 07:19:32 2013 -0700
+++ b/components/puppet/resolve.deps	Mon Jul 29 16:02:38 2013 -0600
@@ -1,3 +1,6 @@
 runtime/ruby-18
 shell/ksh93
 system/core-os
+system/library
+system/library/math
+system/linker
--- a/make-rules/shared-macros.mk	Sat Jul 27 07:19:32 2013 -0700
+++ b/make-rules/shared-macros.mk	Mon Jul 29 16:02:38 2013 -0600
@@ -282,6 +282,7 @@
 RUBY_VERSION =	1.8
 RUBY.1.8 =	/usr/bin/ruby18
 VENDOR_RUBY =	/usr/ruby/$(RUBY_VERSION)/lib/ruby/vendor_ruby/$(RUBY_VERSION)
+RUBY =		$(RUBY.$(RUBY_VERSION))
 
 PYTHON_VENDOR_PACKAGES.32 = /usr/lib/python$(PYTHON_VERSION)/vendor-packages
 PYTHON_VENDOR_PACKAGES.64 = /usr/lib/python$(PYTHON_VERSION)/vendor-packages/64