Class: Artifactory::Resource::LDAPSetting

Inherits:
Base
  • Object
show all
Defined in:
lib/artifactory/resources/ldap_setting.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

attribute, attributes, #attributes, #client, #client=, #client?, #extract_client!, extract_client!, format_repos!, #format_repos!, from_hash, from_url, has_attribute?, #initialize, #inspect, #set, #to_hash, #to_json, #to_matrix_properties, #to_query_string_parameters, #to_s, url_safe, #url_safe

Constructor Details

This class inherits a constructor from Artifactory::Resource::Base

Class Method Details

.all(options = {}) ⇒ Array<Resource::LDAPSetting>

Get a list of all ldap settings in the system.

Options Hash (options):



34
35
36
37
# File 'lib/artifactory/resources/ldap_setting.rb', line 34

def all(options = {})
  config = Resource::System.configuration(options)
  list_from_config('config/security/ldapSettings/ldapSetting', config, options)
end

.find(name, options = {}) ⇒ Resource::LDAPSetting?

Find (fetch) an ldap setting by its name.

Examples:

Find an LDAPSetting by its name.

ldap_config.find('ldap.example.com') #=> #<MailServer host: 'ldap.example.com' ...>

Options Hash (options):



57
58
59
60
61
62
63
# File 'lib/artifactory/resources/ldap_setting.rb', line 57

def find(name, options = {})
  config = Resource::System.configuration(options)
  find_from_config("config/security/ldapSettings/ldapSetting/key[text()='#{name}']", config, options)
rescue Error::HTTPError => e
  raise unless e.code == 404
  nil
end

Instance Method Details

#auto_create_userObject

Return this object’s auto_create_user



118
# File 'lib/artifactory/resources/ldap_setting.rb', line 118

attribute :auto_create_user

#auto_create_user=(value) ⇒ Object

Set this object’s auto_create_user



118
# File 'lib/artifactory/resources/ldap_setting.rb', line 118

attribute :auto_create_user

#auto_create_user?Boolean

Determines if the auto_create_user value exists and is truthy



118
# File 'lib/artifactory/resources/ldap_setting.rb', line 118

attribute :auto_create_user

#email_attributeObject

Return this object’s email_attribute



119
# File 'lib/artifactory/resources/ldap_setting.rb', line 119

attribute :email_attribute, 'mail'

#email_attribute=(value) ⇒ Object

Set this object’s email_attribute



119
# File 'lib/artifactory/resources/ldap_setting.rb', line 119

attribute :email_attribute, 'mail'

#email_attribute?Boolean

Determines if the email_attribute value exists and is truthy



119
# File 'lib/artifactory/resources/ldap_setting.rb', line 119

attribute :email_attribute, 'mail'

#enabledObject

Return this object’s enabled



111
# File 'lib/artifactory/resources/ldap_setting.rb', line 111

attribute :enabled, true

#enabled=(value) ⇒ Object

Set this object’s enabled



111
# File 'lib/artifactory/resources/ldap_setting.rb', line 111

attribute :enabled, true

#enabled?Boolean

Determines if the enabled value exists and is truthy



111
# File 'lib/artifactory/resources/ldap_setting.rb', line 111

attribute :enabled, true

#keyObject

Return this object’s key



110
# File 'lib/artifactory/resources/ldap_setting.rb', line 110

attribute :key, ->{ raise 'name missing!' }

#key=(value) ⇒ Object

Set this object’s key



110
# File 'lib/artifactory/resources/ldap_setting.rb', line 110

attribute :key, ->{ raise 'name missing!' }

#key?Boolean

Determines if the key value exists and is truthy



110
# File 'lib/artifactory/resources/ldap_setting.rb', line 110

attribute :key, ->{ raise 'name missing!' }

#ldap_urlObject

Return this object’s ldap_url



112
# File 'lib/artifactory/resources/ldap_setting.rb', line 112

attribute :ldap_url

#ldap_url=(value) ⇒ Object

Set this object’s ldap_url



112
# File 'lib/artifactory/resources/ldap_setting.rb', line 112

attribute :ldap_url

#ldap_url?Boolean

Determines if the ldap_url value exists and is truthy



112
# File 'lib/artifactory/resources/ldap_setting.rb', line 112

attribute :ldap_url

#manager_dnObject

Return this object’s manager_dn



116
# File 'lib/artifactory/resources/ldap_setting.rb', line 116

attribute :manager_dn

#manager_dn=(value) ⇒ Object

Set this object’s manager_dn



116
# File 'lib/artifactory/resources/ldap_setting.rb', line 116

attribute :manager_dn

#manager_dn?Boolean

Determines if the manager_dn value exists and is truthy



116
# File 'lib/artifactory/resources/ldap_setting.rb', line 116

attribute :manager_dn

#manager_passwordObject

Return this object’s manager_password



117
# File 'lib/artifactory/resources/ldap_setting.rb', line 117

attribute :manager_password

#manager_password=(value) ⇒ Object

Set this object’s manager_password



117
# File 'lib/artifactory/resources/ldap_setting.rb', line 117

attribute :manager_password

#manager_password?Boolean

Determines if the manager_password value exists and is truthy



117
# File 'lib/artifactory/resources/ldap_setting.rb', line 117

attribute :manager_password

#search_baseObject

Return this object’s search_base



114
# File 'lib/artifactory/resources/ldap_setting.rb', line 114

attribute :search_base

#search_base=(value) ⇒ Object

Set this object’s search_base



114
# File 'lib/artifactory/resources/ldap_setting.rb', line 114

attribute :search_base

#search_base?Boolean

Determines if the search_base value exists and is truthy



114
# File 'lib/artifactory/resources/ldap_setting.rb', line 114

attribute :search_base

#search_filterObject

Return this object’s search_filter



113
# File 'lib/artifactory/resources/ldap_setting.rb', line 113

attribute :search_filter

#search_filter=(value) ⇒ Object

Set this object’s search_filter



113
# File 'lib/artifactory/resources/ldap_setting.rb', line 113

attribute :search_filter

#search_filter?Boolean

Determines if the search_filter value exists and is truthy



113
# File 'lib/artifactory/resources/ldap_setting.rb', line 113

attribute :search_filter

#search_sub_treeObject

Return this object’s search_sub_tree



115
# File 'lib/artifactory/resources/ldap_setting.rb', line 115

attribute :search_sub_tree

#search_sub_tree=(value) ⇒ Object

Set this object’s search_sub_tree



115
# File 'lib/artifactory/resources/ldap_setting.rb', line 115

attribute :search_sub_tree

#search_sub_tree?Boolean

Determines if the search_sub_tree value exists and is truthy



115
# File 'lib/artifactory/resources/ldap_setting.rb', line 115

attribute :search_sub_tree