{"action":"created","comment":{"url":"https://api.github.com/repos/projectcalico/libcalico/pulls/comments/57038909","id":57038909,"diff_hunk":"@@ -186,11 +226,21 @@ def __init__(self):\n \n         # Set CA value to None if it is a None-value string\n         etcd_ca = None if not etcd_ca else etcd_ca\n-        self.etcd_client = etcd.Client(host=host,\n-                                       port=int(port),\n-                                       protocol=etcd_scheme,\n-                                       cert=key_pair,\n-                                       ca_cert=etcd_ca)\n+\n+        # python-etcd Client requires a different invocation when there's only\n+        # a single etcd host.\n+        if len(etcd_addrs) > 1:\n+            self.etcd_client = etcd.Client(host=tuple(etcd_addrs),\n+                                           protocol=etcd_scheme,\n+                                           cert=key_pair,\n+                                           ca_cert=etcd_ca,\n+                                           allow_reconnect=True)","path":"calico_containers/pycalico/datastore.py","position":88,"original_position":88,"commit_id":"b590cc22e8f087984664e10fd401989bad70d9bd","original_commit_id":"b590cc22e8f087984664e10fd401989bad70d9bd","user":{"login":"tomdee","id":6635,"avatar_url":"https://avatars.githubusercontent.com/u/6635?v=3","gravatar_id":"","url":"https://api.github.com/users/tomdee","html_url":"https://github.com/tomdee","followers_url":"https://api.github.com/users/tomdee/followers","following_url":"https://api.github.com/users/tomdee/following{/other_user}","gists_url":"https://api.github.com/users/tomdee/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdee/subscriptions","organizations_url":"https://api.github.com/users/tomdee/orgs","repos_url":"https://api.github.com/users/tomdee/repos","events_url":"https://api.github.com/users/tomdee/events{/privacy}","received_events_url":"https://api.github.com/users/tomdee/received_events","type":"User","site_admin":false},"body":"Is it worth a note on the allow_reconnects?","created_at":"2016-03-22T18:08:04Z","updated_at":"2016-03-22T18:08:04Z","html_url":"https://github.com/projectcalico/libcalico/pull/99#discussion_r57038909","pull_request_url":"https://api.github.com/repos/projectcalico/libcalico/pulls/99","_links":{"self":{"href":"https://api.github.com/repos/projectcalico/libcalico/pulls/comments/57038909"},"html":{"href":"https://github.com/projectcalico/libcalico/pull/99#discussion_r57038909"},"pull_request":{"href":"https://api.github.com/repos/projectcalico/libcalico/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/projectcalico/libcalico/pulls/99","id":63654911,"html_url":"https://github.com/projectcalico/libcalico/pull/99","diff_url":"https://github.com/projectcalico/libcalico/pull/99.diff","patch_url":"https://github.com/projectcalico/libcalico/pull/99.patch","issue_url":"https://api.github.com/repos/projectcalico/libcalico/issues/99","number":99,"state":"open","locked":false,"title":"Read etcd location from ETCD_ENDPOINTS if available","user":{"login":"matthewdupre","id":9053570,"avatar_url":"https://avatars.githubusercontent.com/u/9053570?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewdupre","html_url":"https://github.com/matthewdupre","followers_url":"https://api.github.com/users/matthewdupre/followers","following_url":"https://api.github.com/users/matthewdupre/following{/other_user}","gists_url":"https://api.github.com/users/matthewdupre/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewdupre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewdupre/subscriptions","organizations_url":"https://api.github.com/users/matthewdupre/orgs","repos_url":"https://api.github.com/users/matthewdupre/repos","events_url":"https://api.github.com/users/matthewdupre/events{/privacy}","received_events_url":"https://api.github.com/users/matthewdupre/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-22T00:40:14Z","updated_at":"2016-03-22T18:08:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f63f3e5a773dda3a1ef7a6ab796226903f25620","assignee":{"login":"tomdee","id":6635,"avatar_url":"https://avatars.githubusercontent.com/u/6635?v=3","gravatar_id":"","url":"https://api.github.com/users/tomdee","html_url":"https://github.com/tomdee","followers_url":"https://api.github.com/users/tomdee/followers","following_url":"https://api.github.com/users/tomdee/following{/other_user}","gists_url":"https://api.github.com/users/tomdee/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdee/subscriptions","organizations_url":"https://api.github.com/users/tomdee/orgs","repos_url":"https://api.github.com/users/tomdee/repos","events_url":"https://api.github.com/users/tomdee/events{/privacy}","received_events_url":"https://api.github.com/users/tomdee/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/projectcalico/libcalico/pulls/99/commits","review_comments_url":"https://api.github.com/repos/projectcalico/libcalico/pulls/99/comments","review_comment_url":"https://api.github.com/repos/projectcalico/libcalico/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectcalico/libcalico/issues/99/comments","statuses_url":"https://api.github.com/repos/projectcalico/libcalico/statuses/b590cc22e8f087984664e10fd401989bad70d9bd","head":{"label":"matthewdupre:etcd-endpoints","ref":"etcd-endpoints","sha":"b590cc22e8f087984664e10fd401989bad70d9bd","user":{"login":"matthewdupre","id":9053570,"avatar_url":"https://avatars.githubusercontent.com/u/9053570?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewdupre","html_url":"https://github.com/matthewdupre","followers_url":"https://api.github.com/users/matthewdupre/followers","following_url":"https://api.github.com/users/matthewdupre/following{/other_user}","gists_url":"https://api.github.com/users/matthewdupre/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewdupre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewdupre/subscriptions","organizations_url":"https://api.github.com/users/matthewdupre/orgs","repos_url":"https://api.github.com/users/matthewdupre/repos","events_url":"https://api.github.com/users/matthewdupre/events{/privacy}","received_events_url":"https://api.github.com/users/matthewdupre/received_events","type":"User","site_admin":false},"repo":{"id":54161219,"name":"libcalico","full_name":"matthewdupre/libcalico","owner":{"login":"matthewdupre","id":9053570,"avatar_url":"https://avatars.githubusercontent.com/u/9053570?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewdupre","html_url":"https://github.com/matthewdupre","followers_url":"https://api.github.com/users/matthewdupre/followers","following_url":"https://api.github.com/users/matthewdupre/following{/other_user}","gists_url":"https://api.github.com/users/matthewdupre/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewdupre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewdupre/subscriptions","organizations_url":"https://api.github.com/users/matthewdupre/orgs","repos_url":"https://api.github.com/users/matthewdupre/repos","events_url":"https://api.github.com/users/matthewdupre/events{/privacy}","received_events_url":"https://api.github.com/users/matthewdupre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matthewdupre/libcalico","description":"","fork":true,"url":"https://api.github.com/repos/matthewdupre/libcalico","forks_url":"https://api.github.com/repos/matthewdupre/libcalico/forks","keys_url":"https://api.github.com/repos/matthewdupre/libcalico/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matthewdupre/libcalico/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matthewdupre/libcalico/teams","hooks_url":"https://api.github.com/repos/matthewdupre/libcalico/hooks","issue_events_url":"https://api.github.com/repos/matthewdupre/libcalico/issues/events{/number}","events_url":"https://api.github.com/repos/matthewdupre/libcalico/events","assignees_url":"https://api.github.com/repos/matthewdupre/libcalico/assignees{/user}","branches_url":"https://api.github.com/repos/matthewdupre/libcalico/branches{/branch}","tags_url":"https://api.github.com/repos/matthewdupre/libcalico/tags","blobs_url":"https://api.github.com/repos/matthewdupre/libcalico/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matthewdupre/libcalico/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matthewdupre/libcalico/git/refs{/sha}","trees_url":"https://api.github.com/repos/matthewdupre/libcalico/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matthewdupre/libcalico/statuses/{sha}","languages_url":"https://api.github.com/repos/matthewdupre/libcalico/languages","stargazers_url":"https://api.github.com/repos/matthewdupre/libcalico/stargazers","contributors_url":"https://api.github.com/repos/matthewdupre/libcalico/contributors","subscribers_url":"https://api.github.com/repos/matthewdupre/libcalico/subscribers","subscription_url":"https://api.github.com/repos/matthewdupre/libcalico/subscription","commits_url":"https://api.github.com/repos/matthewdupre/libcalico/commits{/sha}","git_commits_url":"https://api.github.com/repos/matthewdupre/libcalico/git/commits{/sha}","comments_url":"https://api.github.com/repos/matthewdupre/libcalico/comments{/number}","issue_comment_url":"https://api.github.com/repos/matthewdupre/libcalico/issues/comments{/number}","contents_url":"https://api.github.com/repos/matthewdupre/libcalico/contents/{+path}","compare_url":"https://api.github.com/repos/matthewdupre/libcalico/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matthewdupre/libcalico/merges","archive_url":"https://api.github.com/repos/matthewdupre/libcalico/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matthewdupre/libcalico/downloads","issues_url":"https://api.github.com/repos/matthewdupre/libcalico/issues{/number}","pulls_url":"https://api.github.com/repos/matthewdupre/libcalico/pulls{/number}","milestones_url":"https://api.github.com/repos/matthewdupre/libcalico/milestones{/number}","notifications_url":"https://api.github.com/repos/matthewdupre/libcalico/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matthewdupre/libcalico/labels{/name}","releases_url":"https://api.github.com/repos/matthewdupre/libcalico/releases{/id}","deployments_url":"https://api.github.com/repos/matthewdupre/libcalico/deployments","created_at":"2016-03-18T00:45:11Z","updated_at":"2016-03-18T00:45:12Z","pushed_at":"2016-03-22T00:39:35Z","git_url":"git://github.com/matthewdupre/libcalico.git","ssh_url":"git@github.com:matthewdupre/libcalico.git","clone_url":"https://github.com/matthewdupre/libcalico.git","svn_url":"https://github.com/matthewdupre/libcalico","homepage":"http://www.projectcalico.org/","size":1796,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"projectcalico:master","ref":"master","sha":"89ebe40b9e58f405a8bdab038cd3657112b1c86c","user":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars.githubusercontent.com/u/12304728?v=3","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"repo":{"id":39856396,"name":"libcalico","full_name":"projectcalico/libcalico","owner":{"login":"projectcalico","id":12304728,"avatar_url":"https://avatars.githubusercontent.com/u/12304728?v=3","gravatar_id":"","url":"https://api.github.com/users/projectcalico","html_url":"https://github.com/projectcalico","followers_url":"https://api.github.com/users/projectcalico/followers","following_url":"https://api.github.com/users/projectcalico/following{/other_user}","gists_url":"https://api.github.com/users/projectcalico/gists{/gist_id}","starred_url":"https://api.github.com/users/projectcalico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectcalico/subscriptions","organizations_url":"https://api.github.com/users/projectcalico/orgs","repos_url":"https://api.github.com/users/projectcalico/repos","events_url":"https://api.github.com/users/projectcalico/events{/privacy}","received_events_url":"https://api.github.com/users/projectcalico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectcalico/libcalico","description":"","fork":false,"url":"https://api.github.com/repos/projectcalico/libcalico","forks_url":"https://api.github.com/repos/projectcalico/libcalico/forks","keys_url":"https://api.github.com/repos/projectcalico/libcalico/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectcalico/libcalico/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectcalico/libcalico/teams","hooks_url":"https://api.github.com/repos/projectcalico/libcalico/hooks","issue_events_url":"https://api.github.com/repos/projectcalico/libcalico/issues/events{/number}","events_url":"https://api.github.com/repos/projectcalico/libcalico/events","assignees_url":"https://api.github.com/repos/projectcalico/libcalico/assignees{/user}","branches_url":"https://api.github.com/repos/projectcalico/libcalico/branches{/branch}","tags_url":"https://api.github.com/repos/projectcalico/libcalico/tags","blobs_url":"https://api.github.com/repos/projectcalico/libcalico/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectcalico/libcalico/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectcalico/libcalico/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectcalico/libcalico/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectcalico/libcalico/statuses/{sha}","languages_url":"https://api.github.com/repos/projectcalico/libcalico/languages","stargazers_url":"https://api.github.com/repos/projectcalico/libcalico/stargazers","contributors_url":"https://api.github.com/repos/projectcalico/libcalico/contributors","subscribers_url":"https://api.github.com/repos/projectcalico/libcalico/subscribers","subscription_url":"https://api.github.com/repos/projectcalico/libcalico/subscription","commits_url":"https://api.github.com/repos/projectcalico/libcalico/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectcalico/libcalico/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectcalico/libcalico/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectcalico/libcalico/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectcalico/libcalico/contents/{+path}","compare_url":"https://api.github.com/repos/projectcalico/libcalico/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectcalico/libcalico/merges","archive_url":"https://api.github.com/repos/projectcalico/libcalico/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectcalico/libcalico/downloads","issues_url":"https://api.github.com/repos/projectcalico/libcalico/issues{/number}","pulls_url":"https://api.github.com/repos/projectcalico/libcalico/pulls{/number}","milestones_url":"https://api.github.com/repos/projectcalico/libcalico/milestones{/number}","notifications_url":"https://api.github.com/repos/projectcalico/libcalico/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectcalico/libcalico/labels{/name}","releases_url":"https://api.github.com/repos/projectcalico/libcalico/releases{/id}","deployments_url":"https://api.github.com/repos/projectcalico/libcalico/deployments","created_at":"2015-07-28T20:33:51Z","updated_at":"2016-03-13T11:13:52Z","pushed_at":"2016-03-22T17:36:12Z","git_url":"git://github.com/projectcalico/libcalico.git","ssh_url":"git@github.com:projectcalico/libcalico.git","clone_url":"https://github.com/projectcalico/libcalico.git","svn_url":"https://github.com/projectcalico/libcalico","homepage":"http://www.projectcalico.org/","size":2367,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":5,"forks":15,"open_issues":5,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projectcalico/libcalico/pulls/99"},"html":{"href":"https://github.com/projectcalico/libcalico/pull/99"},"issue":{"href":"https://api.github.com/repos/projectcalico/libcalico/issues/99"},"comments":{"href":"https://api.github.com/repos/projectcalico/libcalico/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/projectcalico/libcalico/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/projectcalico/libcalico/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectcalico/libcalico/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/projectcalico/libcalico/statuses/b590cc22e8f087984664e10fd401989bad70d9bd"}}}}