-
Notifications
You must be signed in to change notification settings - Fork 218
Add nodemeta to catalog and health end points #190
Add nodemeta to catalog and health end points #190
Conversation
|
hey @cablehead @abn, it seems that latest version of pytest_twisted breaks your CI, I pinned it to the previous version |
|
I am also missing this feature in the library. Would be great to add this to the next version |
|
Hi @cablehead and @abn! |
|
Thank you for your PR. According to documentation of consul it is possible to specify multiple times (see [1]). In proposed implementation it is possible to post only single key:value against server. Is it possible to rewrite params to be in form of sequence of two-element tuples? This is also accepted by Moreover is it possible to use dictionary instead of string 'key:value'? This is proposed API: consul.catalog.nodes(node_meta={'a':'b', 'c':'d'})In this form PR will be perfect. Please let me know if it is feasible for you. [1] https://www.consul.io/api/catalog.html#node-meta |
|
hi @matusvalo, thanks for answering! this sounds like a little bit bigger change but I think I can do it during the weekend. |
change `node_meta` from string to dict
fix style
3bd7c99 to
0008ff3
Compare
|
@matusvalo I think the PR is ready, please tell me if it looks good to you. |
|
PR seems OK. I am merging it. Thank you @ibrahimmenem . |
|
@ibrahimmenem Any interest in adding this node_meta functionality to /catalog/register API also? so we can add metadata when registering external nodes to Consul. |
|
@hreidar this should be straightforward, I could do that during the weekend if you don't want to add it. |
|
@ibrahimmenem my coding skills are not that good so I'll leave it to you ;-) Thank you. |
Add nodemeta to catalog and health end points
very simple PR to add support to node metadata introduced in consul 0.7.3.