{"action":"created","comment":{"url":"https://api.github.com/repos/HPENetworking/topology/pulls/comments/82666895","pull_request_review_id":3557815,"id":82666895,"diff_hunk":"@@ -585,29 +599,54 @@ def connect(self, connection=None):\n         )\n \n         self._connections[connection] = spawn\n+        index = None\n \n         try:\n+            # Setup shell before using it\n+            self._pre_setup_shell(connection)\n+\n             # If connection is via user\n             if self._user is not None:\n-                spawn.expect(\n-                    [self._user_match], timeout=self._timeout\n+                index = spawn.expect(","path":"lib/topology/platforms/shell.py","position":98,"original_position":98,"commit_id":"5bc0b5a9eda7b236236a8b19d28a28e4071440a6","original_commit_id":"5bc0b5a9eda7b236236a8b19d28a28e4071440a6","user":{"login":"ocelotl","id":5069942,"avatar_url":"https://avatars.githubusercontent.com/u/5069942?v=3","gravatar_id":"","url":"https://api.github.com/users/ocelotl","html_url":"https://github.com/ocelotl","followers_url":"https://api.github.com/users/ocelotl/followers","following_url":"https://api.github.com/users/ocelotl/following{/other_user}","gists_url":"https://api.github.com/users/ocelotl/gists{/gist_id}","starred_url":"https://api.github.com/users/ocelotl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocelotl/subscriptions","organizations_url":"https://api.github.com/users/ocelotl/orgs","repos_url":"https://api.github.com/users/ocelotl/repos","events_url":"https://api.github.com/users/ocelotl/events{/privacy}","received_events_url":"https://api.github.com/users/ocelotl/received_events","type":"User","site_admin":false},"body":"This looks like functionality that could be useful, can you please provide more details regarding the connection process you want Topology to follow?","created_at":"2016-10-10T19:21:45Z","updated_at":"2016-10-10T19:24:24Z","html_url":"https://github.com/HPENetworking/topology/pull/36#discussion_r82666895","pull_request_url":"https://api.github.com/repos/HPENetworking/topology/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/HPENetworking/topology/pulls/comments/82666895"},"html":{"href":"https://github.com/HPENetworking/topology/pull/36#discussion_r82666895"},"pull_request":{"href":"https://api.github.com/repos/HPENetworking/topology/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/HPENetworking/topology/pulls/36","id":87525890,"html_url":"https://github.com/HPENetworking/topology/pull/36","diff_url":"https://github.com/HPENetworking/topology/pull/36.diff","patch_url":"https://github.com/HPENetworking/topology/pull/36.patch","issue_url":"https://api.github.com/repos/HPENetworking/topology/issues/36","number":36,"state":"open","locked":false,"title":"Changes required for new topology connect for work with real devices.","user":{"login":"Chornei","id":18458251,"avatar_url":"https://avatars.githubusercontent.com/u/18458251?v=3","gravatar_id":"","url":"https://api.github.com/users/Chornei","html_url":"https://github.com/Chornei","followers_url":"https://api.github.com/users/Chornei/followers","following_url":"https://api.github.com/users/Chornei/following{/other_user}","gists_url":"https://api.github.com/users/Chornei/gists{/gist_id}","starred_url":"https://api.github.com/users/Chornei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chornei/subscriptions","organizations_url":"https://api.github.com/users/Chornei/orgs","repos_url":"https://api.github.com/users/Chornei/repos","events_url":"https://api.github.com/users/Chornei/events{/privacy}","received_events_url":"https://api.github.com/users/Chornei/received_events","type":"User","site_admin":false},"body":"1. Renamed _setup_shell to _pre_setup_shell and introduced _post_setup_shell.\r\n   New one is called before authentication in PExpectShell::connect().\r\n2. Improved PExpectShell::connect() to match not only user shell at the beginning but initial prompt and password as well. Because login username can be specified via connect command(\"user@server\") and then we will need to match password prompt or initial prompt(if password is not required).\r\n3. Improved injection file reading to don't overwrite attribute value, if its value is dictionary but add with new dictionary value.\r\n4. Improved PExpectShell::get_response(). If spawn.before.decode fails then return 'original' text. This may happens, means symbols decode can fails, while DUT is booting and printing a lot of booting log.\r\n5. Changed initial bash prompt in PExpectBashShell::__init() to '\\w+@.+[#$] ' as previous don't work for some linux bash promts.","created_at":"2016-09-30T16:33:17Z","updated_at":"2016-10-10T19:24:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cdc8d2044e595a162f3d4992c4c6f5c87124c7fe","assignee":{"login":"carlos-jenkins","id":1628587,"avatar_url":"https://avatars.githubusercontent.com/u/1628587?v=3","gravatar_id":"","url":"https://api.github.com/users/carlos-jenkins","html_url":"https://github.com/carlos-jenkins","followers_url":"https://api.github.com/users/carlos-jenkins/followers","following_url":"https://api.github.com/users/carlos-jenkins/following{/other_user}","gists_url":"https://api.github.com/users/carlos-jenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/carlos-jenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlos-jenkins/subscriptions","organizations_url":"https://api.github.com/users/carlos-jenkins/orgs","repos_url":"https://api.github.com/users/carlos-jenkins/repos","events_url":"https://api.github.com/users/carlos-jenkins/events{/privacy}","received_events_url":"https://api.github.com/users/carlos-jenkins/received_events","type":"User","site_admin":false},"assignees":[{"login":"carlos-jenkins","id":1628587,"avatar_url":"https://avatars.githubusercontent.com/u/1628587?v=3","gravatar_id":"","url":"https://api.github.com/users/carlos-jenkins","html_url":"https://github.com/carlos-jenkins","followers_url":"https://api.github.com/users/carlos-jenkins/followers","following_url":"https://api.github.com/users/carlos-jenkins/following{/other_user}","gists_url":"https://api.github.com/users/carlos-jenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/carlos-jenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlos-jenkins/subscriptions","organizations_url":"https://api.github.com/users/carlos-jenkins/orgs","repos_url":"https://api.github.com/users/carlos-jenkins/repos","events_url":"https://api.github.com/users/carlos-jenkins/events{/privacy}","received_events_url":"https://api.github.com/users/carlos-jenkins/received_events","type":"User","site_admin":false},{"login":"ocelotl","id":5069942,"avatar_url":"https://avatars.githubusercontent.com/u/5069942?v=3","gravatar_id":"","url":"https://api.github.com/users/ocelotl","html_url":"https://github.com/ocelotl","followers_url":"https://api.github.com/users/ocelotl/followers","following_url":"https://api.github.com/users/ocelotl/following{/other_user}","gists_url":"https://api.github.com/users/ocelotl/gists{/gist_id}","starred_url":"https://api.github.com/users/ocelotl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocelotl/subscriptions","organizations_url":"https://api.github.com/users/ocelotl/orgs","repos_url":"https://api.github.com/users/ocelotl/repos","events_url":"https://api.github.com/users/ocelotl/events{/privacy}","received_events_url":"https://api.github.com/users/ocelotl/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/HPENetworking/topology/pulls/36/commits","review_comments_url":"https://api.github.com/repos/HPENetworking/topology/pulls/36/comments","review_comment_url":"https://api.github.com/repos/HPENetworking/topology/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HPENetworking/topology/issues/36/comments","statuses_url":"https://api.github.com/repos/HPENetworking/topology/statuses/5bc0b5a9eda7b236236a8b19d28a28e4071440a6","head":{"label":"Chornei:master","ref":"master","sha":"5bc0b5a9eda7b236236a8b19d28a28e4071440a6","user":{"login":"Chornei","id":18458251,"avatar_url":"https://avatars.githubusercontent.com/u/18458251?v=3","gravatar_id":"","url":"https://api.github.com/users/Chornei","html_url":"https://github.com/Chornei","followers_url":"https://api.github.com/users/Chornei/followers","following_url":"https://api.github.com/users/Chornei/following{/other_user}","gists_url":"https://api.github.com/users/Chornei/gists{/gist_id}","starred_url":"https://api.github.com/users/Chornei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chornei/subscriptions","organizations_url":"https://api.github.com/users/Chornei/orgs","repos_url":"https://api.github.com/users/Chornei/repos","events_url":"https://api.github.com/users/Chornei/events{/privacy}","received_events_url":"https://api.github.com/users/Chornei/received_events","type":"User","site_admin":false},"repo":{"id":69678844,"name":"topology","full_name":"Chornei/topology","owner":{"login":"Chornei","id":18458251,"avatar_url":"https://avatars.githubusercontent.com/u/18458251?v=3","gravatar_id":"","url":"https://api.github.com/users/Chornei","html_url":"https://github.com/Chornei","followers_url":"https://api.github.com/users/Chornei/followers","following_url":"https://api.github.com/users/Chornei/following{/other_user}","gists_url":"https://api.github.com/users/Chornei/gists{/gist_id}","starred_url":"https://api.github.com/users/Chornei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chornei/subscriptions","organizations_url":"https://api.github.com/users/Chornei/orgs","repos_url":"https://api.github.com/users/Chornei/repos","events_url":"https://api.github.com/users/Chornei/events{/privacy}","received_events_url":"https://api.github.com/users/Chornei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Chornei/topology","description":"Framework for building and testing network topologies, with support for pytest.","fork":true,"url":"https://api.github.com/repos/Chornei/topology","forks_url":"https://api.github.com/repos/Chornei/topology/forks","keys_url":"https://api.github.com/repos/Chornei/topology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Chornei/topology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Chornei/topology/teams","hooks_url":"https://api.github.com/repos/Chornei/topology/hooks","issue_events_url":"https://api.github.com/repos/Chornei/topology/issues/events{/number}","events_url":"https://api.github.com/repos/Chornei/topology/events","assignees_url":"https://api.github.com/repos/Chornei/topology/assignees{/user}","branches_url":"https://api.github.com/repos/Chornei/topology/branches{/branch}","tags_url":"https://api.github.com/repos/Chornei/topology/tags","blobs_url":"https://api.github.com/repos/Chornei/topology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Chornei/topology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Chornei/topology/git/refs{/sha}","trees_url":"https://api.github.com/repos/Chornei/topology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Chornei/topology/statuses/{sha}","languages_url":"https://api.github.com/repos/Chornei/topology/languages","stargazers_url":"https://api.github.com/repos/Chornei/topology/stargazers","contributors_url":"https://api.github.com/repos/Chornei/topology/contributors","subscribers_url":"https://api.github.com/repos/Chornei/topology/subscribers","subscription_url":"https://api.github.com/repos/Chornei/topology/subscription","commits_url":"https://api.github.com/repos/Chornei/topology/commits{/sha}","git_commits_url":"https://api.github.com/repos/Chornei/topology/git/commits{/sha}","comments_url":"https://api.github.com/repos/Chornei/topology/comments{/number}","issue_comment_url":"https://api.github.com/repos/Chornei/topology/issues/comments{/number}","contents_url":"https://api.github.com/repos/Chornei/topology/contents/{+path}","compare_url":"https://api.github.com/repos/Chornei/topology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Chornei/topology/merges","archive_url":"https://api.github.com/repos/Chornei/topology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Chornei/topology/downloads","issues_url":"https://api.github.com/repos/Chornei/topology/issues{/number}","pulls_url":"https://api.github.com/repos/Chornei/topology/pulls{/number}","milestones_url":"https://api.github.com/repos/Chornei/topology/milestones{/number}","notifications_url":"https://api.github.com/repos/Chornei/topology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Chornei/topology/labels{/name}","releases_url":"https://api.github.com/repos/Chornei/topology/releases{/id}","deployments_url":"https://api.github.com/repos/Chornei/topology/deployments","created_at":"2016-09-30T15:33:02Z","updated_at":"2016-09-30T15:33:03Z","pushed_at":"2016-10-06T18:28:12Z","git_url":"git://github.com/Chornei/topology.git","ssh_url":"git@github.com:Chornei/topology.git","clone_url":"https://github.com/Chornei/topology.git","svn_url":"https://github.com/Chornei/topology","homepage":"http://topology.rtfd.io/","size":3893,"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":"HPENetworking:master","ref":"master","sha":"4e7cd424dc925c388dba5ef2610e32f577312bb4","user":{"login":"HPENetworking","id":11503648,"avatar_url":"https://avatars.githubusercontent.com/u/11503648?v=3","gravatar_id":"","url":"https://api.github.com/users/HPENetworking","html_url":"https://github.com/HPENetworking","followers_url":"https://api.github.com/users/HPENetworking/followers","following_url":"https://api.github.com/users/HPENetworking/following{/other_user}","gists_url":"https://api.github.com/users/HPENetworking/gists{/gist_id}","starred_url":"https://api.github.com/users/HPENetworking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HPENetworking/subscriptions","organizations_url":"https://api.github.com/users/HPENetworking/orgs","repos_url":"https://api.github.com/users/HPENetworking/repos","events_url":"https://api.github.com/users/HPENetworking/events{/privacy}","received_events_url":"https://api.github.com/users/HPENetworking/received_events","type":"Organization","site_admin":false},"repo":{"id":49096595,"name":"topology","full_name":"HPENetworking/topology","owner":{"login":"HPENetworking","id":11503648,"avatar_url":"https://avatars.githubusercontent.com/u/11503648?v=3","gravatar_id":"","url":"https://api.github.com/users/HPENetworking","html_url":"https://github.com/HPENetworking","followers_url":"https://api.github.com/users/HPENetworking/followers","following_url":"https://api.github.com/users/HPENetworking/following{/other_user}","gists_url":"https://api.github.com/users/HPENetworking/gists{/gist_id}","starred_url":"https://api.github.com/users/HPENetworking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HPENetworking/subscriptions","organizations_url":"https://api.github.com/users/HPENetworking/orgs","repos_url":"https://api.github.com/users/HPENetworking/repos","events_url":"https://api.github.com/users/HPENetworking/events{/privacy}","received_events_url":"https://api.github.com/users/HPENetworking/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HPENetworking/topology","description":"Framework for building and testing network topologies, with support for pytest.","fork":false,"url":"https://api.github.com/repos/HPENetworking/topology","forks_url":"https://api.github.com/repos/HPENetworking/topology/forks","keys_url":"https://api.github.com/repos/HPENetworking/topology/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HPENetworking/topology/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HPENetworking/topology/teams","hooks_url":"https://api.github.com/repos/HPENetworking/topology/hooks","issue_events_url":"https://api.github.com/repos/HPENetworking/topology/issues/events{/number}","events_url":"https://api.github.com/repos/HPENetworking/topology/events","assignees_url":"https://api.github.com/repos/HPENetworking/topology/assignees{/user}","branches_url":"https://api.github.com/repos/HPENetworking/topology/branches{/branch}","tags_url":"https://api.github.com/repos/HPENetworking/topology/tags","blobs_url":"https://api.github.com/repos/HPENetworking/topology/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HPENetworking/topology/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HPENetworking/topology/git/refs{/sha}","trees_url":"https://api.github.com/repos/HPENetworking/topology/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HPENetworking/topology/statuses/{sha}","languages_url":"https://api.github.com/repos/HPENetworking/topology/languages","stargazers_url":"https://api.github.com/repos/HPENetworking/topology/stargazers","contributors_url":"https://api.github.com/repos/HPENetworking/topology/contributors","subscribers_url":"https://api.github.com/repos/HPENetworking/topology/subscribers","subscription_url":"https://api.github.com/repos/HPENetworking/topology/subscription","commits_url":"https://api.github.com/repos/HPENetworking/topology/commits{/sha}","git_commits_url":"https://api.github.com/repos/HPENetworking/topology/git/commits{/sha}","comments_url":"https://api.github.com/repos/HPENetworking/topology/comments{/number}","issue_comment_url":"https://api.github.com/repos/HPENetworking/topology/issues/comments{/number}","contents_url":"https://api.github.com/repos/HPENetworking/topology/contents/{+path}","compare_url":"https://api.github.com/repos/HPENetworking/topology/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HPENetworking/topology/merges","archive_url":"https://api.github.com/repos/HPENetworking/topology/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HPENetworking/topology/downloads","issues_url":"https://api.github.com/repos/HPENetworking/topology/issues{/number}","pulls_url":"https://api.github.com/repos/HPENetworking/topology/pulls{/number}","milestones_url":"https://api.github.com/repos/HPENetworking/topology/milestones{/number}","notifications_url":"https://api.github.com/repos/HPENetworking/topology/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HPENetworking/topology/labels{/name}","releases_url":"https://api.github.com/repos/HPENetworking/topology/releases{/id}","deployments_url":"https://api.github.com/repos/HPENetworking/topology/deployments","created_at":"2016-01-05T22:27:13Z","updated_at":"2016-08-31T04:58:04Z","pushed_at":"2016-10-06T21:39:17Z","git_url":"git://github.com/HPENetworking/topology.git","ssh_url":"git@github.com:HPENetworking/topology.git","clone_url":"https://github.com/HPENetworking/topology.git","svn_url":"https://github.com/HPENetworking/topology","homepage":"http://topology.rtfd.io/","size":3887,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":4,"forks":8,"open_issues":4,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HPENetworking/topology/pulls/36"},"html":{"href":"https://github.com/HPENetworking/topology/pull/36"},"issue":{"href":"https://api.github.com/repos/HPENetworking/topology/issues/36"},"comments":{"href":"https://api.github.com/repos/HPENetworking/topology/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/HPENetworking/topology/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/HPENetworking/topology/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HPENetworking/topology/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/HPENetworking/topology/statuses/5bc0b5a9eda7b236236a8b19d28a28e4071440a6"}}}}
{"actor":{"display_login":"ocelotl"}}