@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    if ((not opts.nodes) and (not opts.all_nodes)):
        _exit_if_errors(['Must specify either --all-nodes or --nodes'])
    if (opts.nodes and opts.all_nodes):
        _exit_if_errors(['Cannot specify both --all-nodes and --nodes'])
    if (opts.salt and (opts.redaction_level != 'partial')):
        _exit_if_errors(["--redaction-level has to be set to 'partial' when --salt is specified"])
    servers = opts.nodes
    if opts.all_nodes:
        servers = '*'
    if opts.upload:
        if (not opts.upload_host):
            _exit_if_errors(['--upload-host is required when --upload is specified'])
        if (not opts.upload_customer):
            _exit_if_errors(['--upload-customer is required when --upload is specified'])
    else:
        if opts.upload_host:
            _warning('--upload-host has no effect with specifying --upload')
        if opts.upload_customer:
            _warning('--upload-customer has no effect with specifying --upload')
        if opts.upload_ticket:
            _warning('--upload_ticket has no effect with specifying --upload')
        if opts.upload_proxy:
            _warning('--upload_proxy has no effect with specifying --upload')
    (_, errors) = self.rest.collect_logs_start(servers, opts.redaction_level, opts.salt, opts.output_dir, opts.tmp_dir, opts.upload, opts.upload_host, opts.upload_proxy, opts.upload_customer, opts.upload_ticket)
    _exit_if_errors(errors)
    _success('Log collection started')
@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    if ((not opts.nodes) and (not opts.all_nodes)):
        _exit_if_errors(['Must specify either --all-nodes or --nodes'])
    if (opts.nodes and opts.all_nodes):
        _exit_if_errors(['Cannot specify both --all-nodes and --nodes'])
    if (opts.salt and (opts.redaction_level != 'partial')):
        _exit_if_errors(["--redaction-level has to be set to 'partial' when --salt is specified"])
    servers = opts.nodes
    if opts.all_nodes:
        servers = '*'
    if opts.upload:
        if (not opts.upload_host):
            _exit_if_errors(['--upload-host is required when --upload is specified'])
        if (not opts.upload_customer):
            _exit_if_errors(['--upload-customer is required when --upload is specified'])
    else:
        if opts.upload_host:
            _warning('--upload-host has no effect with specifying --upload')
        if opts.upload_customer:
            _warning('--upload-customer has no effect with specifying --upload')
        if opts.upload_ticket:
            _warning('--upload_ticket has no effect with specifying --upload')
        if opts.upload_proxy:
            _warning('--upload_proxy has no effect with specifying --upload')
    (_, errors) = self.rest.collect_logs_start(servers, opts.redaction_level, opts.salt, opts.output_dir, opts.tmp_dir, opts.upload, opts.upload_host, opts.upload_proxy, opts.upload_customer, opts.upload_ticket)
    _exit_if_errors(errors)
    _success('Log collection started')