@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    if (opts.force and (not opts.hard)):
        _exit_if_errors(['--hard is required with --force flag'])
    opts.servers_to_failover = apply_default_port(opts.servers_to_failover)
    (_, errors) = self.rest.failover(opts.servers_to_failover, opts.hard, opts.force)
    _exit_if_errors(errors)
    if (not opts.hard):
        time.sleep(1)
        if opts.wait:
            bar = TopologyProgressBar(self.rest, 'Gracefully failing over', opts.no_bar)
            errors = bar.show()
            _exit_if_errors(errors)
            _success('Server failed over')
        else:
            _success('Server failed over started')
    else:
        _success('Server failed over')
@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    if (opts.force and (not opts.hard)):
        _exit_if_errors(['--hard is required with --force flag'])
    opts.servers_to_failover = apply_default_port(opts.servers_to_failover)
    (_, errors) = self.rest.failover(opts.servers_to_failover, opts.hard, opts.force)
    _exit_if_errors(errors)
    if (not opts.hard):
        time.sleep(1)
        if opts.wait:
            bar = TopologyProgressBar(self.rest, 'Gracefully failing over', opts.no_bar)
            errors = bar.show()
            _exit_if_errors(errors)
            _success('Server failed over')
        else:
            _success('Server failed over started')
    else:
        _success('Server failed over')