@rest_initialiser(cluster_init_check=True, version_check=True, enterprise_check=False)
def execute(self, opts):
    if ((not self.enterprise) and (opts.index_storage_mode == 'memopt')):
        _exit_if_errors(['memopt option for --index-storage-setting can only be configured on enterprise edition'])
    (opts.services, errors) = process_services(opts.services, self.enterprise)
    _exit_if_errors(errors)
    (settings, errors) = self.rest.index_settings()
    _exit_if_errors(errors)
    if ((opts.index_storage_mode is None) and (settings['storageMode'] == '') and ('index' in opts.services)):
        opts.index_storage_mode = 'default'
    default = 'plasma'
    if (((opts.index_storage_mode == 'default') and (settings['storageMode'] == 'forestdb')) or (not self.enterprise)):
        default = 'forestdb'
    if opts.index_storage_mode:
        param = index_storage_mode_to_param(opts.index_storage_mode, default)
        (_, errors) = self.rest.set_index_settings(param, None, None, None, None, None, None, None)
        _exit_if_errors(errors)
    servers = opts.servers.split(',')
    for server in servers:
        (_, errors) = self.rest.add_server(server, opts.group_name, opts.server_username, opts.server_password, opts.services)
        _exit_if_errors(errors)
    _success('Server added')
@rest_initialiser(cluster_init_check=True, version_check=True, enterprise_check=False)
def execute(self, opts):
    if ((not self.enterprise) and (opts.index_storage_mode == 'memopt')):
        _exit_if_errors(['memopt option for --index-storage-setting can only be configured on enterprise edition'])
    (opts.services, errors) = process_services(opts.services, self.enterprise)
    _exit_if_errors(errors)
    (settings, errors) = self.rest.index_settings()
    _exit_if_errors(errors)
    if ((opts.index_storage_mode is None) and (settings['storageMode'] == ) and ('index' in opts.services)):
        opts.index_storage_mode = 'default'
    default = 'plasma'
    if (((opts.index_storage_mode == 'default') and (settings['storageMode'] == 'forestdb')) or (not self.enterprise)):
        default = 'forestdb'
    if opts.index_storage_mode:
        param = index_storage_mode_to_param(opts.index_storage_mode, default)
        (_, errors) = self.rest.set_index_settings(param, None, None, None, None, None, None, None)
        _exit_if_errors(errors)
    servers = opts.servers.split(',')
    for server in servers:
        (_, errors) = self.rest.add_server(server, opts.group_name, opts.server_username, opts.server_password, opts.services)
        _exit_if_errors(errors)
    _success('Server added')