|
1 # |
|
2 # CDDL HEADER START |
|
3 # |
|
4 # The contents of this file are subject to the terms of the |
|
5 # Common Development and Distribution License (the "License"). |
|
6 # You may not use this file except in compliance with the License. |
|
7 # |
|
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 # or http://www.opensolaris.org/os/licensing. |
|
10 # See the License for the specific language governing permissions |
|
11 # and limitations under the License. |
|
12 # |
|
13 # When distributing Covered Code, include this CDDL HEADER in each |
|
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 # If applicable, add the following below this CDDL HEADER, with the |
|
16 # fields enclosed by brackets "[]" replaced with your own identifying |
|
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 # |
|
19 # CDDL HEADER END |
|
20 # |
|
21 |
|
22 # |
|
23 # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
|
24 # |
|
25 |
|
26 Puppet::Type.newtype(:address_object) do |
|
27 @doc = "Manage the configuration of Oracle Solaris address objects" |
|
28 |
|
29 ensurable |
|
30 |
|
31 newparam(:name) do |
|
32 desc "The name of the address object or interface" |
|
33 isnamevar |
|
34 end |
|
35 |
|
36 newparam(:temporary) do |
|
37 desc "Optional parameter that specifies that the address object is |
|
38 temporary. Temporary aggreation links last until the next |
|
39 reboot." |
|
40 newvalues(:true, :false) |
|
41 end |
|
42 |
|
43 newproperty(:address_type) do |
|
44 desc "The type of address object to create. Valid values are static, |
|
45 dhcp, addrconf." |
|
46 # add from_gz as a valid value, even though users should not specify it |
|
47 newvalues(:static, :dhcp, :addrconf, :from_gz) |
|
48 end |
|
49 |
|
50 newproperty(:enable) do |
|
51 desc "Specifies the address object should be enabled or disabled. |
|
52 Valid values are true, false" |
|
53 newvalues(:true, :false) |
|
54 end |
|
55 |
|
56 newproperty(:address) do |
|
57 desc "A literal IP address or a hostname corresponding to the local |
|
58 end-point. An optional prefix length may be specified. Only |
|
59 valid with an address_type of 'static'" |
|
60 end |
|
61 |
|
62 newproperty(:remote_address) do |
|
63 desc "A literal IP address or a hostname corresponding to an optional |
|
64 remote end-point. An optional prefix length may be specified. |
|
65 Only valid with an address_type of 'static'" |
|
66 end |
|
67 |
|
68 newproperty(:down) do |
|
69 desc "Specifies that the configured address should be marked down. |
|
70 Only valid with an address_type of 'static'. Valid values are |
|
71 true, false" |
|
72 newvalues(:true, :false) |
|
73 end |
|
74 |
|
75 newproperty(:seconds) do |
|
76 desc "Specifies the amount of time in seconds to wait until the |
|
77 operation completes. Only valid with an address_type of |
|
78 'dhcp'. Valid values are a numerical value in seconds or |
|
79 'forever'" |
|
80 end |
|
81 |
|
82 newproperty(:hostname) do |
|
83 desc "Specifies the hostname to which the client would like the DHCP |
|
84 server to map the client's leased IPv4 address. Only valid |
|
85 with an address_type of 'dhcp'" |
|
86 end |
|
87 |
|
88 newproperty(:interface_id) do |
|
89 desc "Specifies the local interface ID to be used for generating |
|
90 auto-configured addresses. Only valid with an address_type of |
|
91 'addrconf'" |
|
92 end |
|
93 |
|
94 newproperty(:remote_interface_id) do |
|
95 desc "Specifies an optional remote interface ID to be used for |
|
96 generating auto-configured addresses. Only valid with an |
|
97 address_type of 'addrconf'" |
|
98 end |
|
99 |
|
100 newproperty(:stateful) do |
|
101 desc "Specifies if stateful auto-configuration should be enabled or |
|
102 not. Valid values are yes, no" |
|
103 newvalues(:yes, :no) |
|
104 end |
|
105 |
|
106 newproperty(:stateless) do |
|
107 desc "Specifies if stateless auto-configuration should be enabled or |
|
108 not. Valid values are yes, no" |
|
109 newvalues(:yes, :no) |
|
110 end |
|
111 end |