components/ruby/puppet/files/solaris/lib/puppet/type/ldap.rb
author Sowrabha H G <sowrabha.hg@oracle.com>
Wed, 26 Aug 2015 09:14:51 -0700
branchs11u3-sru
changeset 5024 10f6f5e98268
parent 3458 4912663e9858
permissions -rw-r--r--
PSARC 2015/334 Puppet LDAP Service Search Descriptor 20114694 provide Puppet LDAP search service descriptor
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     1
#
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     3
#
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     7
#
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    12
#
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    18
#
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    20
#
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    21
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    22
#
5024
10f6f5e98268 PSARC 2015/334 Puppet LDAP Service Search Descriptor
Sowrabha H G <sowrabha.hg@oracle.com>
parents: 3458
diff changeset
    23
# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    24
#
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    25
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    26
require 'ipaddr'
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    27
require 'puppet/property/list'
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    28
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    29
def valid_hostname?(hostname)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    30
    return false if hostname.length > 255 or hostname.scan('..').any?
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    31
    hostname = hostname[0...-1] if hostname.index('.', -1)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    32
    return hostname.split('.').collect { |i|
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    33
        i.size <= 63 and
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    34
        not (i.rindex('-', 0) or i.index('-', -1) or i.scan(/[^a-z\d-]/i).any?)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    35
    }.all?
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    36
end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    37
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    38
def valid_ip?(value)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    39
    begin
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    40
        ip = IPAddr.new(value)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    41
    rescue ArgumentError
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    42
        return false
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    43
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    44
    return true
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    45
end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    46
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    47
Puppet::Type.newtype(:ldap) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    48
    @doc = "Manage the configuration of the LDAP client for Oracle Solaris"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    49
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    50
    newparam(:name) do
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    51
        desc "The symbolic name for the LDAP client settings to use.  This name
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    52
              is used for human reference only."
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    53
        isnamevar
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    54
    end
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    55
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    56
    newproperty(:profile) do
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    57
        desc "The LDAP profile name"
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    58
        class << self
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    59
            attr_accessor :pg
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    60
        end
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    61
        self.pg = "config"
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    62
        desc "The LDAP profile name"
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    63
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    64
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    65
    newproperty(:server_list, :parent => Puppet::Property::List) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    66
        desc "LDAP server names or addresses.  Specify multiple servers as an
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    67
              array"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    68
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    69
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    70
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    71
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    72
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    73
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    74
        # ensure should remains an array
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    75
        def should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    76
            @should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    77
        end
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
    78
        
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    79
        def insync?(is)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    80
            is = [] if is == :absent or is.nil?
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    81
            is.sort == self.should.sort
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    82
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    83
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    84
        # svcprop returns multivalue entries delimited with a space
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    85
        def delimiter
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    86
            " "
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    87
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    88
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    89
        validate do |value|
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    90
            raise Puppet::Error, "default_server entry:  #{value} is 
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    91
                invalid" if not valid_ip?(value) and not valid_hostname?(value)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    92
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    93
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    94
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    95
    newproperty(:preferred_server_list, :parent => Puppet::Property::List) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    96
        desc "LDAP server(s) to contact before any servers listed in
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    97
              default_server_list"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    98
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
    99
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   100
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   101
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   102
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   103
        # ensure should remains an array
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   104
        def should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   105
            @should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   106
        end
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
   107
        
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   108
        def insync?(is)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   109
            is = [] if is == :absent or is.nil?
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   110
            is.sort == self.should.sort
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   111
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   112
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   113
        # svcprop returns multivalue entries delimited with a space
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   114
        def delimiter
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   115
            " "
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   116
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   117
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   118
        validate do |value|
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   119
            raise Puppet::Error, "preferred_server entry:  #{value} is 
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   120
                invalid" if not valid_ip?(value) and not valid_hostname?(value)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   121
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   122
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   123
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   124
    newproperty(:search_base) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   125
        desc "The default search base DN"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   126
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   127
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   128
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   129
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   130
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   131
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   132
    newproperty(:search_scope) do
3151
0dbc999aeec2 18713757 'puppet resource service' outputs incorrect services
Drew Fisher <drew.fisher@oracle.com>
parents: 2928
diff changeset
   133
        desc "The default search scope for the client's search operations."
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   134
        newvalues("base", "one", "sub")
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   135
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   136
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   137
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   138
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   139
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   140
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   141
    newproperty(:authentication_method, :parent => Puppet::Property::List) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   142
        desc "The default authentication method(s).  Specify multiple methods
3151
0dbc999aeec2 18713757 'puppet resource service' outputs incorrect services
Drew Fisher <drew.fisher@oracle.com>
parents: 2928
diff changeset
   143
              as an array."
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   144
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   145
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   146
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   147
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   148
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   149
        
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   150
        # ensure should remains an array
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   151
        def should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   152
            @should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   153
        end
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
   154
        
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   155
        def insync?(is)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   156
            is = [] if is == :absent or is.nil?
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   157
            is.sort == self.should.sort
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   158
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   159
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   160
        # svcprop returns multivalue entries delimited with a space
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   161
        def delimiter
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   162
            " "
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   163
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   164
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   165
        newvalues("none", "simple", "sasl/CRAM-MD5", "sasl/DIGEST-MD5",
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   166
                  "sasl/GSSAPI", "tls:simple", "tls:sasl/CRAM-MD5",
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   167
                  "tls:sasl/DIGEST-MD5")
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   168
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   169
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   170
    newproperty(:credential_level) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   171
        desc "The credential level the client should use to contact the
3151
0dbc999aeec2 18713757 'puppet resource service' outputs incorrect services
Drew Fisher <drew.fisher@oracle.com>
parents: 2928
diff changeset
   172
              directory."
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   173
        newvalues("anonymous", "proxy", "self")
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   174
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   175
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   176
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   177
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   178
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   179
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   180
    newproperty(:search_time_limit) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   181
        desc "The maximum number of seconds allowed for an LDAP search
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   182
              operation."
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   183
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   184
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   185
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   186
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   187
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   188
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   189
    newproperty(:bind_time_limit) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   190
        desc "The maximum number of seconds a client should spend performing a
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   191
              bind operation."
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   192
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   193
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   194
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   195
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   196
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   197
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   198
    newproperty(:follow_referrals) do
3151
0dbc999aeec2 18713757 'puppet resource service' outputs incorrect services
Drew Fisher <drew.fisher@oracle.com>
parents: 2928
diff changeset
   199
        desc "The referral setting."
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   200
        newvalues(:true, :false)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   201
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   202
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   203
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   204
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   205
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   206
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   207
    newproperty(:profile_ttl) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   208
        desc "The TTL value in seconds for the client information"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   209
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   210
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   211
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   212
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   213
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   214
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   215
    newproperty(:attribute_map, :parent => Puppet::Property::List) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   216
        desc "A mapping from an attribute defined by a service to an attribute
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   217
              in an alternative schema.  Specify multiple mappings as an array."
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   218
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   219
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   220
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   221
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   222
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   223
        
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   224
        # ensure should remains an array
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   225
        def should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   226
            @should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   227
        end
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
   228
        
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   229
        def insync?(is)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   230
            is = [] if is == :absent or is.nil?
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   231
            is.sort == self.should.sort
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   232
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   233
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   234
        # svcprop returns multivalue entries delimited with a space
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   235
        def delimiter
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   236
            " "
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   237
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   238
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   239
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   240
    newproperty(:objectclass_map, :parent => Puppet::Property::List) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   241
        desc "A  mapping from an objectclass defined by a service to an
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   242
              objectclass in an alternative schema.  Specify multiple mappings
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   243
              as an array."
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   244
        
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   245
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   246
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   247
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   248
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   249
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   250
        # ensure should remains an array
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   251
        def should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   252
            @should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   253
        end
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
   254
        
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   255
        def insync?(is)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   256
            is = [] if is == :absent or is.nil?
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   257
            is.sort == self.should.sort
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   258
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   259
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   260
        # svcprop returns multivalue entries delimited with a space
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   261
        def delimiter
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   262
            " "
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   263
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   264
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   265
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   266
    newproperty(:service_credential_level) do
3151
0dbc999aeec2 18713757 'puppet resource service' outputs incorrect services
Drew Fisher <drew.fisher@oracle.com>
parents: 2928
diff changeset
   267
        desc "The credential level to be used by a service."
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   268
        newvalues("anonymous", "proxy")
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   269
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   270
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   271
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   272
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   273
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   274
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   275
    newproperty(:service_authentication_method,
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   276
                :parent => Puppet::Property::List) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   277
        desc "The authentication method to be used by a service.  Specify
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   278
              multiple methods as an array."
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   279
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   280
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   281
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   282
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   283
        self.pg = "config"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   284
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   285
        # ensure should remains an array
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   286
        def should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   287
            @should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   288
        end
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
   289
        
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   290
        def insync?(is)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   291
            is = [] if is == :absent or is.nil?
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   292
            is.sort == self.should.sort
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   293
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   294
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   295
        # svcprop returns multivalue entries delimited with a space
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   296
        def delimiter
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   297
            " "
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   298
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   299
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   300
5024
10f6f5e98268 PSARC 2015/334 Puppet LDAP Service Search Descriptor
Sowrabha H G <sowrabha.hg@oracle.com>
parents: 3458
diff changeset
   301
    newproperty(:service_search_descriptor) do
10f6f5e98268 PSARC 2015/334 Puppet LDAP Service Search Descriptor
Sowrabha H G <sowrabha.hg@oracle.com>
parents: 3458
diff changeset
   302
        desc "How and where LDAP should search for information for a particular
10f6f5e98268 PSARC 2015/334 Puppet LDAP Service Search Descriptor
Sowrabha H G <sowrabha.hg@oracle.com>
parents: 3458
diff changeset
   303
              service"
10f6f5e98268 PSARC 2015/334 Puppet LDAP Service Search Descriptor
Sowrabha H G <sowrabha.hg@oracle.com>
parents: 3458
diff changeset
   304
        class << self
10f6f5e98268 PSARC 2015/334 Puppet LDAP Service Search Descriptor
Sowrabha H G <sowrabha.hg@oracle.com>
parents: 3458
diff changeset
   305
            attr_accessor :pg
10f6f5e98268 PSARC 2015/334 Puppet LDAP Service Search Descriptor
Sowrabha H G <sowrabha.hg@oracle.com>
parents: 3458
diff changeset
   306
        end
10f6f5e98268 PSARC 2015/334 Puppet LDAP Service Search Descriptor
Sowrabha H G <sowrabha.hg@oracle.com>
parents: 3458
diff changeset
   307
        self.pg = "config"
10f6f5e98268 PSARC 2015/334 Puppet LDAP Service Search Descriptor
Sowrabha H G <sowrabha.hg@oracle.com>
parents: 3458
diff changeset
   308
    end
10f6f5e98268 PSARC 2015/334 Puppet LDAP Service Search Descriptor
Sowrabha H G <sowrabha.hg@oracle.com>
parents: 3458
diff changeset
   309
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   310
    newproperty(:bind_dn, :parent => Puppet::Property::List) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   311
        desc "An entry that has read permission for the requested database.
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   312
              Specify multiple entries as an array."
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   313
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   314
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   315
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   316
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   317
        self.pg = "cred"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   318
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   319
        # ensure should remains an array
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   320
        def should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   321
            @should
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   322
        end
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
   323
        
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   324
        def insync?(is)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   325
            is = [] if is == :absent or is.nil?
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   326
            is.sort == self.should.sort
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   327
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   328
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   329
        # svcprop returns multivalue entries delimited with a space
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   330
        def delimiter
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   331
            " "
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   332
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   333
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   334
    
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   335
    newproperty(:bind_passwd) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   336
        desc "password to be used for authenticating the bind DN."
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   337
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   338
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   339
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   340
        self.pg = "cred"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   341
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   342
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   343
    newproperty(:enable_shadow_update) do
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   344
        desc "Specify whether the client is allowed to update shadow
3151
0dbc999aeec2 18713757 'puppet resource service' outputs incorrect services
Drew Fisher <drew.fisher@oracle.com>
parents: 2928
diff changeset
   345
              information."
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   346
        newvalues(:true, :false)
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   347
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   348
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   349
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   350
        self.pg = "cred"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   351
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   352
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
   353
    newproperty(:admin_bind_dn) do
3151
0dbc999aeec2 18713757 'puppet resource service' outputs incorrect services
Drew Fisher <drew.fisher@oracle.com>
parents: 2928
diff changeset
   354
        desc "The Bind Distinguished Name for the administrator identity that
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   355
              is used for shadow information update"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   356
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   357
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   358
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   359
        self.pg = "cred"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   360
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   361
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
   362
    newproperty(:admin_bind_passwd) do
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   363
        desc "The administrator password"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   364
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   365
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   366
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   367
        self.pg = "cred"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   368
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   369
2928
43b3da52b84a PSARC 2013/426 Puppet 3.4.1
Drew Fisher <drew.fisher@oracle.com>
parents: 2771
diff changeset
   370
    newproperty(:host_certpath) do
2771
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   371
        desc "The location of the certificate files"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   372
        class << self
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   373
            attr_accessor :pg
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   374
        end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   375
        self.pg = "cred"
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   376
    end
8e4227dc2fc4 16453463 Update Puppet's offerings on Solaris
Virginia Wray <virginia.wray@oracle.com>
parents:
diff changeset
   377
end