@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    if (opts.data_mem_quota or opts.index_mem_quota or opts.fts_mem_quota or opts.cbas_mem_quota or opts.eventing_mem_quota or opts.name):
        (_, errors) = self.rest.set_pools_default(opts.data_mem_quota, opts.index_mem_quota, opts.fts_mem_quota, opts.cbas_mem_quota, opts.eventing_mem_quota, opts.name)
        _exit_if_errors(errors)
    if (opts.new_username or opts.new_password or opts.port):
        username = opts.username
        if opts.new_username:
            username = opts.new_username
        password = opts.password
        if opts.new_password:
            password = opts.new_password
        (_, errors) = self.rest.set_admin_credentials(username, password, opts.port)
        _exit_if_errors(errors)
    _success('Cluster settings modified')
@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    if (opts.data_mem_quota or opts.index_mem_quota or opts.fts_mem_quota or opts.cbas_mem_quota or opts.eventing_mem_quota or opts.name):
        (_, errors) = self.rest.set_pools_default(opts.data_mem_quota, opts.index_mem_quota, opts.fts_mem_quota, opts.cbas_mem_quota, opts.eventing_mem_quota, opts.name)
        _exit_if_errors(errors)
    if (opts.new_username or opts.new_password or opts.port):
        username = opts.username
        if opts.new_username:
            username = opts.new_username
        password = opts.password
        if opts.new_password:
            password = opts.new_password
        (_, errors) = self.rest.set_admin_credentials(username, password, opts.port)
        _exit_if_errors(errors)
    _success('Cluster settings modified')