z25 / pyZOCP

Python ZOCP implementation (Z25 Orchestration Control Protocol)
GNU Lesser General Public License v3.0
33 stars 5 forks source link

Peer names are not stored in the zocp node #43

Closed fieldOfView closed 9 years ago

fieldOfView commented 9 years ago

Since the recent Pyre update, peer names are no longer stored in the capability tree. Instead, names live in the Pyre land, and are sent with all messages.

There are still usecases where it is useful to be able to know the name of a peer, for example when compiling a list of all current peers in the network (and presenting this to the user in a friendlier way than though the uuids).

Perhaps if names do not belong in the capability-tree (ie: stored in peers_capabilities), there could be a peers_names dict?

sphaero commented 9 years ago

You should request peer names though pyre. Now that I'm looking at it I think this method might be missing. You can do get_peers() and from that you should do get_name(uuid). I have to check with zyre.

fieldOfView commented 9 years ago

It does not look like get_name() takes an argument; it only returns the name of the node itself (not its peers).

sphaero commented 9 years ago

https://github.com/zeromq/zyre/issues/297

sphaero commented 9 years ago

So the reply from the zmq devs was that you should track names yourself as you already receive them through the ENTER event. So this is not going to happen in Pyre either.

fieldOfView commented 9 years ago

Ok, I'll continue using that workaround.