@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    eject_nodes = []
    if opts.server_remove:
        eject_nodes = apply_default_port(opts.server_remove)
    (_, errors) = self.rest.rebalance(eject_nodes)
    _exit_if_errors(errors)
    time.sleep(1)
    if opts.wait:
        bar = TopologyProgressBar(self.rest, 'Rebalancing', opts.no_bar)
        errors = bar.show()
        _exit_if_errors(errors)
        _success('Rebalance complete')
    else:
        _success('Rebalance started')
@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    eject_nodes = []
    if opts.server_remove:
        eject_nodes = apply_default_port(opts.server_remove)
    (_, errors) = self.rest.rebalance(eject_nodes)
    _exit_if_errors(errors)
    time.sleep(1)
    if opts.wait:
        bar = TopologyProgressBar(self.rest, 'Rebalancing', opts.no_bar)
        errors = bar.show()
        _exit_if_errors(errors)
        _success('Rebalance complete')
    else:
        _success('Rebalance started')