Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Adds missing implementation of etcd-proxy #32
Conversation
|
Thanks - LGTM. |
mbruzek
reviewed
Jul 1, 2016
| + peers = etcdctl.member_list() | ||
| + cluster = [] | ||
| + for peer in peers: | ||
| + thispeer = peers[peer] |
mbruzek
Jul 1, 2016
Contributor
Isn't "peer" the same as "thispeer" in this case? Or am I missing a subtlety?
chuckbutler
Jul 1, 2016
Collaborator
peer becomes the string key of the dict.
'etcd0', so i use it as a scope operator for the dict. We can revise that for better clarity, as i had the same incorrect assumption initially
mbruzek
Jul 7, 2016
Contributor
for peer in peers: will create an iterator that makes the peer variable every member of the peers list.
thispeer = peers[peer] is the same thing as peer is it not?
chuckbutler
Jul 7, 2016
Collaborator
I encourage you to run that, debug it, and tell me what you see. I'm consistently seeing it evaluate to the key, and not the dict of values contained at that key.
|
@mbruzek was there something we wanted to do with this implementation? @neiljerram has given me a sign off in IRC that it works for their purposes. |
|
@chuckbutler I have no problems with this change, the for loop looks a little strange to me, I still think peer and thispeer are equivalent and I don't understand the difference. That looks like unnecessary code to me, but if there is a subtlety that I am missing, a comment would clear that up. |
|
OK I am finally +1 to this change.
|
chuckbutler commentedJun 30, 2016
The proxy relation now properly sends cluster peer details, and client connection credentials.