def __virtual__():
    if not HAS_PYCASSA:
        return (False, 'The cassandra execution module cannot be loaded: pycassa not installed.')

    if HAS_PYCASSA and salt.utils.which('nodetool'):
        return 'cassandra'
    return (False, 'The cassandra execution module cannot be loaded: nodetool not found.')
Only load if pycassa is available and the system is configured
dataset/ETHPy150Open saltstack/salt/salt/modules/cassandra.py/__virtual__