def tree(self, path):
        '''
        .. versionadded:: 2014.7.0

        Recurse through etcd and return all values
        '''
        ret = {}
        try:
            items = self.read(path)
        except (etcd.EtcdKeyNotFound, __HOLE__):
            return None
        except etcd.EtcdConnectionFailed:
            log.error("etcd: failed to perform 'tree' operation on path {0} due to connection error".format(path))
            return None

        for item in items.children:
            comps = str(item.key).split('/')
            if item.dir is True:
                if item.key == path:
                    continue
                ret[comps[-1]] = self.tree(item.key)
            else:
                ret[comps[-1]] = item.value
        return ret
dataset/ETHPy150Open saltstack/salt/salt/utils/etcd_util.py/EtcdClient.tree