{"action":"created","comment":{"url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/comments/26436141","id":26436141,"diff_hunk":"@@ -968,6 +968,41 @@ def SendRawRDMDiscovery(self,\n       raise OLADNotRunningException()\n     return True\n \n+  def GetCandidatePorts(self, callback, universe=None):\n+    \"\"\"Send a GetCandidatePorts request. The result is similar to FetchDevices\n+    (GetDeviceInfo), except that returned devices will only contain ports\n+    available for patching to the given universe. If universe is None, then the\n+    devices will list their ports available for patching to a potential new\n+    universe.\n+\n+    Args:\n+      callback: The function to call once complete, takes a RequestStatus\n+        object and a list of Device objects.\n+      universe: The universe to get the candidate ports for. If unspecified,\n+        return the candidate ports for a new universe.\n+\n+    Returns:\n+      True if the request was sent, False otherwise.\n+    \"\"\"\n+    if self._socket is None:\n+      return False\n+\n+    controller = SimpleRpcController()\n+    request = Ola_pb2.OptionalUniverseRequest()\n+\n+    if universe is not None:\n+      request.universe = universe\n+\n+    # GetCandidatePorts works very much like GetDeviceInfo, so we can re-use\n+    # its complete method.\n+    done = lambda x, y: self._DeviceInfoComplete(callback, x, y)","path":"python/ola/OlaClient.py","position":31,"original_position":31,"commit_id":"a9d74394c9aaa5736df9e99e48fb8416cc43802f","original_commit_id":"70de3b13e89894bb9a7ad29edf4d8bb4d3c6e238","user":{"login":"nomis52","id":4355332,"avatar_url":"https://avatars.githubusercontent.com/u/4355332?v=3","gravatar_id":"","url":"https://api.github.com/users/nomis52","html_url":"https://github.com/nomis52","followers_url":"https://api.github.com/users/nomis52/followers","following_url":"https://api.github.com/users/nomis52/following{/other_user}","gists_url":"https://api.github.com/users/nomis52/gists{/gist_id}","starred_url":"https://api.github.com/users/nomis52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomis52/subscriptions","organizations_url":"https://api.github.com/users/nomis52/orgs","repos_url":"https://api.github.com/users/nomis52/repos","events_url":"https://api.github.com/users/nomis52/events{/privacy}","received_events_url":"https://api.github.com/users/nomis52/received_events","type":"User","site_admin":false},"body":"Reusing the callback functions is fine. ","created_at":"2015-03-14T07:17:58Z","updated_at":"2015-03-14T07:17:58Z","html_url":"https://github.com/OpenLightingProject/ola/pull/670#discussion_r26436141","pull_request_url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/670","_links":{"self":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/comments/26436141"},"html":{"href":"https://github.com/OpenLightingProject/ola/pull/670#discussion_r26436141"},"pull_request":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/670"}}},"pull_request":{"url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/670","id":30987625,"html_url":"https://github.com/OpenLightingProject/ola/pull/670","diff_url":"https://github.com/OpenLightingProject/ola/pull/670.diff","patch_url":"https://github.com/OpenLightingProject/ola/pull/670.patch","issue_url":"https://api.github.com/repos/OpenLightingProject/ola/issues/670","number":670,"state":"open","locked":false,"title":"Add GetCandidatePorts to Python client","user":{"login":"simark","id":1758287,"avatar_url":"https://avatars.githubusercontent.com/u/1758287?v=3","gravatar_id":"","url":"https://api.github.com/users/simark","html_url":"https://github.com/simark","followers_url":"https://api.github.com/users/simark/followers","following_url":"https://api.github.com/users/simark/following{/other_user}","gists_url":"https://api.github.com/users/simark/gists{/gist_id}","starred_url":"https://api.github.com/users/simark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simark/subscriptions","organizations_url":"https://api.github.com/users/simark/orgs","repos_url":"https://api.github.com/users/simark/repos","events_url":"https://api.github.com/users/simark/events{/privacy}","received_events_url":"https://api.github.com/users/simark/received_events","type":"User","site_admin":false},"body":"This patch adds the ability to call the GetCandidatePorts remote\r\nprocedure from the Python RPC client.\r\n\r\nIt also adds a corresponding example.","created_at":"2015-03-11T21:34:51Z","updated_at":"2015-03-14T07:17:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4d2a17cf5680847278c736900da95400b3e2de6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/670/commits","review_comments_url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/670/comments","review_comment_url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenLightingProject/ola/issues/670/comments","statuses_url":"https://api.github.com/repos/OpenLightingProject/ola/statuses/a9d74394c9aaa5736df9e99e48fb8416cc43802f","head":{"label":"simark:add_getcandidateports_python_client","ref":"add_getcandidateports_python_client","sha":"a9d74394c9aaa5736df9e99e48fb8416cc43802f","user":{"login":"simark","id":1758287,"avatar_url":"https://avatars.githubusercontent.com/u/1758287?v=3","gravatar_id":"","url":"https://api.github.com/users/simark","html_url":"https://github.com/simark","followers_url":"https://api.github.com/users/simark/followers","following_url":"https://api.github.com/users/simark/following{/other_user}","gists_url":"https://api.github.com/users/simark/gists{/gist_id}","starred_url":"https://api.github.com/users/simark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simark/subscriptions","organizations_url":"https://api.github.com/users/simark/orgs","repos_url":"https://api.github.com/users/simark/repos","events_url":"https://api.github.com/users/simark/events{/privacy}","received_events_url":"https://api.github.com/users/simark/received_events","type":"User","site_admin":false},"repo":{"id":29477328,"name":"ola","full_name":"simark/ola","owner":{"login":"simark","id":1758287,"avatar_url":"https://avatars.githubusercontent.com/u/1758287?v=3","gravatar_id":"","url":"https://api.github.com/users/simark","html_url":"https://github.com/simark","followers_url":"https://api.github.com/users/simark/followers","following_url":"https://api.github.com/users/simark/following{/other_user}","gists_url":"https://api.github.com/users/simark/gists{/gist_id}","starred_url":"https://api.github.com/users/simark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simark/subscriptions","organizations_url":"https://api.github.com/users/simark/orgs","repos_url":"https://api.github.com/users/simark/repos","events_url":"https://api.github.com/users/simark/events{/privacy}","received_events_url":"https://api.github.com/users/simark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simark/ola","description":"The Open Lighting Architecture","fork":true,"url":"https://api.github.com/repos/simark/ola","forks_url":"https://api.github.com/repos/simark/ola/forks","keys_url":"https://api.github.com/repos/simark/ola/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simark/ola/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simark/ola/teams","hooks_url":"https://api.github.com/repos/simark/ola/hooks","issue_events_url":"https://api.github.com/repos/simark/ola/issues/events{/number}","events_url":"https://api.github.com/repos/simark/ola/events","assignees_url":"https://api.github.com/repos/simark/ola/assignees{/user}","branches_url":"https://api.github.com/repos/simark/ola/branches{/branch}","tags_url":"https://api.github.com/repos/simark/ola/tags","blobs_url":"https://api.github.com/repos/simark/ola/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simark/ola/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simark/ola/git/refs{/sha}","trees_url":"https://api.github.com/repos/simark/ola/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simark/ola/statuses/{sha}","languages_url":"https://api.github.com/repos/simark/ola/languages","stargazers_url":"https://api.github.com/repos/simark/ola/stargazers","contributors_url":"https://api.github.com/repos/simark/ola/contributors","subscribers_url":"https://api.github.com/repos/simark/ola/subscribers","subscription_url":"https://api.github.com/repos/simark/ola/subscription","commits_url":"https://api.github.com/repos/simark/ola/commits{/sha}","git_commits_url":"https://api.github.com/repos/simark/ola/git/commits{/sha}","comments_url":"https://api.github.com/repos/simark/ola/comments{/number}","issue_comment_url":"https://api.github.com/repos/simark/ola/issues/comments{/number}","contents_url":"https://api.github.com/repos/simark/ola/contents/{+path}","compare_url":"https://api.github.com/repos/simark/ola/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simark/ola/merges","archive_url":"https://api.github.com/repos/simark/ola/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simark/ola/downloads","issues_url":"https://api.github.com/repos/simark/ola/issues{/number}","pulls_url":"https://api.github.com/repos/simark/ola/pulls{/number}","milestones_url":"https://api.github.com/repos/simark/ola/milestones{/number}","notifications_url":"https://api.github.com/repos/simark/ola/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simark/ola/labels{/name}","releases_url":"https://api.github.com/repos/simark/ola/releases{/id}","created_at":"2015-01-19T15:30:40Z","updated_at":"2015-03-11T11:03:31Z","pushed_at":"2015-03-12T11:30:11Z","git_url":"git://github.com/simark/ola.git","ssh_url":"git@github.com:simark/ola.git","clone_url":"https://github.com/simark/ola.git","svn_url":"https://github.com/simark/ola","homepage":null,"size":16195,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OpenLightingProject:master","ref":"master","sha":"1acda653bddeb2dafcf398c2aac476255bf4e5b1","user":{"login":"OpenLightingProject","id":6199314,"avatar_url":"https://avatars.githubusercontent.com/u/6199314?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenLightingProject","html_url":"https://github.com/OpenLightingProject","followers_url":"https://api.github.com/users/OpenLightingProject/followers","following_url":"https://api.github.com/users/OpenLightingProject/following{/other_user}","gists_url":"https://api.github.com/users/OpenLightingProject/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenLightingProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenLightingProject/subscriptions","organizations_url":"https://api.github.com/users/OpenLightingProject/orgs","repos_url":"https://api.github.com/users/OpenLightingProject/repos","events_url":"https://api.github.com/users/OpenLightingProject/events{/privacy}","received_events_url":"https://api.github.com/users/OpenLightingProject/received_events","type":"Organization","site_admin":false},"repo":{"id":15233168,"name":"ola","full_name":"OpenLightingProject/ola","owner":{"login":"OpenLightingProject","id":6199314,"avatar_url":"https://avatars.githubusercontent.com/u/6199314?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenLightingProject","html_url":"https://github.com/OpenLightingProject","followers_url":"https://api.github.com/users/OpenLightingProject/followers","following_url":"https://api.github.com/users/OpenLightingProject/following{/other_user}","gists_url":"https://api.github.com/users/OpenLightingProject/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenLightingProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenLightingProject/subscriptions","organizations_url":"https://api.github.com/users/OpenLightingProject/orgs","repos_url":"https://api.github.com/users/OpenLightingProject/repos","events_url":"https://api.github.com/users/OpenLightingProject/events{/privacy}","received_events_url":"https://api.github.com/users/OpenLightingProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenLightingProject/ola","description":"The Open Lighting Architecture","fork":false,"url":"https://api.github.com/repos/OpenLightingProject/ola","forks_url":"https://api.github.com/repos/OpenLightingProject/ola/forks","keys_url":"https://api.github.com/repos/OpenLightingProject/ola/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenLightingProject/ola/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenLightingProject/ola/teams","hooks_url":"https://api.github.com/repos/OpenLightingProject/ola/hooks","issue_events_url":"https://api.github.com/repos/OpenLightingProject/ola/issues/events{/number}","events_url":"https://api.github.com/repos/OpenLightingProject/ola/events","assignees_url":"https://api.github.com/repos/OpenLightingProject/ola/assignees{/user}","branches_url":"https://api.github.com/repos/OpenLightingProject/ola/branches{/branch}","tags_url":"https://api.github.com/repos/OpenLightingProject/ola/tags","blobs_url":"https://api.github.com/repos/OpenLightingProject/ola/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenLightingProject/ola/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenLightingProject/ola/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenLightingProject/ola/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenLightingProject/ola/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenLightingProject/ola/languages","stargazers_url":"https://api.github.com/repos/OpenLightingProject/ola/stargazers","contributors_url":"https://api.github.com/repos/OpenLightingProject/ola/contributors","subscribers_url":"https://api.github.com/repos/OpenLightingProject/ola/subscribers","subscription_url":"https://api.github.com/repos/OpenLightingProject/ola/subscription","commits_url":"https://api.github.com/repos/OpenLightingProject/ola/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenLightingProject/ola/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenLightingProject/ola/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenLightingProject/ola/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenLightingProject/ola/contents/{+path}","compare_url":"https://api.github.com/repos/OpenLightingProject/ola/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenLightingProject/ola/merges","archive_url":"https://api.github.com/repos/OpenLightingProject/ola/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenLightingProject/ola/downloads","issues_url":"https://api.github.com/repos/OpenLightingProject/ola/issues{/number}","pulls_url":"https://api.github.com/repos/OpenLightingProject/ola/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenLightingProject/ola/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenLightingProject/ola/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenLightingProject/ola/labels{/name}","releases_url":"https://api.github.com/repos/OpenLightingProject/ola/releases{/id}","created_at":"2013-12-16T18:06:52Z","updated_at":"2015-03-11T06:54:28Z","pushed_at":"2015-03-11T06:54:28Z","git_url":"git://github.com/OpenLightingProject/ola.git","ssh_url":"git@github.com:OpenLightingProject/ola.git","clone_url":"https://github.com/OpenLightingProject/ola.git","svn_url":"https://github.com/OpenLightingProject/ola","homepage":"https://www.openlighting.org/ola/","size":21902,"stargazers_count":73,"watchers_count":73,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":77,"forks":44,"open_issues":77,"watchers":73,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/670"},"html":{"href":"https://github.com/OpenLightingProject/ola/pull/670"},"issue":{"href":"https://api.github.com/repos/OpenLightingProject/ola/issues/670"},"comments":{"href":"https://api.github.com/repos/OpenLightingProject/ola/issues/670/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/670/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/670/commits"},"statuses":{"href":"https://api.github.com/repos/OpenLightingProject/ola/statuses/a9d74394c9aaa5736df9e99e48fb8416cc43802f"}}}}