{"action":"created","comment":{"url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/comments/68774245","id":68774245,"diff_hunk":"@@ -18,6 +18,15 @@\n import os\n import sys\n \n+from datetime import datetime\n+\n+from keystone.cmd import cli\n+from keystone.common import environment\n+from keystone import token\n+from keystone.common import sql\n+from keystone.token.persistence.backends.sql import TokenModel\n+from keystone.token.persistence.backends.sql import Token","path":"sensu/plugins/check-keystone-expired-tokens.py","position":11,"original_position":11,"commit_id":"c83eb1fd1a47b4f5589c43d63d06298a4dd7510f","original_commit_id":"c83eb1fd1a47b4f5589c43d63d06298a4dd7510f","user":{"login":"j2sol","id":523287,"avatar_url":"https://avatars.githubusercontent.com/u/523287?v=3","gravatar_id":"","url":"https://api.github.com/users/j2sol","html_url":"https://github.com/j2sol","followers_url":"https://api.github.com/users/j2sol/followers","following_url":"https://api.github.com/users/j2sol/following{/other_user}","gists_url":"https://api.github.com/users/j2sol/gists{/gist_id}","starred_url":"https://api.github.com/users/j2sol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j2sol/subscriptions","organizations_url":"https://api.github.com/users/j2sol/orgs","repos_url":"https://api.github.com/users/j2sol/repos","events_url":"https://api.github.com/users/j2sol/events{/privacy}","received_events_url":"https://api.github.com/users/j2sol/received_events","type":"User","site_admin":false},"body":"I think the ordering is a bit weird, but I see that this was just lifted from another section.","created_at":"2016-06-28T15:00:40Z","updated_at":"2016-06-28T15:00:40Z","html_url":"https://github.com/blueboxgroup/ursula-monitoring/pull/87#discussion_r68774245","pull_request_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/87","_links":{"self":{"href":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/comments/68774245"},"html":{"href":"https://github.com/blueboxgroup/ursula-monitoring/pull/87#discussion_r68774245"},"pull_request":{"href":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/87"}}},"pull_request":{"url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/87","id":75488589,"html_url":"https://github.com/blueboxgroup/ursula-monitoring/pull/87","diff_url":"https://github.com/blueboxgroup/ursula-monitoring/pull/87.diff","patch_url":"https://github.com/blueboxgroup/ursula-monitoring/pull/87.patch","issue_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/issues/87","number":87,"state":"open","locked":false,"title":"Update keystone token check","user":{"login":"craigtracey","id":1054487,"avatar_url":"https://avatars.githubusercontent.com/u/1054487?v=3","gravatar_id":"","url":"https://api.github.com/users/craigtracey","html_url":"https://github.com/craigtracey","followers_url":"https://api.github.com/users/craigtracey/followers","following_url":"https://api.github.com/users/craigtracey/following{/other_user}","gists_url":"https://api.github.com/users/craigtracey/gists{/gist_id}","starred_url":"https://api.github.com/users/craigtracey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigtracey/subscriptions","organizations_url":"https://api.github.com/users/craigtracey/orgs","repos_url":"https://api.github.com/users/craigtracey/repos","events_url":"https://api.github.com/users/craigtracey/events{/privacy}","received_events_url":"https://api.github.com/users/craigtracey/received_events","type":"User","site_admin":false},"body":"This check worked on previous versions of Keystone, but now is broken as\r\nmodules have been refactored.  Fix this check in the following ways:\r\n- make it pep8\r\n- import the refactored modules correctly\r\n- change the logic such that it doesnt start a transtaction and simply\r\n  does a token count, instead of a full query.","created_at":"2016-06-28T14:36:51Z","updated_at":"2016-06-28T15:00:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbd0d5e41e837d44dc76d1318e984ed7d7a54586","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/87/commits","review_comments_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/87/comments","review_comment_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/issues/87/comments","statuses_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/statuses/c83eb1fd1a47b4f5589c43d63d06298a4dd7510f","head":{"label":"blueboxgroup:keystone-tokens","ref":"keystone-tokens","sha":"c83eb1fd1a47b4f5589c43d63d06298a4dd7510f","user":{"login":"blueboxgroup","id":458705,"avatar_url":"https://avatars.githubusercontent.com/u/458705?v=3","gravatar_id":"","url":"https://api.github.com/users/blueboxgroup","html_url":"https://github.com/blueboxgroup","followers_url":"https://api.github.com/users/blueboxgroup/followers","following_url":"https://api.github.com/users/blueboxgroup/following{/other_user}","gists_url":"https://api.github.com/users/blueboxgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/blueboxgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueboxgroup/subscriptions","organizations_url":"https://api.github.com/users/blueboxgroup/orgs","repos_url":"https://api.github.com/users/blueboxgroup/repos","events_url":"https://api.github.com/users/blueboxgroup/events{/privacy}","received_events_url":"https://api.github.com/users/blueboxgroup/received_events","type":"Organization","site_admin":false},"repo":{"id":31778305,"name":"ursula-monitoring","full_name":"blueboxgroup/ursula-monitoring","owner":{"login":"blueboxgroup","id":458705,"avatar_url":"https://avatars.githubusercontent.com/u/458705?v=3","gravatar_id":"","url":"https://api.github.com/users/blueboxgroup","html_url":"https://github.com/blueboxgroup","followers_url":"https://api.github.com/users/blueboxgroup/followers","following_url":"https://api.github.com/users/blueboxgroup/following{/other_user}","gists_url":"https://api.github.com/users/blueboxgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/blueboxgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueboxgroup/subscriptions","organizations_url":"https://api.github.com/users/blueboxgroup/orgs","repos_url":"https://api.github.com/users/blueboxgroup/repos","events_url":"https://api.github.com/users/blueboxgroup/events{/privacy}","received_events_url":"https://api.github.com/users/blueboxgroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blueboxgroup/ursula-monitoring","description":"Urusla monitoring and logging repo","fork":false,"url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring","forks_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/forks","keys_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/teams","hooks_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/hooks","issue_events_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/issues/events{/number}","events_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/events","assignees_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/assignees{/user}","branches_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/branches{/branch}","tags_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/tags","blobs_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/statuses/{sha}","languages_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/languages","stargazers_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/stargazers","contributors_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/contributors","subscribers_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/subscribers","subscription_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/subscription","commits_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/contents/{+path}","compare_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/merges","archive_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/downloads","issues_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/issues{/number}","pulls_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls{/number}","milestones_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/milestones{/number}","notifications_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/labels{/name}","releases_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/releases{/id}","deployments_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/deployments","created_at":"2015-03-06T16:32:28Z","updated_at":"2016-06-15T20:33:02Z","pushed_at":"2016-06-28T14:57:52Z","git_url":"git://github.com/blueboxgroup/ursula-monitoring.git","ssh_url":"git@github.com:blueboxgroup/ursula-monitoring.git","clone_url":"https://github.com/blueboxgroup/ursula-monitoring.git","svn_url":"https://github.com/blueboxgroup/ursula-monitoring","homepage":null,"size":253,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":12,"forks":18,"open_issues":12,"watchers":5,"default_branch":"master"}},"base":{"label":"blueboxgroup:master","ref":"master","sha":"056c15adc855d59025a4ec456b3fcb2db4e168d3","user":{"login":"blueboxgroup","id":458705,"avatar_url":"https://avatars.githubusercontent.com/u/458705?v=3","gravatar_id":"","url":"https://api.github.com/users/blueboxgroup","html_url":"https://github.com/blueboxgroup","followers_url":"https://api.github.com/users/blueboxgroup/followers","following_url":"https://api.github.com/users/blueboxgroup/following{/other_user}","gists_url":"https://api.github.com/users/blueboxgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/blueboxgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueboxgroup/subscriptions","organizations_url":"https://api.github.com/users/blueboxgroup/orgs","repos_url":"https://api.github.com/users/blueboxgroup/repos","events_url":"https://api.github.com/users/blueboxgroup/events{/privacy}","received_events_url":"https://api.github.com/users/blueboxgroup/received_events","type":"Organization","site_admin":false},"repo":{"id":31778305,"name":"ursula-monitoring","full_name":"blueboxgroup/ursula-monitoring","owner":{"login":"blueboxgroup","id":458705,"avatar_url":"https://avatars.githubusercontent.com/u/458705?v=3","gravatar_id":"","url":"https://api.github.com/users/blueboxgroup","html_url":"https://github.com/blueboxgroup","followers_url":"https://api.github.com/users/blueboxgroup/followers","following_url":"https://api.github.com/users/blueboxgroup/following{/other_user}","gists_url":"https://api.github.com/users/blueboxgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/blueboxgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueboxgroup/subscriptions","organizations_url":"https://api.github.com/users/blueboxgroup/orgs","repos_url":"https://api.github.com/users/blueboxgroup/repos","events_url":"https://api.github.com/users/blueboxgroup/events{/privacy}","received_events_url":"https://api.github.com/users/blueboxgroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blueboxgroup/ursula-monitoring","description":"Urusla monitoring and logging repo","fork":false,"url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring","forks_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/forks","keys_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/teams","hooks_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/hooks","issue_events_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/issues/events{/number}","events_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/events","assignees_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/assignees{/user}","branches_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/branches{/branch}","tags_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/tags","blobs_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/statuses/{sha}","languages_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/languages","stargazers_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/stargazers","contributors_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/contributors","subscribers_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/subscribers","subscription_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/subscription","commits_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/contents/{+path}","compare_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/merges","archive_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/downloads","issues_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/issues{/number}","pulls_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls{/number}","milestones_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/milestones{/number}","notifications_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/labels{/name}","releases_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/releases{/id}","deployments_url":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/deployments","created_at":"2015-03-06T16:32:28Z","updated_at":"2016-06-15T20:33:02Z","pushed_at":"2016-06-28T14:57:52Z","git_url":"git://github.com/blueboxgroup/ursula-monitoring.git","ssh_url":"git@github.com:blueboxgroup/ursula-monitoring.git","clone_url":"https://github.com/blueboxgroup/ursula-monitoring.git","svn_url":"https://github.com/blueboxgroup/ursula-monitoring","homepage":null,"size":253,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":12,"forks":18,"open_issues":12,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/87"},"html":{"href":"https://github.com/blueboxgroup/ursula-monitoring/pull/87"},"issue":{"href":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/issues/87"},"comments":{"href":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/blueboxgroup/ursula-monitoring/statuses/c83eb1fd1a47b4f5589c43d63d06298a4dd7510f"}}}}
{"actor":{"display_login":"j2sol"}}