components/puppet/files/solaris/lib/puppet/type/address_object.rb
branchs11-update
changeset 3151 0dbc999aeec2
parent 2771 8e4227dc2fc4
child 2038 b64efc6f1fe1
equal deleted inserted replaced
3150:c958fe6a1b22 3151:0dbc999aeec2
    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(:address_object) do
    26 Puppet::Type.newtype(:address_object) do
    27     @doc = "Manage the configuration of Oracle Solaris address objects"
    27     @doc = "Manage the configuration of Oracle Solaris address objects"
    28 
    28 
    33         isnamevar
    33         isnamevar
    34     end
    34     end
    35 
    35 
    36     newparam(:temporary) do
    36     newparam(:temporary) do
    37         desc "Optional parameter that specifies that the address object is
    37         desc "Optional parameter that specifies that the address object is
    38               temporary.  Temporary aggreation links last until the next
    38               temporary.  Temporary aggregation links last until the next
    39               reboot."
    39               reboot."
    40         newvalues(:true, :false)
    40         newvalues(:true, :false)
    41     end
    41     end
    42 
    42 
    43     newproperty(:address_type) do
    43     newproperty(:address_type) do
    46         # add from_gz as a valid value, even though users should not specify it
    46         # add from_gz as a valid value, even though users should not specify it
    47         newvalues(:static, :dhcp, :addrconf, :from_gz)
    47         newvalues(:static, :dhcp, :addrconf, :from_gz)
    48     end
    48     end
    49 
    49 
    50     newproperty(:enable) do
    50     newproperty(:enable) do
    51         desc "Specifies the address object should be enabled or disabled.
    51         desc "Specifies the address object should be enabled or disabled."
    52               Valid values are true, false"
       
    53         newvalues(:true, :false)
    52         newvalues(:true, :false)
    54     end
    53     end
    55 
    54 
    56     newproperty(:address) do
    55     newproperty(:address) do
    57         desc "A literal IP address or a hostname corresponding to the local
    56         desc "A literal IP address or a hostname corresponding to the local
    65               Only valid with an address_type of 'static'"
    64               Only valid with an address_type of 'static'"
    66     end
    65     end
    67 
    66 
    68     newproperty(:down) do
    67     newproperty(:down) do
    69         desc "Specifies that the configured address should be marked down.
    68         desc "Specifies that the configured address should be marked down.
    70               Only valid with an address_type of 'static'.  Valid values are
    69               Only valid with an address_type of 'static'."
    71               true, false"
       
    72         newvalues(:true, :false)
    70         newvalues(:true, :false)
    73     end
    71     end
    74 
    72 
    75     newproperty(:seconds) do
    73     newproperty(:seconds) do
    76         desc "Specifies the amount of time in seconds to wait until the
    74         desc "Specifies the amount of time in seconds to wait until the
    97               address_type of 'addrconf'"
    95               address_type of 'addrconf'"
    98     end
    96     end
    99 
    97 
   100     newproperty(:stateful) do
    98     newproperty(:stateful) do
   101         desc "Specifies if stateful auto-configuration should be enabled or
    99         desc "Specifies if stateful auto-configuration should be enabled or
   102               not.  Valid values are yes, no"
   100               not."
   103         newvalues(:yes, :no)
   101         newvalues(:yes, :no)
   104     end
   102     end
   105 
   103 
   106     newproperty(:stateless) do
   104     newproperty(:stateless) do
   107         desc "Specifies if stateless auto-configuration should be enabled or
   105         desc "Specifies if stateless auto-configuration should be enabled or
   108               not.  Valid values are yes, no"
   106               not."
   109         newvalues(:yes, :no)
   107         newvalues(:yes, :no)
   110     end
   108     end
   111 end
   109 end