def inner(fn):

    def decorator(self, opts):
        self.rest = ClusterManager(opts.cluster, opts.username, opts.password, opts.ssl, opts.ssl_verify, opts.cacert, opts.debug)
        if cluster_init_check:
            check_cluster_initialized(self.rest)
        if version_check:
            check_versions(self.rest)
        if (enterprise_check is not None):
            (enterprise, errors) = self.rest.is_enterprise()
            _exit_if_errors(errors)
            if (enterprise_check and (not enterprise)):
                _exit_if_errors(['Command only available in enterprise edition'])
            self.enterprise = enterprise
        return fn(self, opts)
    return decorator
def inner(fn):

    def decorator(self, opts):
        self.rest = ClusterManager(opts.cluster, opts.username, opts.password, opts.ssl, opts.ssl_verify, opts.cacert, opts.debug)
        if cluster_init_check:
            check_cluster_initialized(self.rest)
        if version_check:
            check_versions(self.rest)
        if (enterprise_check is not None):
            (enterprise, errors) = self.rest.is_enterprise()
            _exit_if_errors(errors)
            if (enterprise_check and (not enterprise)):
                _exit_if_errors(['Command only available in enterprise edition'])
            self.enterprise = enterprise
        return fn(self, opts)
    return decorator