def disable(gandi, resource, backend, port, probe):
    """ Disable a backend or a probe on a webaccelerator """
    result = []
    if backend:
        backends = backend
        for backend in backends:
            if 'port' not in backend:
                if not port:
                    backend['port'] = click.prompt('Please set a port for '
                                                   'backends. If you want to '
                                                   ' different port for '
                                                   'each backend, use `-b '
                                                   'ip:port`', type=int)
                else:
                    backend['port'] = port
            result = gandi.webacc.backend_disable(backend)

    if probe:
        if not resource:
            gandi.echo('You need to indicate the Webaccelerator name')
            return
        result = gandi.webacc.probe_disable(resource)

    return result
Disable a backend or a probe on a webaccelerator