@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    (bucket, errors) = self.rest.get_bucket(opts.bucket_name)
    _exit_if_errors(errors)
    if (bucket['bucketType'] != BUCKET_TYPE_COUCHBASE):
        _exit_if_errors(['Cannot compact memcached buckets'])
    (_, errors) = self.rest.compact_bucket(opts.bucket_name, opts.data_only, opts.view_only)
    _exit_if_errors(errors)
    _success('Bucket compaction started')
@rest_initialiser(cluster_init_check=True, version_check=True)
def execute(self, opts):
    (bucket, errors) = self.rest.get_bucket(opts.bucket_name)
    _exit_if_errors(errors)
    if (bucket['bucketType'] != BUCKET_TYPE_COUCHBASE):
        _exit_if_errors(['Cannot compact memcached buckets'])
    (_, errors) = self.rest.compact_bucket(opts.bucket_name, opts.data_only, opts.view_only)
    _exit_if_errors(errors)
    _success('Bucket compaction started')