@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    admins = ''
    if opts.admins:
        admins = opts.admins.replace(',', '\n')
    ro_admins = ''
    if opts.roadmins:
        ro_admins = opts.roadmins.replace(',', '\n')
    errors = None
    if (opts.enabled == '1'):
        if (opts.default == 'admins'):
            if ro_admins:
                _warning('--ro-admins option ignored since default is read only admins')
            (_, errors) = self.rest.sasl_settings('true', ro_admins, None)
        elif (opts.default == 'roadmins'):
            if admins:
                _warning('--admins option ignored since default is admins')
            (_, errors) = self.rest.sasl_settings('true', None, admins)
        else:
            (_, errors) = self.rest.sasl_settings('true', ro_admins, admins)
    else:
        if admins:
            _warning('--admins option ignored since saslauthd is being disabled')
        if ro_admins:
            _warning('--roadmins option ignored since saslauthd is being disabled')
        (_, errors) = self.rest.sasl_settings('false', '', '')
    _exit_if_errors(errors)
    _success('saslauthd settings modified')
@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    admins = 
    if opts.admins:
        admins = opts.admins.replace(',', '\n')
    ro_admins = 
    if opts.roadmins:
        ro_admins = opts.roadmins.replace(',', '\n')
    errors = None
    if (opts.enabled == '1'):
        if (opts.default == 'admins'):
            if ro_admins:
                _warning('--ro-admins option ignored since default is read only admins')
            (_, errors) = self.rest.sasl_settings('true', ro_admins, None)
        elif (opts.default == 'roadmins'):
            if admins:
                _warning('--admins option ignored since default is admins')
            (_, errors) = self.rest.sasl_settings('true', None, admins)
        else:
            (_, errors) = self.rest.sasl_settings('true', ro_admins, admins)
    else:
        if admins:
            _warning('--admins option ignored since saslauthd is being disabled')
        if ro_admins:
            _warning('--roadmins option ignored since saslauthd is being disabled')
        (_, errors) = self.rest.sasl_settings('false', , )
    _exit_if_errors(errors)
    _success('saslauthd settings modified')