{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/comments/129323125","pull_request_review_id":52083803,"id":129323125,"diff_hunk":"@@ -2,28 +2,106 @@\n SONiC ConfigDB connection module \n \n Example:\n+    # Write to config DB\n     config_db = ConfigDBConnector()\n     config_db.connect()\n-    config_db.set_table('bgp_neighbor', '10.0.0.1', {\n+    config_db.set_entry('BGP_NEIGHBOR', '10.0.0.1', {\n         'admin_status': state\n         })\n \n-TODO:\n-    Will add API on keyspace subscription for incremental configuration support\n-    in the incoming versions.\n+    # Daemon to watch config change in certain table:\n+    config_db = ConfigDBConnector()\n+    handler = lambda table, key, data: print (key, data)\n+    config_db.add_handler('BGP_NEIGHBOR', handler)","path":"src/swsssdk/configdb.py","position":18,"original_position":18,"commit_id":"146e7e82b0caf52b093db466e93400323f65ae08","original_commit_id":"146e7e82b0caf52b093db466e93400323f65ae08","user":{"login":"lguohan","id":2293967,"avatar_url":"https://avatars1.githubusercontent.com/u/2293967?v=4","gravatar_id":"","url":"https://api.github.com/users/lguohan","html_url":"https://github.com/lguohan","followers_url":"https://api.github.com/users/lguohan/followers","following_url":"https://api.github.com/users/lguohan/following{/other_user}","gists_url":"https://api.github.com/users/lguohan/gists{/gist_id}","starred_url":"https://api.github.com/users/lguohan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lguohan/subscriptions","organizations_url":"https://api.github.com/users/lguohan/orgs","repos_url":"https://api.github.com/users/lguohan/repos","events_url":"https://api.github.com/users/lguohan/events{/privacy}","received_events_url":"https://api.github.com/users/lguohan/received_events","type":"User","site_admin":false},"body":"subscribe?","created_at":"2017-07-25T14:34:34Z","updated_at":"2017-07-25T14:34:35Z","html_url":"https://github.com/Azure/sonic-py-swsssdk/pull/8#discussion_r129323125","pull_request_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/comments/129323125"},"html":{"href":"https://github.com/Azure/sonic-py-swsssdk/pull/8#discussion_r129323125"},"pull_request":{"href":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/8","id":131194346,"html_url":"https://github.com/Azure/sonic-py-swsssdk/pull/8","diff_url":"https://github.com/Azure/sonic-py-swsssdk/pull/8.diff","patch_url":"https://github.com/Azure/sonic-py-swsssdk/pull/8.patch","issue_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/issues/8","number":8,"state":"open","locked":false,"title":"Add support to subscribe to config DB change","user":{"login":"taoyl-ms","id":22916085,"avatar_url":"https://avatars1.githubusercontent.com/u/22916085?v=4","gravatar_id":"","url":"https://api.github.com/users/taoyl-ms","html_url":"https://github.com/taoyl-ms","followers_url":"https://api.github.com/users/taoyl-ms/followers","following_url":"https://api.github.com/users/taoyl-ms/following{/other_user}","gists_url":"https://api.github.com/users/taoyl-ms/gists{/gist_id}","starred_url":"https://api.github.com/users/taoyl-ms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taoyl-ms/subscriptions","organizations_url":"https://api.github.com/users/taoyl-ms/orgs","repos_url":"https://api.github.com/users/taoyl-ms/repos","events_url":"https://api.github.com/users/taoyl-ms/events{/privacy}","received_events_url":"https://api.github.com/users/taoyl-ms/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-07-18T21:45:08Z","updated_at":"2017-07-25T14:34:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"603f60b984c6491b63990a5183a022c38aa3dfc4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/8/commits","review_comments_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/8/comments","review_comment_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/issues/8/comments","statuses_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/statuses/146e7e82b0caf52b093db466e93400323f65ae08","head":{"label":"taoyl-ms:taoyl/subscriber","ref":"taoyl/subscriber","sha":"146e7e82b0caf52b093db466e93400323f65ae08","user":{"login":"taoyl-ms","id":22916085,"avatar_url":"https://avatars1.githubusercontent.com/u/22916085?v=4","gravatar_id":"","url":"https://api.github.com/users/taoyl-ms","html_url":"https://github.com/taoyl-ms","followers_url":"https://api.github.com/users/taoyl-ms/followers","following_url":"https://api.github.com/users/taoyl-ms/following{/other_user}","gists_url":"https://api.github.com/users/taoyl-ms/gists{/gist_id}","starred_url":"https://api.github.com/users/taoyl-ms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taoyl-ms/subscriptions","organizations_url":"https://api.github.com/users/taoyl-ms/orgs","repos_url":"https://api.github.com/users/taoyl-ms/repos","events_url":"https://api.github.com/users/taoyl-ms/events{/privacy}","received_events_url":"https://api.github.com/users/taoyl-ms/received_events","type":"User","site_admin":false},"repo":{"id":97060589,"name":"sonic-py-swsssdk","full_name":"taoyl-ms/sonic-py-swsssdk","owner":{"login":"taoyl-ms","id":22916085,"avatar_url":"https://avatars1.githubusercontent.com/u/22916085?v=4","gravatar_id":"","url":"https://api.github.com/users/taoyl-ms","html_url":"https://github.com/taoyl-ms","followers_url":"https://api.github.com/users/taoyl-ms/followers","following_url":"https://api.github.com/users/taoyl-ms/following{/other_user}","gists_url":"https://api.github.com/users/taoyl-ms/gists{/gist_id}","starred_url":"https://api.github.com/users/taoyl-ms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taoyl-ms/subscriptions","organizations_url":"https://api.github.com/users/taoyl-ms/orgs","repos_url":"https://api.github.com/users/taoyl-ms/repos","events_url":"https://api.github.com/users/taoyl-ms/events{/privacy}","received_events_url":"https://api.github.com/users/taoyl-ms/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/taoyl-ms/sonic-py-swsssdk","description":"Python SONiC switch state service sdk","fork":true,"url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk","forks_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/forks","keys_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/teams","hooks_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/hooks","issue_events_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/issues/events{/number}","events_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/events","assignees_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/assignees{/user}","branches_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/branches{/branch}","tags_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/tags","blobs_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/statuses/{sha}","languages_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/languages","stargazers_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/stargazers","contributors_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/contributors","subscribers_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/subscribers","subscription_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/subscription","commits_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/contents/{+path}","compare_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/merges","archive_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/downloads","issues_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/issues{/number}","pulls_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/pulls{/number}","milestones_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/milestones{/number}","notifications_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/labels{/name}","releases_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/releases{/id}","deployments_url":"https://api.github.com/repos/taoyl-ms/sonic-py-swsssdk/deployments","created_at":"2017-07-12T23:37:47Z","updated_at":"2017-07-12T23:37:49Z","pushed_at":"2017-07-25T01:01:00Z","git_url":"git://github.com/taoyl-ms/sonic-py-swsssdk.git","ssh_url":"git@github.com:taoyl-ms/sonic-py-swsssdk.git","clone_url":"https://github.com/taoyl-ms/sonic-py-swsssdk.git","svn_url":"https://github.com/taoyl-ms/sonic-py-swsssdk","homepage":null,"size":31,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"Azure:master","ref":"master","sha":"dfe4bac9d9e4c9b6673888e653f6a2c5625991b8","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":53432430,"name":"sonic-py-swsssdk","full_name":"Azure/sonic-py-swsssdk","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/sonic-py-swsssdk","description":"Python SONiC switch state service sdk","fork":false,"url":"https://api.github.com/repos/Azure/sonic-py-swsssdk","forks_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/forks","keys_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/teams","hooks_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/hooks","issue_events_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/events","assignees_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/tags","blobs_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/languages","stargazers_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/stargazers","contributors_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/contributors","subscribers_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/subscribers","subscription_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/subscription","commits_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/merges","archive_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/downloads","issues_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/labels{/name}","releases_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/sonic-py-swsssdk/deployments","created_at":"2016-03-08T17:42:10Z","updated_at":"2017-02-17T00:44:15Z","pushed_at":"2017-07-25T01:01:01Z","git_url":"git://github.com/Azure/sonic-py-swsssdk.git","ssh_url":"git@github.com:Azure/sonic-py-swsssdk.git","clone_url":"https://github.com/Azure/sonic-py-swsssdk.git","svn_url":"https://github.com/Azure/sonic-py-swsssdk","homepage":null,"size":23,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/8"},"html":{"href":"https://github.com/Azure/sonic-py-swsssdk/pull/8"},"issue":{"href":"https://api.github.com/repos/Azure/sonic-py-swsssdk/issues/8"},"comments":{"href":"https://api.github.com/repos/Azure/sonic-py-swsssdk/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/sonic-py-swsssdk/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/sonic-py-swsssdk/statuses/146e7e82b0caf52b093db466e93400323f65ae08"}}}}
{"actor":{"display_login":"lguohan"}}