def __init__(self):
    super(SettingLdap, self).__init__()
    self.parser.prog = 'couchbase-cli setting-ldap'
    group = self.parser.add_argument_group('LDAP settings')
    group.add_argument('--get', dest='get', default=False, action='store_true', help='When the get flag is provided it will retrieve the current ldap settings')
    group.add_argument('--authentication-enabled', dest='authentication_enabled', metavar='<1|0>', choices=['1', '0'], help='Enable LDAP authentication, otherwise it defaults to disable')
    group.add_argument('--authorization-enabled', dest='authorization_enabled', metavar='<1|0>', choices=['1', '0'], help='Enable LDAP authorization, otherwise defaults to false')
    group.add_argument('--hosts', dest='hosts', metavar='<host_list>', help='Coma separated list of LDAP servers')
    group.add_argument('--port', dest='port', metavar='<port>', help='LDAP port', type=int)
    group.add_argument('--encryption', dest='encryption', metavar='<tls|startTLS|none>', choices=['tls', 'startTLS', 'none'], help='Encryption used')
    group.add_argument('--server-cert-validation', dest='server_cert_val', metavar='<1|0>', choices=['0', '1'], help='Enable or disable certificate validation when connecting to LDAP server')
    group.add_argument('--ldap-cacert', dest='cacert_ldap', metavar='<path>', help=('CA certificate to be used for LDAP server certificate validation, required if' + ' certificate validation is not disabled'))
    group.add_argument('--user-dn-query', metavar='<query>', dest='user_dn_query', help="LDAP query to get user's DN. Must contains at least one instance of %%u")
    group.add_argument('--user-dn-template', metavar='<template>', dest='user_dn_template', help="Template to construct user's DN. Must contain at least one instance of %%u")
    group.add_argument('--client-cert', metavar='<path>', dest='client_cert', help='The client TLS certificate for authentication')
    group.add_argument('--client-key', metavar='<path>', dest='client_key', help='The client TLS key for authentication')
    group.add_argument('--request-timeout', metavar='<ms>', dest='timeout', help='Request time out in milliseconds')
    group.add_argument('--max-parallel', dest='max_parallel', metavar='<max>', type=int, help='Maximum number of parallel connections that can be established')
    group.add_argument('--max-cache-size', dest='max_cache_size', metavar='<size>', help='Maximum number of cached LDAP requests')
    group.add_argument('--cache-value-lifetime', dest='cache_value_lifetime', metavar='<ms>', help='Cache value lifetime in milliseconds')
    group.add_argument('--bind-dn', dest='bind_dn', metavar='<DN>', help='The DN of a user to bind as to performance lookups')
    group.add_argument('--bind-password', dest='bind_password', metavar='<password>', help='The password of the bind user')
    group.add_argument('--group-query', dest='group_query', metavar='<query>', help="LDAP query to get user's groups by username")
    group.add_argument('--enable-nested-groups', dest='nested_groups', metavar='<1|0>', choices=['0', '1'])
    group.add_argument('--nested-group-max-depth', dest='nested_max_depth', metavar='<max>', type=int, help='Maximum number of recursive group requests allowed. [1 - 100]')
def __init__(self):
    super(SettingLdap, self).__init__()
    self.parser.prog = 'couchbase-cli setting-ldap'
    group = self.parser.add_argument_group('LDAP settings')
    group.add_argument('--get', dest='get', default=False, action='store_true', help='When the get flag is provided it will retrieve the current ldap settings')
    group.add_argument('--authentication-enabled', dest='authentication_enabled', metavar='<1|0>', choices=['1', '0'], help='Enable LDAP authentication, otherwise it defaults to disable')
    group.add_argument('--authorization-enabled', dest='authorization_enabled', metavar='<1|0>', choices=['1', '0'], help='Enable LDAP authorization, otherwise defaults to false')
    group.add_argument('--hosts', dest='hosts', metavar='<host_list>', help='Coma separated list of LDAP servers')
    group.add_argument('--port', dest='port', metavar='<port>', help='LDAP port', type=int)
    group.add_argument('--encryption', dest='encryption', metavar='<tls|startTLS|none>', choices=['tls', 'startTLS', 'none'], help='Encryption used')
    group.add_argument('--server-cert-validation', dest='server_cert_val', metavar='<1|0>', choices=['0', '1'], help='Enable or disable certificate validation when connecting to LDAP server')
    group.add_argument('--ldap-cacert', dest='cacert_ldap', metavar='<path>', help=('CA certificate to be used for LDAP server certificate validation, required if' + ' certificate validation is not disabled'))
    group.add_argument('--user-dn-query', metavar='<query>', dest='user_dn_query', help="LDAP query to get user's DN. Must contains at least one instance of %%u")
    group.add_argument('--user-dn-template', metavar='<template>', dest='user_dn_template', help="Template to construct user's DN. Must contain at least one instance of %%u")
    group.add_argument('--client-cert', metavar='<path>', dest='client_cert', help='The client TLS certificate for authentication')
    group.add_argument('--client-key', metavar='<path>', dest='client_key', help='The client TLS key for authentication')
    group.add_argument('--request-timeout', metavar='<ms>', dest='timeout', help='Request time out in milliseconds')
    group.add_argument('--max-parallel', dest='max_parallel', metavar='<max>', type=int, help='Maximum number of parallel connections that can be established')
    group.add_argument('--max-cache-size', dest='max_cache_size', metavar='<size>', help='Maximum number of cached LDAP requests')
    group.add_argument('--cache-value-lifetime', dest='cache_value_lifetime', metavar='<ms>', help='Cache value lifetime in milliseconds')
    group.add_argument('--bind-dn', dest='bind_dn', metavar='<DN>', help='The DN of a user to bind as to performance lookups')
    group.add_argument('--bind-password', dest='bind_password', metavar='<password>', help='The password of the bind user')
    group.add_argument('--group-query', dest='group_query', metavar='<query>', help="LDAP query to get user's groups by username")
    group.add_argument('--enable-nested-groups', dest='nested_groups', metavar='<1|0>', choices=['0', '1'])
    group.add_argument('--nested-group-max-depth', dest='nested_max_depth', metavar='<max>', type=int, help='Maximum number of recursive group requests allowed. [1 - 100]')