{"action":"created","comment":{"url":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/comments/80043216","id":80043216,"diff_hunk":"@@ -0,0 +1,41 @@\n+# Copyright 2016 SAP SE\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+from swiftclient.client import Connection\n+\n+\n+def get_swift_connection(args):\n+    authurl = args.os_auth_url\n+    username = args.os_username\n+    password = args.os_password\n+    auth_version = args.os_auth_version\n+    cacert = args.os_cacert\n+    insecure = args.insecure\n+\n+    os_options = {}\n+    args_dict = vars(args)\n+    for key, value in args_dict.iteritems():\n+        if key.startswith('os_'):\n+            key = key.replace('os_', '')","path":"caretaker/common.py","position":30,"original_position":30,"commit_id":"0110583d348174d3d5e80b1587abe955ff0d885e","original_commit_id":"0110583d348174d3d5e80b1587abe955ff0d885e","user":{"login":"majewsky","id":24696,"avatar_url":"https://avatars.githubusercontent.com/u/24696?v=3","gravatar_id":"","url":"https://api.github.com/users/majewsky","html_url":"https://github.com/majewsky","followers_url":"https://api.github.com/users/majewsky/followers","following_url":"https://api.github.com/users/majewsky/following{/other_user}","gists_url":"https://api.github.com/users/majewsky/gists{/gist_id}","starred_url":"https://api.github.com/users/majewsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majewsky/subscriptions","organizations_url":"https://api.github.com/users/majewsky/orgs","repos_url":"https://api.github.com/users/majewsky/repos","events_url":"https://api.github.com/users/majewsky/events{/privacy}","received_events_url":"https://api.github.com/users/majewsky/received_events","type":"User","site_admin":false},"body":"Another lstrip opportunity.","created_at":"2016-09-22T13:46:40Z","updated_at":"2016-09-22T13:47:08Z","html_url":"https://github.com/sapcc/swift-account-caretaker/pull/1#discussion_r80043216","pull_request_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/comments/80043216"},"html":{"href":"https://github.com/sapcc/swift-account-caretaker/pull/1#discussion_r80043216"},"pull_request":{"href":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/1","id":86338884,"html_url":"https://github.com/sapcc/swift-account-caretaker/pull/1","diff_url":"https://github.com/sapcc/swift-account-caretaker/pull/1.diff","patch_url":"https://github.com/sapcc/swift-account-caretaker/pull/1.patch","issue_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/issues/1","number":1,"state":"open","locked":false,"title":"Collector job","user":{"login":"reimannf","id":10754110,"avatar_url":"https://avatars.githubusercontent.com/u/10754110?v=3","gravatar_id":"","url":"https://api.github.com/users/reimannf","html_url":"https://github.com/reimannf","followers_url":"https://api.github.com/users/reimannf/followers","following_url":"https://api.github.com/users/reimannf/following{/other_user}","gists_url":"https://api.github.com/users/reimannf/gists{/gist_id}","starred_url":"https://api.github.com/users/reimannf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reimannf/subscriptions","organizations_url":"https://api.github.com/users/reimannf/orgs","repos_url":"https://api.github.com/users/reimannf/repos","events_url":"https://api.github.com/users/reimannf/events{/privacy}","received_events_url":"https://api.github.com/users/reimannf/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-22T13:38:52Z","updated_at":"2016-09-22T13:47:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6fb8c5943513769226f360b6d95c7a07c8fb4e79","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/1/commits","review_comments_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/1/comments","review_comment_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/issues/1/comments","statuses_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/statuses/0110583d348174d3d5e80b1587abe955ff0d885e","head":{"label":"sapcc:collector","ref":"collector","sha":"0110583d348174d3d5e80b1587abe955ff0d885e","user":{"login":"sapcc","id":4242847,"avatar_url":"https://avatars.githubusercontent.com/u/4242847?v=3","gravatar_id":"","url":"https://api.github.com/users/sapcc","html_url":"https://github.com/sapcc","followers_url":"https://api.github.com/users/sapcc/followers","following_url":"https://api.github.com/users/sapcc/following{/other_user}","gists_url":"https://api.github.com/users/sapcc/gists{/gist_id}","starred_url":"https://api.github.com/users/sapcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapcc/subscriptions","organizations_url":"https://api.github.com/users/sapcc/orgs","repos_url":"https://api.github.com/users/sapcc/repos","events_url":"https://api.github.com/users/sapcc/events{/privacy}","received_events_url":"https://api.github.com/users/sapcc/received_events","type":"Organization","site_admin":false},"repo":{"id":68359699,"name":"swift-account-caretaker","full_name":"sapcc/swift-account-caretaker","owner":{"login":"sapcc","id":4242847,"avatar_url":"https://avatars.githubusercontent.com/u/4242847?v=3","gravatar_id":"","url":"https://api.github.com/users/sapcc","html_url":"https://github.com/sapcc","followers_url":"https://api.github.com/users/sapcc/followers","following_url":"https://api.github.com/users/sapcc/following{/other_user}","gists_url":"https://api.github.com/users/sapcc/gists{/gist_id}","starred_url":"https://api.github.com/users/sapcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapcc/subscriptions","organizations_url":"https://api.github.com/users/sapcc/orgs","repos_url":"https://api.github.com/users/sapcc/repos","events_url":"https://api.github.com/users/sapcc/events{/privacy}","received_events_url":"https://api.github.com/users/sapcc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sapcc/swift-account-caretaker","description":"Collecting and merging swift account stats on swift account servers for the purpose of cleaning up orphaned accounts without a corresponding keystone project","fork":false,"url":"https://api.github.com/repos/sapcc/swift-account-caretaker","forks_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/forks","keys_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/teams","hooks_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/hooks","issue_events_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/issues/events{/number}","events_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/events","assignees_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/assignees{/user}","branches_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/branches{/branch}","tags_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/tags","blobs_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/git/refs{/sha}","trees_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/statuses/{sha}","languages_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/languages","stargazers_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/stargazers","contributors_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/contributors","subscribers_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/subscribers","subscription_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/subscription","commits_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/commits{/sha}","git_commits_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/git/commits{/sha}","comments_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/comments{/number}","issue_comment_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/issues/comments{/number}","contents_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/contents/{+path}","compare_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/merges","archive_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/downloads","issues_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/issues{/number}","pulls_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls{/number}","milestones_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/milestones{/number}","notifications_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/labels{/name}","releases_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/releases{/id}","deployments_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/deployments","created_at":"2016-09-16T07:10:16Z","updated_at":"2016-09-19T19:27:55Z","pushed_at":"2016-09-22T13:38:52Z","git_url":"git://github.com/sapcc/swift-account-caretaker.git","ssh_url":"git@github.com:sapcc/swift-account-caretaker.git","clone_url":"https://github.com/sapcc/swift-account-caretaker.git","svn_url":"https://github.com/sapcc/swift-account-caretaker","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"sapcc:master","ref":"master","sha":"9fed18a857e40e190ff23956151f206d85518f1e","user":{"login":"sapcc","id":4242847,"avatar_url":"https://avatars.githubusercontent.com/u/4242847?v=3","gravatar_id":"","url":"https://api.github.com/users/sapcc","html_url":"https://github.com/sapcc","followers_url":"https://api.github.com/users/sapcc/followers","following_url":"https://api.github.com/users/sapcc/following{/other_user}","gists_url":"https://api.github.com/users/sapcc/gists{/gist_id}","starred_url":"https://api.github.com/users/sapcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapcc/subscriptions","organizations_url":"https://api.github.com/users/sapcc/orgs","repos_url":"https://api.github.com/users/sapcc/repos","events_url":"https://api.github.com/users/sapcc/events{/privacy}","received_events_url":"https://api.github.com/users/sapcc/received_events","type":"Organization","site_admin":false},"repo":{"id":68359699,"name":"swift-account-caretaker","full_name":"sapcc/swift-account-caretaker","owner":{"login":"sapcc","id":4242847,"avatar_url":"https://avatars.githubusercontent.com/u/4242847?v=3","gravatar_id":"","url":"https://api.github.com/users/sapcc","html_url":"https://github.com/sapcc","followers_url":"https://api.github.com/users/sapcc/followers","following_url":"https://api.github.com/users/sapcc/following{/other_user}","gists_url":"https://api.github.com/users/sapcc/gists{/gist_id}","starred_url":"https://api.github.com/users/sapcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapcc/subscriptions","organizations_url":"https://api.github.com/users/sapcc/orgs","repos_url":"https://api.github.com/users/sapcc/repos","events_url":"https://api.github.com/users/sapcc/events{/privacy}","received_events_url":"https://api.github.com/users/sapcc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sapcc/swift-account-caretaker","description":"Collecting and merging swift account stats on swift account servers for the purpose of cleaning up orphaned accounts without a corresponding keystone project","fork":false,"url":"https://api.github.com/repos/sapcc/swift-account-caretaker","forks_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/forks","keys_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/teams","hooks_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/hooks","issue_events_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/issues/events{/number}","events_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/events","assignees_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/assignees{/user}","branches_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/branches{/branch}","tags_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/tags","blobs_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/git/refs{/sha}","trees_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/statuses/{sha}","languages_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/languages","stargazers_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/stargazers","contributors_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/contributors","subscribers_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/subscribers","subscription_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/subscription","commits_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/commits{/sha}","git_commits_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/git/commits{/sha}","comments_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/comments{/number}","issue_comment_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/issues/comments{/number}","contents_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/contents/{+path}","compare_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/merges","archive_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/downloads","issues_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/issues{/number}","pulls_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls{/number}","milestones_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/milestones{/number}","notifications_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/labels{/name}","releases_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/releases{/id}","deployments_url":"https://api.github.com/repos/sapcc/swift-account-caretaker/deployments","created_at":"2016-09-16T07:10:16Z","updated_at":"2016-09-19T19:27:55Z","pushed_at":"2016-09-22T13:38:52Z","git_url":"git://github.com/sapcc/swift-account-caretaker.git","ssh_url":"git@github.com:sapcc/swift-account-caretaker.git","clone_url":"https://github.com/sapcc/swift-account-caretaker.git","svn_url":"https://github.com/sapcc/swift-account-caretaker","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/1"},"html":{"href":"https://github.com/sapcc/swift-account-caretaker/pull/1"},"issue":{"href":"https://api.github.com/repos/sapcc/swift-account-caretaker/issues/1"},"comments":{"href":"https://api.github.com/repos/sapcc/swift-account-caretaker/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sapcc/swift-account-caretaker/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/sapcc/swift-account-caretaker/statuses/0110583d348174d3d5e80b1587abe955ff0d885e"}}}}
{"actor":{"display_login":"majewsky"}}