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_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.

Parameters:

  • options (Hash) (defaults to: {})

    the list of options

Options Hash (options):

Returns:



18
19
20
21
# File 'lib/artifactory/resources/ldap_setting.rb', line 18

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' ...>

Parameters:

  • name (String)

    the name of the ldap config setting to find

  • options (Hash) (defaults to: {})

    the list of options

Options Hash (options):

Returns:

  • (Resource::LDAPSetting, nil)

    an instance of the ldap setting that matches the given name, or nil if one does not exist



41
42
43
44
45
46
47
# File 'lib/artifactory/resources/ldap_setting.rb', line 41

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

Returns:

  • (Object)


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

attribute :auto_create_user

#auto_create_user=(value) ⇒ Object

Set this object’s auto_create_user

Parameters:

  • value (Object)

    the value to set for auto_create_user

  • default (Object)

    the default value for this attribute



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

attribute :auto_create_user

#auto_create_user?Boolean

Determines if the auto_create_user value exists and is truthy

Returns:

  • (Boolean)


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

attribute :auto_create_user

#email_attributeObject

Return this object’s email_attribute

Returns:

  • (Object)


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

attribute :email_attribute, 'mail'

#email_attribute=(value) ⇒ Object

Set this object’s email_attribute

Parameters:

  • value (Object)

    the value to set for email_attribute

  • default (Object)

    the default value for this attribute



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

attribute :email_attribute, 'mail'

#email_attribute?Boolean

Determines if the email_attribute value exists and is truthy

Returns:

  • (Boolean)


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

attribute :email_attribute, 'mail'

#enabledObject

Return this object’s enabled

Returns:

  • (Object)


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

attribute :enabled, true

#enabled=(value) ⇒ Object

Set this object’s enabled

Parameters:

  • value (Object)

    the value to set for enabled

  • default (Object)

    the default value for this attribute



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

attribute :enabled, true

#enabled?Boolean

Determines if the enabled value exists and is truthy

Returns:

  • (Boolean)


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

attribute :enabled, true

#keyObject

Return this object’s key

Returns:

  • (Object)


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

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

#key=(value) ⇒ Object

Set this object’s key

Parameters:

  • value (Object)

    the value to set for key

  • default (Object)

    the default value for this attribute



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

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

#key?Boolean

Determines if the key value exists and is truthy

Returns:

  • (Boolean)


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

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

#ldap_urlObject

Return this object’s ldap_url

Returns:

  • (Object)


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

attribute :ldap_url

#ldap_url=(value) ⇒ Object

Set this object’s ldap_url

Parameters:

  • value (Object)

    the value to set for ldap_url

  • default (Object)

    the default value for this attribute



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

attribute :ldap_url

#ldap_url?Boolean

Determines if the ldap_url value exists and is truthy

Returns:

  • (Boolean)


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

attribute :ldap_url

#manager_dnObject

Return this object’s manager_dn

Returns:

  • (Object)


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

attribute :manager_dn

#manager_dn=(value) ⇒ Object

Set this object’s manager_dn

Parameters:

  • value (Object)

    the value to set for manager_dn

  • default (Object)

    the default value for this attribute



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

attribute :manager_dn

#manager_dn?Boolean

Determines if the manager_dn value exists and is truthy

Returns:

  • (Boolean)


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

attribute :manager_dn

#manager_passwordObject

Return this object’s manager_password

Returns:

  • (Object)


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

attribute :manager_password

#manager_password=(value) ⇒ Object

Set this object’s manager_password

Parameters:

  • value (Object)

    the value to set for manager_password

  • default (Object)

    the default value for this attribute



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

attribute :manager_password

#manager_password?Boolean

Determines if the manager_password value exists and is truthy

Returns:

  • (Boolean)


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

attribute :manager_password

#search_baseObject

Return this object’s search_base

Returns:

  • (Object)


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

attribute :search_base

#search_base=(value) ⇒ Object

Set this object’s search_base

Parameters:

  • value (Object)

    the value to set for search_base

  • default (Object)

    the default value for this attribute



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

attribute :search_base

#search_base?Boolean

Determines if the search_base value exists and is truthy

Returns:

  • (Boolean)


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

attribute :search_base

#search_filterObject

Return this object’s search_filter

Returns:

  • (Object)


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

attribute :search_filter

#search_filter=(value) ⇒ Object

Set this object’s search_filter

Parameters:

  • value (Object)

    the value to set for search_filter

  • default (Object)

    the default value for this attribute



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

attribute :search_filter

#search_filter?Boolean

Determines if the search_filter value exists and is truthy

Returns:

  • (Boolean)


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

attribute :search_filter

#search_sub_treeObject

Return this object’s search_sub_tree

Returns:

  • (Object)


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

attribute :search_sub_tree

#search_sub_tree=(value) ⇒ Object

Set this object’s search_sub_tree

Parameters:

  • value (Object)

    the value to set for search_sub_tree

  • default (Object)

    the default value for this attribute



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

attribute :search_sub_tree

#search_sub_tree?Boolean

Determines if the search_sub_tree value exists and is truthy

Returns:

  • (Boolean)


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

attribute :search_sub_tree