{"action":"created","issue":{"url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/427","repository_url":"https://api.github.com/repos/Exa-Networks/exabgp","labels_url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/427/labels{/name}","comments_url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/427/comments","events_url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/427/events","html_url":"https://github.com/Exa-Networks/exabgp/issues/427","id":159200080,"number":427,"title":"Possible to query peer state?","user":{"login":"sroytman","id":19439067,"avatar_url":"https://avatars.githubusercontent.com/u/19439067?v=3","gravatar_id":"","url":"https://api.github.com/users/sroytman","html_url":"https://github.com/sroytman","followers_url":"https://api.github.com/users/sroytman/followers","following_url":"https://api.github.com/users/sroytman/following{/other_user}","gists_url":"https://api.github.com/users/sroytman/gists{/gist_id}","starred_url":"https://api.github.com/users/sroytman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sroytman/subscriptions","organizations_url":"https://api.github.com/users/sroytman/orgs","repos_url":"https://api.github.com/users/sroytman/repos","events_url":"https://api.github.com/users/sroytman/events{/privacy}","received_events_url":"https://api.github.com/users/sroytman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Exa-Networks/exabgp/labels/enhancement","name":"enhancement","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"thomas-mangin","id":1227755,"avatar_url":"https://avatars.githubusercontent.com/u/1227755?v=3","gravatar_id":"","url":"https://api.github.com/users/thomas-mangin","html_url":"https://github.com/thomas-mangin","followers_url":"https://api.github.com/users/thomas-mangin/followers","following_url":"https://api.github.com/users/thomas-mangin/following{/other_user}","gists_url":"https://api.github.com/users/thomas-mangin/gists{/gist_id}","starred_url":"https://api.github.com/users/thomas-mangin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomas-mangin/subscriptions","organizations_url":"https://api.github.com/users/thomas-mangin/orgs","repos_url":"https://api.github.com/users/thomas-mangin/repos","events_url":"https://api.github.com/users/thomas-mangin/events{/privacy}","received_events_url":"https://api.github.com/users/thomas-mangin/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-06-08T15:50:18Z","updated_at":"2016-06-10T19:11:16Z","closed_at":null,"body":"Is it possible to learn a neighbor's peering state through the CLI in ExaBGP 3.4.16?  The events labelled \"neighbor-changes\" in https://github.com/Exa-Networks/exabgp/wiki/Controlling-ExaBGP-:-API-for-received-messages are tantalizingly close to what I want, and the status must exist somewhere internally, but I don't see it reported in the output of \"show neighbors\" or elsewhere.  Please forgive me if I'm missing something obvious; I'm still digging through the code to see if I can find the answer for myself, but thought I'd send a message here as well in case there is a simple answer.\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/comments/225270396","html_url":"https://github.com/Exa-Networks/exabgp/issues/427#issuecomment-225270396","issue_url":"https://api.github.com/repos/Exa-Networks/exabgp/issues/427","id":225270396,"user":{"login":"sroytman","id":19439067,"avatar_url":"https://avatars.githubusercontent.com/u/19439067?v=3","gravatar_id":"","url":"https://api.github.com/users/sroytman","html_url":"https://github.com/sroytman","followers_url":"https://api.github.com/users/sroytman/followers","following_url":"https://api.github.com/users/sroytman/following{/other_user}","gists_url":"https://api.github.com/users/sroytman/gists{/gist_id}","starred_url":"https://api.github.com/users/sroytman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sroytman/subscriptions","organizations_url":"https://api.github.com/users/sroytman/orgs","repos_url":"https://api.github.com/users/sroytman/repos","events_url":"https://api.github.com/users/sroytman/events{/privacy}","received_events_url":"https://api.github.com/users/sroytman/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T19:11:16Z","updated_at":"2016-06-10T19:11:16Z","body":"(Well, that was ugly.  How about with code formatting.)\r\n\r\n```\r\ndef show_neighbor_status (self, reactor, service, command):\r\n    def callback ():\r\n        for p in reactor.peers:\r\n            updown = reactor.peers[p].established()\r\n            updown_string = \"UP\" if updown else \"DOWN\"\r\n            reactor.answer(service, \"%s : %s\" % (p.split()[1], updown_string))\r\n            yield True\r\n        reactor.answer(service,\"done\")\r\n\r\n    reactor.plan(callback())\r\n    return True\r\n```"}}
{"actor":{"display_login":"sroytman"}}