equal
deleted
inserted
replaced
18 # |
18 # |
19 # CDDL HEADER END |
19 # CDDL HEADER END |
20 # |
20 # |
21 |
21 |
22 # |
22 # |
23 # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
23 # Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. |
24 # |
24 # |
25 |
25 |
26 Puppet::Type.newtype(:svccfg) do |
26 Puppet::Type.newtype(:svccfg) do |
27 @doc = "Manage SMF service properties with svccfg(1M)." |
27 @doc = "Manage SMF service properties with svccfg(1M)." |
28 |
28 |
40 end |
40 end |
41 end |
41 end |
42 |
42 |
43 newparam(:name) do |
43 newparam(:name) do |
44 desc "The symbolic name for properties to manipulate. This name is |
44 desc "The symbolic name for properties to manipulate. This name is |
45 used for human reference only" |
45 meaningful only within Puppet manifests and not expressed to |
|
46 SMF in any way." |
46 isnamevar |
47 isnamevar |
47 end |
48 end |
48 |
49 |
49 newparam(:fmri) do |
50 newparam(:fmri) do |
50 desc "SMF service FMRI to manipulate" |
51 desc "SMF service FMRI to manipulate" |
51 end |
52 end |
52 |
53 |
53 newparam(:property) do |
54 newparam(:property) do |
54 desc "Name of property - includes Property Group and Propery" |
55 desc "Name of property - includes Property Group and Property. If |
|
56 the service, instance, or property group does not exist, they |
|
57 will be created." |
55 end |
58 end |
56 |
59 |
57 newparam(:type) do |
60 newparam(:type) do |
58 desc "Type of the property" |
61 desc "Type of the property" |
59 end |
62 end |
60 |
63 |
61 newparam(:value) do |
64 newparam(:value) do |
62 desc "Value of the property" |
65 desc "Value of the property" |
63 munge do |value| |
66 munge do |value| |
64 # cast the value to an array |
67 # cast the value to an array. This is done for the case where a |
|
68 # property needs to be set. exists? will undo all of this and |
|
69 # revert the value into a simple string for comparisons. |
65 if not value.is_a? Array |
70 if not value.is_a? Array |
66 value = Array[value] |
71 value = Array[value] |
67 end |
72 end |
68 |
73 |
69 # wrap each entry in quotes |
74 # wrap each entry in quotes |