{"action":"created","comment":{"url":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/comments/217988694","pull_request_review_id":155826929,"id":217988694,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNzk4ODY5NA==","diff_hunk":"@@ -3577,3 +3578,26 @@ def get_disk_alias(vm, source_file=None):\n                 logging.info(\"Ignore error of source attr getting for file: %s\" % e)\n                 pass\n     return None\n+\n+\n+def check_cmd_expected(check_cmd, matched, is_expected):\n+    \"\"\"\n+    check the cmd result that process run\n+\n+    Params check_cmd: the command need to run\n+    Params matched: need to match or not match result\n+    Params is_expected:\n+    \"\"\"\n+    out = decode_to_text(process.system_output(check_cmd,\n+                                               ignore_status=False,\n+                                               shell=True))\n+\n+    if matched and not re.search(matched, out):","path":"virttest/utils_test/libvirt.py","position":38,"original_position":38,"commit_id":"05bd290a790b24da40efea67cec2015f4275e490","original_commit_id":"05bd290a790b24da40efea67cec2015f4275e490","user":{"login":"kylazhang","id":3423686,"node_id":"MDQ6VXNlcjM0MjM2ODY=","avatar_url":"https://avatars2.githubusercontent.com/u/3423686?v=4","gravatar_id":"","url":"https://api.github.com/users/kylazhang","html_url":"https://github.com/kylazhang","followers_url":"https://api.github.com/users/kylazhang/followers","following_url":"https://api.github.com/users/kylazhang/following{/other_user}","gists_url":"https://api.github.com/users/kylazhang/gists{/gist_id}","starred_url":"https://api.github.com/users/kylazhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylazhang/subscriptions","organizations_url":"https://api.github.com/users/kylazhang/orgs","repos_url":"https://api.github.com/users/kylazhang/repos","events_url":"https://api.github.com/users/kylazhang/events{/privacy}","received_events_url":"https://api.github.com/users/kylazhang/received_events","type":"User","site_admin":false},"body":"better logic is:\r\n```\r\nif is_expected:\r\n    if not re.search():\r\n        raise xxx\r\n    else:\r\n         logging.info()\r\nelse:\r\n    if re.search():\r\n        raise xxx\r\n    else:\r\n        logging.info()\r\n```\r\n","created_at":"2018-09-17T08:49:23Z","updated_at":"2018-09-17T08:49:23Z","html_url":"https://github.com/avocado-framework/avocado-vt/pull/1720#discussion_r217988694","pull_request_url":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/1720","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/comments/217988694"},"html":{"href":"https://github.com/avocado-framework/avocado-vt/pull/1720#discussion_r217988694"},"pull_request":{"href":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/1720"}},"in_reply_to_id":217987398},"pull_request":{"url":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/1720","id":210000166,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMDAwMTY2","html_url":"https://github.com/avocado-framework/avocado-vt/pull/1720","diff_url":"https://github.com/avocado-framework/avocado-vt/pull/1720.diff","patch_url":"https://github.com/avocado-framework/avocado-vt/pull/1720.patch","issue_url":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/1720","number":1720,"state":"open","locked":false,"title":"Add func to check the expect words","user":{"login":"juteman","id":13850064,"node_id":"MDQ6VXNlcjEzODUwMDY0","avatar_url":"https://avatars0.githubusercontent.com/u/13850064?v=4","gravatar_id":"","url":"https://api.github.com/users/juteman","html_url":"https://github.com/juteman","followers_url":"https://api.github.com/users/juteman/followers","following_url":"https://api.github.com/users/juteman/following{/other_user}","gists_url":"https://api.github.com/users/juteman/gists{/gist_id}","starred_url":"https://api.github.com/users/juteman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juteman/subscriptions","organizations_url":"https://api.github.com/users/juteman/orgs","repos_url":"https://api.github.com/users/juteman/repos","events_url":"https://api.github.com/users/juteman/events{/privacy}","received_events_url":"https://api.github.com/users/juteman/received_events","type":"User","site_admin":false},"body":"the func can check the expect match or\r\nexpect not match\r\n\r\nSigned-off-by: qiulzhan <qiulzhan@redhat.com>","created_at":"2018-08-22T01:48:52Z","updated_at":"2018-09-17T08:49:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6ba9a941bb9be0d1dcd0a45f963c32aec02e84b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/1720/commits","review_comments_url":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/1720/comments","review_comment_url":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/1720/comments","statuses_url":"https://api.github.com/repos/avocado-framework/avocado-vt/statuses/05bd290a790b24da40efea67cec2015f4275e490","head":{"label":"juteman:match","ref":"match","sha":"05bd290a790b24da40efea67cec2015f4275e490","user":{"login":"juteman","id":13850064,"node_id":"MDQ6VXNlcjEzODUwMDY0","avatar_url":"https://avatars0.githubusercontent.com/u/13850064?v=4","gravatar_id":"","url":"https://api.github.com/users/juteman","html_url":"https://github.com/juteman","followers_url":"https://api.github.com/users/juteman/followers","following_url":"https://api.github.com/users/juteman/following{/other_user}","gists_url":"https://api.github.com/users/juteman/gists{/gist_id}","starred_url":"https://api.github.com/users/juteman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juteman/subscriptions","organizations_url":"https://api.github.com/users/juteman/orgs","repos_url":"https://api.github.com/users/juteman/repos","events_url":"https://api.github.com/users/juteman/events{/privacy}","received_events_url":"https://api.github.com/users/juteman/received_events","type":"User","site_admin":false},"repo":{"id":140811213,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA4MTEyMTM=","name":"avocado-vt","full_name":"juteman/avocado-vt","private":false,"owner":{"login":"juteman","id":13850064,"node_id":"MDQ6VXNlcjEzODUwMDY0","avatar_url":"https://avatars0.githubusercontent.com/u/13850064?v=4","gravatar_id":"","url":"https://api.github.com/users/juteman","html_url":"https://github.com/juteman","followers_url":"https://api.github.com/users/juteman/followers","following_url":"https://api.github.com/users/juteman/following{/other_user}","gists_url":"https://api.github.com/users/juteman/gists{/gist_id}","starred_url":"https://api.github.com/users/juteman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juteman/subscriptions","organizations_url":"https://api.github.com/users/juteman/orgs","repos_url":"https://api.github.com/users/juteman/repos","events_url":"https://api.github.com/users/juteman/events{/privacy}","received_events_url":"https://api.github.com/users/juteman/received_events","type":"User","site_admin":false},"html_url":"https://github.com/juteman/avocado-vt","description":"Avocado VT Plugin","fork":true,"url":"https://api.github.com/repos/juteman/avocado-vt","forks_url":"https://api.github.com/repos/juteman/avocado-vt/forks","keys_url":"https://api.github.com/repos/juteman/avocado-vt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juteman/avocado-vt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juteman/avocado-vt/teams","hooks_url":"https://api.github.com/repos/juteman/avocado-vt/hooks","issue_events_url":"https://api.github.com/repos/juteman/avocado-vt/issues/events{/number}","events_url":"https://api.github.com/repos/juteman/avocado-vt/events","assignees_url":"https://api.github.com/repos/juteman/avocado-vt/assignees{/user}","branches_url":"https://api.github.com/repos/juteman/avocado-vt/branches{/branch}","tags_url":"https://api.github.com/repos/juteman/avocado-vt/tags","blobs_url":"https://api.github.com/repos/juteman/avocado-vt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juteman/avocado-vt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juteman/avocado-vt/git/refs{/sha}","trees_url":"https://api.github.com/repos/juteman/avocado-vt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juteman/avocado-vt/statuses/{sha}","languages_url":"https://api.github.com/repos/juteman/avocado-vt/languages","stargazers_url":"https://api.github.com/repos/juteman/avocado-vt/stargazers","contributors_url":"https://api.github.com/repos/juteman/avocado-vt/contributors","subscribers_url":"https://api.github.com/repos/juteman/avocado-vt/subscribers","subscription_url":"https://api.github.com/repos/juteman/avocado-vt/subscription","commits_url":"https://api.github.com/repos/juteman/avocado-vt/commits{/sha}","git_commits_url":"https://api.github.com/repos/juteman/avocado-vt/git/commits{/sha}","comments_url":"https://api.github.com/repos/juteman/avocado-vt/comments{/number}","issue_comment_url":"https://api.github.com/repos/juteman/avocado-vt/issues/comments{/number}","contents_url":"https://api.github.com/repos/juteman/avocado-vt/contents/{+path}","compare_url":"https://api.github.com/repos/juteman/avocado-vt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juteman/avocado-vt/merges","archive_url":"https://api.github.com/repos/juteman/avocado-vt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juteman/avocado-vt/downloads","issues_url":"https://api.github.com/repos/juteman/avocado-vt/issues{/number}","pulls_url":"https://api.github.com/repos/juteman/avocado-vt/pulls{/number}","milestones_url":"https://api.github.com/repos/juteman/avocado-vt/milestones{/number}","notifications_url":"https://api.github.com/repos/juteman/avocado-vt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juteman/avocado-vt/labels{/name}","releases_url":"https://api.github.com/repos/juteman/avocado-vt/releases{/id}","deployments_url":"https://api.github.com/repos/juteman/avocado-vt/deployments","created_at":"2018-07-13T07:13:01Z","updated_at":"2018-08-30T02:39:59Z","pushed_at":"2018-09-17T07:57:25Z","git_url":"git://github.com/juteman/avocado-vt.git","ssh_url":"git@github.com:juteman/avocado-vt.git","clone_url":"https://github.com/juteman/avocado-vt.git","svn_url":"https://github.com/juteman/avocado-vt","homepage":"http://avocado-vt.readthedocs.org/","size":28491,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"avocado-framework:master","ref":"master","sha":"4a2a430d8616a091c8d4bad5e466150b61221e3d","user":{"login":"avocado-framework","id":7245719,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyNDU3MTk=","avatar_url":"https://avatars3.githubusercontent.com/u/7245719?v=4","gravatar_id":"","url":"https://api.github.com/users/avocado-framework","html_url":"https://github.com/avocado-framework","followers_url":"https://api.github.com/users/avocado-framework/followers","following_url":"https://api.github.com/users/avocado-framework/following{/other_user}","gists_url":"https://api.github.com/users/avocado-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/avocado-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avocado-framework/subscriptions","organizations_url":"https://api.github.com/users/avocado-framework/orgs","repos_url":"https://api.github.com/users/avocado-framework/repos","events_url":"https://api.github.com/users/avocado-framework/events{/privacy}","received_events_url":"https://api.github.com/users/avocado-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":36371959,"node_id":"MDEwOlJlcG9zaXRvcnkzNjM3MTk1OQ==","name":"avocado-vt","full_name":"avocado-framework/avocado-vt","private":false,"owner":{"login":"avocado-framework","id":7245719,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyNDU3MTk=","avatar_url":"https://avatars3.githubusercontent.com/u/7245719?v=4","gravatar_id":"","url":"https://api.github.com/users/avocado-framework","html_url":"https://github.com/avocado-framework","followers_url":"https://api.github.com/users/avocado-framework/followers","following_url":"https://api.github.com/users/avocado-framework/following{/other_user}","gists_url":"https://api.github.com/users/avocado-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/avocado-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avocado-framework/subscriptions","organizations_url":"https://api.github.com/users/avocado-framework/orgs","repos_url":"https://api.github.com/users/avocado-framework/repos","events_url":"https://api.github.com/users/avocado-framework/events{/privacy}","received_events_url":"https://api.github.com/users/avocado-framework/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/avocado-framework/avocado-vt","description":"Avocado VT Plugin","fork":false,"url":"https://api.github.com/repos/avocado-framework/avocado-vt","forks_url":"https://api.github.com/repos/avocado-framework/avocado-vt/forks","keys_url":"https://api.github.com/repos/avocado-framework/avocado-vt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avocado-framework/avocado-vt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avocado-framework/avocado-vt/teams","hooks_url":"https://api.github.com/repos/avocado-framework/avocado-vt/hooks","issue_events_url":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/events{/number}","events_url":"https://api.github.com/repos/avocado-framework/avocado-vt/events","assignees_url":"https://api.github.com/repos/avocado-framework/avocado-vt/assignees{/user}","branches_url":"https://api.github.com/repos/avocado-framework/avocado-vt/branches{/branch}","tags_url":"https://api.github.com/repos/avocado-framework/avocado-vt/tags","blobs_url":"https://api.github.com/repos/avocado-framework/avocado-vt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avocado-framework/avocado-vt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avocado-framework/avocado-vt/git/refs{/sha}","trees_url":"https://api.github.com/repos/avocado-framework/avocado-vt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avocado-framework/avocado-vt/statuses/{sha}","languages_url":"https://api.github.com/repos/avocado-framework/avocado-vt/languages","stargazers_url":"https://api.github.com/repos/avocado-framework/avocado-vt/stargazers","contributors_url":"https://api.github.com/repos/avocado-framework/avocado-vt/contributors","subscribers_url":"https://api.github.com/repos/avocado-framework/avocado-vt/subscribers","subscription_url":"https://api.github.com/repos/avocado-framework/avocado-vt/subscription","commits_url":"https://api.github.com/repos/avocado-framework/avocado-vt/commits{/sha}","git_commits_url":"https://api.github.com/repos/avocado-framework/avocado-vt/git/commits{/sha}","comments_url":"https://api.github.com/repos/avocado-framework/avocado-vt/comments{/number}","issue_comment_url":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/comments{/number}","contents_url":"https://api.github.com/repos/avocado-framework/avocado-vt/contents/{+path}","compare_url":"https://api.github.com/repos/avocado-framework/avocado-vt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avocado-framework/avocado-vt/merges","archive_url":"https://api.github.com/repos/avocado-framework/avocado-vt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avocado-framework/avocado-vt/downloads","issues_url":"https://api.github.com/repos/avocado-framework/avocado-vt/issues{/number}","pulls_url":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls{/number}","milestones_url":"https://api.github.com/repos/avocado-framework/avocado-vt/milestones{/number}","notifications_url":"https://api.github.com/repos/avocado-framework/avocado-vt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avocado-framework/avocado-vt/labels{/name}","releases_url":"https://api.github.com/repos/avocado-framework/avocado-vt/releases{/id}","deployments_url":"https://api.github.com/repos/avocado-framework/avocado-vt/deployments","created_at":"2015-05-27T14:22:13Z","updated_at":"2018-09-17T06:28:13Z","pushed_at":"2018-09-17T08:47:20Z","git_url":"git://github.com/avocado-framework/avocado-vt.git","ssh_url":"git@github.com:avocado-framework/avocado-vt.git","clone_url":"https://github.com/avocado-framework/avocado-vt.git","svn_url":"https://github.com/avocado-framework/avocado-vt","homepage":"http://avocado-vt.readthedocs.org/","size":28542,"stargazers_count":34,"watchers_count":34,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":144,"mirror_url":null,"archived":false,"open_issues_count":131,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":144,"open_issues":131,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/1720"},"html":{"href":"https://github.com/avocado-framework/avocado-vt/pull/1720"},"issue":{"href":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/1720"},"comments":{"href":"https://api.github.com/repos/avocado-framework/avocado-vt/issues/1720/comments"},"review_comments":{"href":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/1720/comments"},"review_comment":{"href":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/avocado-framework/avocado-vt/pulls/1720/commits"},"statuses":{"href":"https://api.github.com/repos/avocado-framework/avocado-vt/statuses/05bd290a790b24da40efea67cec2015f4275e490"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kylazhang"}}