def partition_agent(host):
    """ Partition a node from all network traffic except for SSH and loopback

        :param hostname: host or IP of the machine to partition from the cluster
    """

    network.save_iptables(host)
    network.flush_all_rules(host)
    network.allow_all_traffic(host)
    network.run_iptables(host, ALLOW_SSH)
    network.run_iptables(host, ALLOW_PING)
    network.run_iptables(host, DISALLOW_MESOS)
    network.run_iptables(host, DISALLOW_INPUT)
def partition_agent ( host ) : network . save_iptables ( host ) network . flush_all_rules ( host ) network . allow_all_traffic ( host ) network . run_iptables ( host , ALLOW_SSH ) network . run_iptables ( host , ALLOW_PING ) network . run_iptables ( host , DISALLOW_MESOS ) network . run_iptables ( host , DISALLOW_INPUT )
Partition a node from all network traffic except for SSH and loopback

        :param hostname: host or IP of the machine to partition from the cluster