components/puppet/files/solaris/lib/puppet/type/pkg_variant.rb
changeset 1409 9db4ba32e740
equal deleted inserted replaced
1408:8bc5df437e67 1409:9db4ba32e740
       
     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(:pkg_variant) do
       
    27     @doc = "Manage Oracle Solaris package variants"
       
    28 
       
    29     ensurable do
       
    30         # remove the ability to specify :absent as deletion of variants is not
       
    31         # supported.  New values must be set.
       
    32         newvalue(:present) do
       
    33             provider.create
       
    34         end
       
    35     end
       
    36 
       
    37     newparam(:name) do
       
    38         desc "The variant name"
       
    39         isnamevar
       
    40     end
       
    41 
       
    42     newproperty(:value) do
       
    43         desc "The value for the variant"
       
    44     end
       
    45 end