import etcd


def run():
    try:
        nodes = NS._int.client.read("/nodes")
    except etcd.EtcdKeyNotFound:
        return
    
    for node in nodes.leaves:
        node_id = node.key.split('/')[-1]
        try:
            NS._int.client.write(
                "/nodes/{0}/NodeContext/status".format(node_id),
                "DOWN",
                prevExist=False
            )            
        except etcd.EtcdAlreadyExist:
            pass
        try:
            _tc = NS.tendrl.objects.TendrlContext(node_id=node_id).load()
             NS._int.client.write(
                "/clusters/{0}/nodes/{1}/NodeContext/status".format(_tc.integration_id,
                                                                    node_id),
                "DOWN",
                prevExist=False
            )            
        except etcd.EtcdAlreadyExist:
            pass

    return

@@ -538,33 +538,32 @@
 d()%0A            
- 
 NS._int.client.w

Update check_all_managed_nodes_status.py