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, uri_parser, 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:



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

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



57
58
59
60
61
62
63
64
# 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

Returns:

  • (Object)


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

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



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

attribute :auto_create_user

#auto_create_user?Boolean

Determines if the auto_create_user value exists and is truthy

Returns:

  • (Boolean)


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

attribute :auto_create_user

#email_attributeObject

Return this object’s email_attribute

Returns:

  • (Object)


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

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



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

attribute :email_attribute, "mail"

#email_attribute?Boolean

Determines if the email_attribute value exists and is truthy

Returns:

  • (Boolean)


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

attribute :email_attribute, "mail"

#enabledObject

Return this object’s enabled

Returns:

  • (Object)


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

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



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

attribute :enabled, true

#enabled?Boolean

Determines if the enabled value exists and is truthy

Returns:

  • (Boolean)


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

attribute :enabled, true

#keyObject

Return this object’s key

Returns:

  • (Object)


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

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



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

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

#key?Boolean

Determines if the key value exists and is truthy

Returns:

  • (Boolean)


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

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

#ldap_urlObject

Return this object’s ldap_url

Returns:

  • (Object)


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

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



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

attribute :ldap_url

#ldap_url?Boolean

Determines if the ldap_url value exists and is truthy

Returns:

  • (Boolean)


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

attribute :ldap_url

#manager_dnObject

Return this object’s manager_dn

Returns:

  • (Object)


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

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



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

attribute :manager_dn

#manager_dn?Boolean

Determines if the manager_dn value exists and is truthy

Returns:

  • (Boolean)


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

attribute :manager_dn

#manager_passwordObject

Return this object’s manager_password

Returns:

  • (Object)


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

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



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

attribute :manager_password

#manager_password?Boolean

Determines if the manager_password value exists and is truthy

Returns:

  • (Boolean)


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

attribute :manager_password

#search_baseObject

Return this object’s search_base

Returns:

  • (Object)


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

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



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

attribute :search_base

#search_base?Boolean

Determines if the search_base value exists and is truthy

Returns:

  • (Boolean)


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

attribute :search_base

#search_filterObject

Return this object’s search_filter

Returns:

  • (Object)


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

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



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

attribute :search_filter

#search_filter?Boolean

Determines if the search_filter value exists and is truthy

Returns:

  • (Boolean)


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

attribute :search_filter

#search_sub_treeObject

Return this object’s search_sub_tree

Returns:

  • (Object)


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

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



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

attribute :search_sub_tree

#search_sub_tree?Boolean

Determines if the search_sub_tree value exists and is truthy

Returns:

  • (Boolean)


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

attribute :search_sub_tree