{"action":"created","comment":{"url":"https://api.github.com/repos/david415/tahoe-lafs/pulls/comments/60111504","id":60111504,"diff_hunk":"@@ -179,42 +203,86 @@ def _sequencer(self):\n         nonce = _make_secret().strip()\n         return seqnum, nonce\n \n-    def init_introducer_clients(self):\n-        self.introducer_furls = []\n+    def load_connections_from_yaml(self, furl):\n+        connections_filepath = FilePath(os.path.join(self.basedir, \"private\", \"connections.yaml\"))\n+        if connections_filepath.exists():\n+            exists = True\n+            with connections_filepath.open() as f:\n+                connections = yaml.load(f)\n+                f.close()\n+        else:\n+            exists = False\n+            connections = { 'introducers' : {},\n+                            'servers' : {},\n+                            'transport_plugins' : {\n+                                'tcp' : {\n+                                    'handler_module' : 'foolscap.connection_plugins',\n+                                    'handler_name': 'DefaultTCP',\n+                                    'parameters' : {}\n+                                },\n+                            },\n+                            }\n+            new_connections = connections.copy()\n+            new_connections['introducers'][u'default'] = {}\n+            new_connections['introducers']['default']['furl'] = furl\n+            connections_filepath.setContent(yaml.dump(new_connections))\n+        return connections, exists\n+\n+    def load_connections(self):\n+        \"\"\"\n+        Load the connections.yaml file if it exists, otherwise\n+        create a default configuration. Abort startup and report\n+        an error to the user if the tahoe.cfg contains an introducer\n+        FURL which is also found in the connections.yaml.\n+        \"\"\"\n+        # read introducer from tahoe.cfg and abort + error an introducer furl is specified\n+        # which is also found in our connections.yaml","path":"src/allmydata/client.py","position":91,"original_position":91,"commit_id":"4de58bf99f1506149f3520c94a13226c4606377c","original_commit_id":"4de58bf99f1506149f3520c94a13226c4606377c","user":{"login":"leif","id":22132,"avatar_url":"https://avatars.githubusercontent.com/u/22132?v=3","gravatar_id":"","url":"https://api.github.com/users/leif","html_url":"https://github.com/leif","followers_url":"https://api.github.com/users/leif/followers","following_url":"https://api.github.com/users/leif/following{/other_user}","gists_url":"https://api.github.com/users/leif/gists{/gist_id}","starred_url":"https://api.github.com/users/leif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leif/subscriptions","organizations_url":"https://api.github.com/users/leif/orgs","repos_url":"https://api.github.com/users/leif/repos","events_url":"https://api.github.com/users/leif/events{/privacy}","received_events_url":"https://api.github.com/users/leif/received_events","type":"User","site_admin":false},"body":"this comment is wrong, there should be an error if a furk is specified in `tahoe.cfg` and that furl is *not* in connections.yaml (if it exists)","created_at":"2016-04-18T18:39:03Z","updated_at":"2016-04-18T18:39:03Z","html_url":"https://github.com/david415/tahoe-lafs/pull/7#discussion_r60111504","pull_request_url":"https://api.github.com/repos/david415/tahoe-lafs/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/david415/tahoe-lafs/pulls/comments/60111504"},"html":{"href":"https://github.com/david415/tahoe-lafs/pull/7#discussion_r60111504"},"pull_request":{"href":"https://api.github.com/repos/david415/tahoe-lafs/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/david415/tahoe-lafs/pulls/7","id":65043508,"html_url":"https://github.com/david415/tahoe-lafs/pull/7","diff_url":"https://github.com/david415/tahoe-lafs/pull/7.diff","patch_url":"https://github.com/david415/tahoe-lafs/pull/7.patch","issue_url":"https://api.github.com/repos/david415/tahoe-lafs/issues/7","number":7,"state":"open","locked":false,"title":"Teach client to use connections.yaml for better networking features","user":{"login":"david415","id":50611,"avatar_url":"https://avatars.githubusercontent.com/u/50611?v=3","gravatar_id":"","url":"https://api.github.com/users/david415","html_url":"https://github.com/david415","followers_url":"https://api.github.com/users/david415/followers","following_url":"https://api.github.com/users/david415/following{/other_user}","gists_url":"https://api.github.com/users/david415/gists{/gist_id}","starred_url":"https://api.github.com/users/david415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david415/subscriptions","organizations_url":"https://api.github.com/users/david415/orgs","repos_url":"https://api.github.com/users/david415/repos","events_url":"https://api.github.com/users/david415/events{/privacy}","received_events_url":"https://api.github.com/users/david415/received_events","type":"User","site_admin":false},"body":"this includes:\r\n\r\n - local introducer announcement cache using a yaml file\r\n - modular client side transport plugin system\r\nthat can express network policies on a per-server\r\nor per-introducer basis\r\n - multi-introducer\r\n - introducer-less static server configuration\r\n - improved StorageFarmBroker creates one Tub per storage server","created_at":"2016-04-02T17:02:15Z","updated_at":"2016-04-18T18:39:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f02f63dc4b21d474889823c9efde39bc241df816","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/david415/tahoe-lafs/pulls/7/commits","review_comments_url":"https://api.github.com/repos/david415/tahoe-lafs/pulls/7/comments","review_comment_url":"https://api.github.com/repos/david415/tahoe-lafs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/david415/tahoe-lafs/issues/7/comments","statuses_url":"https://api.github.com/repos/david415/tahoe-lafs/statuses/4de58bf99f1506149f3520c94a13226c4606377c","head":{"label":"david415:introless-multiintro_yaml_config.2","ref":"introless-multiintro_yaml_config.2","sha":"4de58bf99f1506149f3520c94a13226c4606377c","user":{"login":"david415","id":50611,"avatar_url":"https://avatars.githubusercontent.com/u/50611?v=3","gravatar_id":"","url":"https://api.github.com/users/david415","html_url":"https://github.com/david415","followers_url":"https://api.github.com/users/david415/followers","following_url":"https://api.github.com/users/david415/following{/other_user}","gists_url":"https://api.github.com/users/david415/gists{/gist_id}","starred_url":"https://api.github.com/users/david415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david415/subscriptions","organizations_url":"https://api.github.com/users/david415/orgs","repos_url":"https://api.github.com/users/david415/repos","events_url":"https://api.github.com/users/david415/events{/privacy}","received_events_url":"https://api.github.com/users/david415/received_events","type":"User","site_admin":false},"repo":{"id":15762988,"name":"tahoe-lafs","full_name":"david415/tahoe-lafs","owner":{"login":"david415","id":50611,"avatar_url":"https://avatars.githubusercontent.com/u/50611?v=3","gravatar_id":"","url":"https://api.github.com/users/david415","html_url":"https://github.com/david415","followers_url":"https://api.github.com/users/david415/followers","following_url":"https://api.github.com/users/david415/following{/other_user}","gists_url":"https://api.github.com/users/david415/gists{/gist_id}","starred_url":"https://api.github.com/users/david415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david415/subscriptions","organizations_url":"https://api.github.com/users/david415/orgs","repos_url":"https://api.github.com/users/david415/repos","events_url":"https://api.github.com/users/david415/events{/privacy}","received_events_url":"https://api.github.com/users/david415/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/david415/tahoe-lafs","description":"The Tahoe-LAFS decentralized secure filesystem.","fork":true,"url":"https://api.github.com/repos/david415/tahoe-lafs","forks_url":"https://api.github.com/repos/david415/tahoe-lafs/forks","keys_url":"https://api.github.com/repos/david415/tahoe-lafs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/david415/tahoe-lafs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/david415/tahoe-lafs/teams","hooks_url":"https://api.github.com/repos/david415/tahoe-lafs/hooks","issue_events_url":"https://api.github.com/repos/david415/tahoe-lafs/issues/events{/number}","events_url":"https://api.github.com/repos/david415/tahoe-lafs/events","assignees_url":"https://api.github.com/repos/david415/tahoe-lafs/assignees{/user}","branches_url":"https://api.github.com/repos/david415/tahoe-lafs/branches{/branch}","tags_url":"https://api.github.com/repos/david415/tahoe-lafs/tags","blobs_url":"https://api.github.com/repos/david415/tahoe-lafs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/david415/tahoe-lafs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/david415/tahoe-lafs/git/refs{/sha}","trees_url":"https://api.github.com/repos/david415/tahoe-lafs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/david415/tahoe-lafs/statuses/{sha}","languages_url":"https://api.github.com/repos/david415/tahoe-lafs/languages","stargazers_url":"https://api.github.com/repos/david415/tahoe-lafs/stargazers","contributors_url":"https://api.github.com/repos/david415/tahoe-lafs/contributors","subscribers_url":"https://api.github.com/repos/david415/tahoe-lafs/subscribers","subscription_url":"https://api.github.com/repos/david415/tahoe-lafs/subscription","commits_url":"https://api.github.com/repos/david415/tahoe-lafs/commits{/sha}","git_commits_url":"https://api.github.com/repos/david415/tahoe-lafs/git/commits{/sha}","comments_url":"https://api.github.com/repos/david415/tahoe-lafs/comments{/number}","issue_comment_url":"https://api.github.com/repos/david415/tahoe-lafs/issues/comments{/number}","contents_url":"https://api.github.com/repos/david415/tahoe-lafs/contents/{+path}","compare_url":"https://api.github.com/repos/david415/tahoe-lafs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/david415/tahoe-lafs/merges","archive_url":"https://api.github.com/repos/david415/tahoe-lafs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/david415/tahoe-lafs/downloads","issues_url":"https://api.github.com/repos/david415/tahoe-lafs/issues{/number}","pulls_url":"https://api.github.com/repos/david415/tahoe-lafs/pulls{/number}","milestones_url":"https://api.github.com/repos/david415/tahoe-lafs/milestones{/number}","notifications_url":"https://api.github.com/repos/david415/tahoe-lafs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/david415/tahoe-lafs/labels{/name}","releases_url":"https://api.github.com/repos/david415/tahoe-lafs/releases{/id}","deployments_url":"https://api.github.com/repos/david415/tahoe-lafs/deployments","created_at":"2014-01-09T09:57:23Z","updated_at":"2015-04-17T16:27:09Z","pushed_at":"2016-04-16T16:06:58Z","git_url":"git://github.com/david415/tahoe-lafs.git","ssh_url":"git@github.com:david415/tahoe-lafs.git","clone_url":"https://github.com/david415/tahoe-lafs.git","svn_url":"https://github.com/david415/tahoe-lafs","homepage":"https://tahoe-lafs.org/","size":65385,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"517.add-client-plugin-config.0"}},"base":{"label":"david415:introless-multiintro","ref":"introless-multiintro","sha":"1dba2ada3a64252a78eee0d9fe900c0f65f90e68","user":{"login":"david415","id":50611,"avatar_url":"https://avatars.githubusercontent.com/u/50611?v=3","gravatar_id":"","url":"https://api.github.com/users/david415","html_url":"https://github.com/david415","followers_url":"https://api.github.com/users/david415/followers","following_url":"https://api.github.com/users/david415/following{/other_user}","gists_url":"https://api.github.com/users/david415/gists{/gist_id}","starred_url":"https://api.github.com/users/david415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david415/subscriptions","organizations_url":"https://api.github.com/users/david415/orgs","repos_url":"https://api.github.com/users/david415/repos","events_url":"https://api.github.com/users/david415/events{/privacy}","received_events_url":"https://api.github.com/users/david415/received_events","type":"User","site_admin":false},"repo":{"id":15762988,"name":"tahoe-lafs","full_name":"david415/tahoe-lafs","owner":{"login":"david415","id":50611,"avatar_url":"https://avatars.githubusercontent.com/u/50611?v=3","gravatar_id":"","url":"https://api.github.com/users/david415","html_url":"https://github.com/david415","followers_url":"https://api.github.com/users/david415/followers","following_url":"https://api.github.com/users/david415/following{/other_user}","gists_url":"https://api.github.com/users/david415/gists{/gist_id}","starred_url":"https://api.github.com/users/david415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david415/subscriptions","organizations_url":"https://api.github.com/users/david415/orgs","repos_url":"https://api.github.com/users/david415/repos","events_url":"https://api.github.com/users/david415/events{/privacy}","received_events_url":"https://api.github.com/users/david415/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/david415/tahoe-lafs","description":"The Tahoe-LAFS decentralized secure filesystem.","fork":true,"url":"https://api.github.com/repos/david415/tahoe-lafs","forks_url":"https://api.github.com/repos/david415/tahoe-lafs/forks","keys_url":"https://api.github.com/repos/david415/tahoe-lafs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/david415/tahoe-lafs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/david415/tahoe-lafs/teams","hooks_url":"https://api.github.com/repos/david415/tahoe-lafs/hooks","issue_events_url":"https://api.github.com/repos/david415/tahoe-lafs/issues/events{/number}","events_url":"https://api.github.com/repos/david415/tahoe-lafs/events","assignees_url":"https://api.github.com/repos/david415/tahoe-lafs/assignees{/user}","branches_url":"https://api.github.com/repos/david415/tahoe-lafs/branches{/branch}","tags_url":"https://api.github.com/repos/david415/tahoe-lafs/tags","blobs_url":"https://api.github.com/repos/david415/tahoe-lafs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/david415/tahoe-lafs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/david415/tahoe-lafs/git/refs{/sha}","trees_url":"https://api.github.com/repos/david415/tahoe-lafs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/david415/tahoe-lafs/statuses/{sha}","languages_url":"https://api.github.com/repos/david415/tahoe-lafs/languages","stargazers_url":"https://api.github.com/repos/david415/tahoe-lafs/stargazers","contributors_url":"https://api.github.com/repos/david415/tahoe-lafs/contributors","subscribers_url":"https://api.github.com/repos/david415/tahoe-lafs/subscribers","subscription_url":"https://api.github.com/repos/david415/tahoe-lafs/subscription","commits_url":"https://api.github.com/repos/david415/tahoe-lafs/commits{/sha}","git_commits_url":"https://api.github.com/repos/david415/tahoe-lafs/git/commits{/sha}","comments_url":"https://api.github.com/repos/david415/tahoe-lafs/comments{/number}","issue_comment_url":"https://api.github.com/repos/david415/tahoe-lafs/issues/comments{/number}","contents_url":"https://api.github.com/repos/david415/tahoe-lafs/contents/{+path}","compare_url":"https://api.github.com/repos/david415/tahoe-lafs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/david415/tahoe-lafs/merges","archive_url":"https://api.github.com/repos/david415/tahoe-lafs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/david415/tahoe-lafs/downloads","issues_url":"https://api.github.com/repos/david415/tahoe-lafs/issues{/number}","pulls_url":"https://api.github.com/repos/david415/tahoe-lafs/pulls{/number}","milestones_url":"https://api.github.com/repos/david415/tahoe-lafs/milestones{/number}","notifications_url":"https://api.github.com/repos/david415/tahoe-lafs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/david415/tahoe-lafs/labels{/name}","releases_url":"https://api.github.com/repos/david415/tahoe-lafs/releases{/id}","deployments_url":"https://api.github.com/repos/david415/tahoe-lafs/deployments","created_at":"2014-01-09T09:57:23Z","updated_at":"2015-04-17T16:27:09Z","pushed_at":"2016-04-16T16:06:58Z","git_url":"git://github.com/david415/tahoe-lafs.git","ssh_url":"git@github.com:david415/tahoe-lafs.git","clone_url":"https://github.com/david415/tahoe-lafs.git","svn_url":"https://github.com/david415/tahoe-lafs","homepage":"https://tahoe-lafs.org/","size":65385,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":3,"default_branch":"517.add-client-plugin-config.0"}},"_links":{"self":{"href":"https://api.github.com/repos/david415/tahoe-lafs/pulls/7"},"html":{"href":"https://github.com/david415/tahoe-lafs/pull/7"},"issue":{"href":"https://api.github.com/repos/david415/tahoe-lafs/issues/7"},"comments":{"href":"https://api.github.com/repos/david415/tahoe-lafs/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/david415/tahoe-lafs/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/david415/tahoe-lafs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/david415/tahoe-lafs/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/david415/tahoe-lafs/statuses/4de58bf99f1506149f3520c94a13226c4606377c"}}}}