{"action":"created","comment":{"url":"https://api.github.com/repos/autotest/tp-libvirt/pulls/comments/153141444","pull_request_review_id":79101935,"id":153141444,"diff_hunk":"@@ -543,14 +573,45 @@ def run_guest_libvirt(session):\n                     params[\"forward_iface\"] = \" \".join(interface)\n \n             netxml = libvirt.create_net_xml(net_name, params)\n+            if forward.has_key(\"mode\") and forward[\"mode\"] == \"open\":\n+                netxml.mac = utils_net.generate_mac_address_simple()\n+                try:\n+                    if net_no_bridge:\n+                        netxml.del_bridge()\n+                    if net_no_ip:\n+                        netxml.del_ip()\n+                        netxml.del_ip()\n+                    if net_no_mac:\n+                        netxml.del_mac()\n+                except xcepts.LibvirtXMLNotFoundError:\n+                    pass\n+                if net_with_dev:\n+                    net_forward = netxml.forward\n+                    net_forward.update({\"dev\": net_ifs[0]})\n+                    netxml.forward = net_forward\n+            logging.info(\"netxml before define is %s\", netxml)\n             try:\n                 netxml.sync()\n             except xcepts.LibvirtXMLError, details:\n                 logging.info(str(details))\n                 if define_error:\n-                    pass\n+                    return\n                 else:\n                     test.fail(\"Failed to define network\")\n+\n+        # Check open mode network xml\n+        if forward.has_key(\"mode\") and forward[\"mode\"] == \"open\":\n+            netxml_new = NetworkXML.new_from_net_dumpxml(net_name)\n+            logging.info(\"netxml after define is %s\", netxml_new)\n+            try:\n+                if net_no_bridge:\n+                    net_bridge = str(netxml_new.bridge)\n+                if net_no_mac:\n+                    netxml_new.mac","path":"libvirt/tests/src/virtual_network/iface_network.py","position":163,"original_position":163,"commit_id":"5f20493c77d8fb6c6f348f4d70ccdcc2a9d8d266","original_commit_id":"5f20493c77d8fb6c6f348f4d70ccdcc2a9d8d266","user":{"login":"chunfuwen","id":17738600,"avatar_url":"https://avatars3.githubusercontent.com/u/17738600?v=4","gravatar_id":"","url":"https://api.github.com/users/chunfuwen","html_url":"https://github.com/chunfuwen","followers_url":"https://api.github.com/users/chunfuwen/followers","following_url":"https://api.github.com/users/chunfuwen/following{/other_user}","gists_url":"https://api.github.com/users/chunfuwen/gists{/gist_id}","starred_url":"https://api.github.com/users/chunfuwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chunfuwen/subscriptions","organizations_url":"https://api.github.com/users/chunfuwen/orgs","repos_url":"https://api.github.com/users/chunfuwen/repos","events_url":"https://api.github.com/users/chunfuwen/events{/privacy}","received_events_url":"https://api.github.com/users/chunfuwen/received_events","type":"User","site_admin":false},"body":"any operation for netxml_new.mac ?","created_at":"2017-11-27T09:23:13Z","updated_at":"2017-11-27T09:24:06Z","html_url":"https://github.com/autotest/tp-libvirt/pull/1254#discussion_r153141444","pull_request_url":"https://api.github.com/repos/autotest/tp-libvirt/pulls/1254","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/autotest/tp-libvirt/pulls/comments/153141444"},"html":{"href":"https://github.com/autotest/tp-libvirt/pull/1254#discussion_r153141444"},"pull_request":{"href":"https://api.github.com/repos/autotest/tp-libvirt/pulls/1254"}}},"pull_request":{"url":"https://api.github.com/repos/autotest/tp-libvirt/pulls/1254","id":148859889,"html_url":"https://github.com/autotest/tp-libvirt/pull/1254","diff_url":"https://github.com/autotest/tp-libvirt/pull/1254.diff","patch_url":"https://github.com/autotest/tp-libvirt/pull/1254.patch","issue_url":"https://api.github.com/repos/autotest/tp-libvirt/issues/1254","number":1254,"state":"open","locked":false,"title":"Update for net forward and dnsmasq test","user":{"login":"kylazhang","id":3423686,"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":"1. Add open forward mode test\r\n2. Add checking rules of iptables for nat, isolated, route forward mode\r\n3. Add check for dnsmasq process\r\n4. Add check for missing part in dnsmasq conf","created_at":"2017-10-26T07:45:39Z","updated_at":"2017-11-27T09:24:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41373aeab2b308469f9759250a7644950a08be3a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/autotest/tp-libvirt/pulls/1254/commits","review_comments_url":"https://api.github.com/repos/autotest/tp-libvirt/pulls/1254/comments","review_comment_url":"https://api.github.com/repos/autotest/tp-libvirt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/autotest/tp-libvirt/issues/1254/comments","statuses_url":"https://api.github.com/repos/autotest/tp-libvirt/statuses/5f20493c77d8fb6c6f348f4d70ccdcc2a9d8d266","head":{"label":"kylazhang:open-mode","ref":"open-mode","sha":"5f20493c77d8fb6c6f348f4d70ccdcc2a9d8d266","user":{"login":"kylazhang","id":3423686,"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},"repo":{"id":16793696,"name":"tp-libvirt","full_name":"kylazhang/tp-libvirt","owner":{"login":"kylazhang","id":3423686,"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},"private":false,"html_url":"https://github.com/kylazhang/tp-libvirt","description":"Test Provider for Libvirt and related virtualization backends","fork":true,"url":"https://api.github.com/repos/kylazhang/tp-libvirt","forks_url":"https://api.github.com/repos/kylazhang/tp-libvirt/forks","keys_url":"https://api.github.com/repos/kylazhang/tp-libvirt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kylazhang/tp-libvirt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kylazhang/tp-libvirt/teams","hooks_url":"https://api.github.com/repos/kylazhang/tp-libvirt/hooks","issue_events_url":"https://api.github.com/repos/kylazhang/tp-libvirt/issues/events{/number}","events_url":"https://api.github.com/repos/kylazhang/tp-libvirt/events","assignees_url":"https://api.github.com/repos/kylazhang/tp-libvirt/assignees{/user}","branches_url":"https://api.github.com/repos/kylazhang/tp-libvirt/branches{/branch}","tags_url":"https://api.github.com/repos/kylazhang/tp-libvirt/tags","blobs_url":"https://api.github.com/repos/kylazhang/tp-libvirt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kylazhang/tp-libvirt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kylazhang/tp-libvirt/git/refs{/sha}","trees_url":"https://api.github.com/repos/kylazhang/tp-libvirt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kylazhang/tp-libvirt/statuses/{sha}","languages_url":"https://api.github.com/repos/kylazhang/tp-libvirt/languages","stargazers_url":"https://api.github.com/repos/kylazhang/tp-libvirt/stargazers","contributors_url":"https://api.github.com/repos/kylazhang/tp-libvirt/contributors","subscribers_url":"https://api.github.com/repos/kylazhang/tp-libvirt/subscribers","subscription_url":"https://api.github.com/repos/kylazhang/tp-libvirt/subscription","commits_url":"https://api.github.com/repos/kylazhang/tp-libvirt/commits{/sha}","git_commits_url":"https://api.github.com/repos/kylazhang/tp-libvirt/git/commits{/sha}","comments_url":"https://api.github.com/repos/kylazhang/tp-libvirt/comments{/number}","issue_comment_url":"https://api.github.com/repos/kylazhang/tp-libvirt/issues/comments{/number}","contents_url":"https://api.github.com/repos/kylazhang/tp-libvirt/contents/{+path}","compare_url":"https://api.github.com/repos/kylazhang/tp-libvirt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kylazhang/tp-libvirt/merges","archive_url":"https://api.github.com/repos/kylazhang/tp-libvirt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kylazhang/tp-libvirt/downloads","issues_url":"https://api.github.com/repos/kylazhang/tp-libvirt/issues{/number}","pulls_url":"https://api.github.com/repos/kylazhang/tp-libvirt/pulls{/number}","milestones_url":"https://api.github.com/repos/kylazhang/tp-libvirt/milestones{/number}","notifications_url":"https://api.github.com/repos/kylazhang/tp-libvirt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kylazhang/tp-libvirt/labels{/name}","releases_url":"https://api.github.com/repos/kylazhang/tp-libvirt/releases{/id}","deployments_url":"https://api.github.com/repos/kylazhang/tp-libvirt/deployments","created_at":"2014-02-13T06:11:32Z","updated_at":"2015-01-07T09:53:08Z","pushed_at":"2017-11-03T13:26:53Z","git_url":"git://github.com/kylazhang/tp-libvirt.git","ssh_url":"git@github.com:kylazhang/tp-libvirt.git","clone_url":"https://github.com/kylazhang/tp-libvirt.git","svn_url":"https://github.com/kylazhang/tp-libvirt","homepage":null,"size":11595,"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,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"autotest:master","ref":"master","sha":"9429198a7b7737be8a8932a515fec785ad40c3d7","user":{"login":"autotest","id":472856,"avatar_url":"https://avatars1.githubusercontent.com/u/472856?v=4","gravatar_id":"","url":"https://api.github.com/users/autotest","html_url":"https://github.com/autotest","followers_url":"https://api.github.com/users/autotest/followers","following_url":"https://api.github.com/users/autotest/following{/other_user}","gists_url":"https://api.github.com/users/autotest/gists{/gist_id}","starred_url":"https://api.github.com/users/autotest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autotest/subscriptions","organizations_url":"https://api.github.com/users/autotest/orgs","repos_url":"https://api.github.com/users/autotest/repos","events_url":"https://api.github.com/users/autotest/events{/privacy}","received_events_url":"https://api.github.com/users/autotest/received_events","type":"Organization","site_admin":false},"repo":{"id":16180517,"name":"tp-libvirt","full_name":"autotest/tp-libvirt","owner":{"login":"autotest","id":472856,"avatar_url":"https://avatars1.githubusercontent.com/u/472856?v=4","gravatar_id":"","url":"https://api.github.com/users/autotest","html_url":"https://github.com/autotest","followers_url":"https://api.github.com/users/autotest/followers","following_url":"https://api.github.com/users/autotest/following{/other_user}","gists_url":"https://api.github.com/users/autotest/gists{/gist_id}","starred_url":"https://api.github.com/users/autotest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autotest/subscriptions","organizations_url":"https://api.github.com/users/autotest/orgs","repos_url":"https://api.github.com/users/autotest/repos","events_url":"https://api.github.com/users/autotest/events{/privacy}","received_events_url":"https://api.github.com/users/autotest/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autotest/tp-libvirt","description":"Test Provider for Libvirt and related virtualization backends","fork":false,"url":"https://api.github.com/repos/autotest/tp-libvirt","forks_url":"https://api.github.com/repos/autotest/tp-libvirt/forks","keys_url":"https://api.github.com/repos/autotest/tp-libvirt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autotest/tp-libvirt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autotest/tp-libvirt/teams","hooks_url":"https://api.github.com/repos/autotest/tp-libvirt/hooks","issue_events_url":"https://api.github.com/repos/autotest/tp-libvirt/issues/events{/number}","events_url":"https://api.github.com/repos/autotest/tp-libvirt/events","assignees_url":"https://api.github.com/repos/autotest/tp-libvirt/assignees{/user}","branches_url":"https://api.github.com/repos/autotest/tp-libvirt/branches{/branch}","tags_url":"https://api.github.com/repos/autotest/tp-libvirt/tags","blobs_url":"https://api.github.com/repos/autotest/tp-libvirt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autotest/tp-libvirt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autotest/tp-libvirt/git/refs{/sha}","trees_url":"https://api.github.com/repos/autotest/tp-libvirt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autotest/tp-libvirt/statuses/{sha}","languages_url":"https://api.github.com/repos/autotest/tp-libvirt/languages","stargazers_url":"https://api.github.com/repos/autotest/tp-libvirt/stargazers","contributors_url":"https://api.github.com/repos/autotest/tp-libvirt/contributors","subscribers_url":"https://api.github.com/repos/autotest/tp-libvirt/subscribers","subscription_url":"https://api.github.com/repos/autotest/tp-libvirt/subscription","commits_url":"https://api.github.com/repos/autotest/tp-libvirt/commits{/sha}","git_commits_url":"https://api.github.com/repos/autotest/tp-libvirt/git/commits{/sha}","comments_url":"https://api.github.com/repos/autotest/tp-libvirt/comments{/number}","issue_comment_url":"https://api.github.com/repos/autotest/tp-libvirt/issues/comments{/number}","contents_url":"https://api.github.com/repos/autotest/tp-libvirt/contents/{+path}","compare_url":"https://api.github.com/repos/autotest/tp-libvirt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autotest/tp-libvirt/merges","archive_url":"https://api.github.com/repos/autotest/tp-libvirt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autotest/tp-libvirt/downloads","issues_url":"https://api.github.com/repos/autotest/tp-libvirt/issues{/number}","pulls_url":"https://api.github.com/repos/autotest/tp-libvirt/pulls{/number}","milestones_url":"https://api.github.com/repos/autotest/tp-libvirt/milestones{/number}","notifications_url":"https://api.github.com/repos/autotest/tp-libvirt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autotest/tp-libvirt/labels{/name}","releases_url":"https://api.github.com/repos/autotest/tp-libvirt/releases{/id}","deployments_url":"https://api.github.com/repos/autotest/tp-libvirt/deployments","created_at":"2014-01-23T17:58:18Z","updated_at":"2017-09-16T18:38:53Z","pushed_at":"2017-11-27T09:04:46Z","git_url":"git://github.com/autotest/tp-libvirt.git","ssh_url":"git@github.com:autotest/tp-libvirt.git","clone_url":"https://github.com/autotest/tp-libvirt.git","svn_url":"https://github.com/autotest/tp-libvirt","homepage":null,"size":11581,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":98,"mirror_url":null,"archived":false,"open_issues_count":83,"forks":98,"open_issues":83,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/autotest/tp-libvirt/pulls/1254"},"html":{"href":"https://github.com/autotest/tp-libvirt/pull/1254"},"issue":{"href":"https://api.github.com/repos/autotest/tp-libvirt/issues/1254"},"comments":{"href":"https://api.github.com/repos/autotest/tp-libvirt/issues/1254/comments"},"review_comments":{"href":"https://api.github.com/repos/autotest/tp-libvirt/pulls/1254/comments"},"review_comment":{"href":"https://api.github.com/repos/autotest/tp-libvirt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/autotest/tp-libvirt/pulls/1254/commits"},"statuses":{"href":"https://api.github.com/repos/autotest/tp-libvirt/statuses/5f20493c77d8fb6c6f348f4d70ccdcc2a9d8d266"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"chunfuwen"}}