'Check that all nodes are \'running\' and that ssh is up on all nodes
This method will return False if any spot requests are in an \'open\'
state.'

def is_cluster_up(self):

    spots = self.spot_requests
    active_spots = filter((lambda x: (x.state == 'active')), spots)
    if (len(spots) != len(active_spots)):
        return False
    nodes = self.nodes
    if (not nodes):
        return False
    for node in nodes:
        if (not node.is_up()):
            return False
    return True
