{"action":"closed","number":1961,"pull_request":{"url":"https://api.github.com/repos/autotest/virt-test/pulls/1961","id":27413942,"html_url":"https://github.com/autotest/virt-test/pull/1961","diff_url":"https://github.com/autotest/virt-test/pull/1961.diff","patch_url":"https://github.com/autotest/virt-test/pull/1961.patch","issue_url":"https://api.github.com/repos/autotest/virt-test/issues/1961","number":1961,"state":"closed","locked":false,"title":"virttest: Refactorize guest agent related functions","user":{"login":"Hao-Liu","id":5862133,"avatar_url":"https://avatars.githubusercontent.com/u/5862133?v=3","gravatar_id":"","url":"https://api.github.com/users/Hao-Liu","html_url":"https://github.com/Hao-Liu","followers_url":"https://api.github.com/users/Hao-Liu/followers","following_url":"https://api.github.com/users/Hao-Liu/following{/other_user}","gists_url":"https://api.github.com/users/Hao-Liu/gists{/gist_id}","starred_url":"https://api.github.com/users/Hao-Liu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hao-Liu/subscriptions","organizations_url":"https://api.github.com/users/Hao-Liu/orgs","repos_url":"https://api.github.com/users/Hao-Liu/repos","events_url":"https://api.github.com/users/Hao-Liu/events{/privacy}","received_events_url":"https://api.github.com/users/Hao-Liu/received_events","type":"User","site_admin":false},"body":"Guest agent is vastly used in the tests so a single function call\r\nto prepare guest agent is needed. Current using method set_guest_agent()\r\nin virttest.util_test.libvirt is not so flexible. For example for tests\r\nrequiring a guest with agent channel but no agent service etc.\r\n\r\nIn this patch we implemented a method prepare_guest_agent() in libvirt_vm\r\nclass to setup guest agent as required for guest.\r\n\r\nMajor changes including:\r\n1)  Changes get_agent_channels() and remove_agent_channels() from\r\n    static method back to normal method since using static method\r\n    is not straightforward. There are many misuses of static method\r\n    in libvirt_xml module and We should change them later since\r\n    code dependence is tangled.\r\n\r\n2)  Besides the prepare_guest_agent() method mentioned above, two new\r\n    methods install_package() and remove_package() are implemented\r\n    for easily handling packages in the guest system. It only supports\r\n    yum based package manager and others are expected to be supported\r\n    later.\r\n\r\n3)  The original set_guest_agent() will report a deprecate warning in\r\n    case it is used accidentally after change.\r\n\r\n4)  Added getenforce() and setenforce() in libvirt_xml module to\r\n    retrieve or change guest SELinux mode for later use.\r\n\r\nSigned-off-by: Hao Liu <hliu@redhat.com>","created_at":"2015-01-15T09:01:50Z","updated_at":"2015-01-21T10:32:04Z","closed_at":"2015-01-21T10:32:04Z","merged_at":"2015-01-21T10:32:04Z","merge_commit_sha":"f363c804b6299d081a149df3b2f900756a96f86a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/autotest/virt-test/pulls/1961/commits","review_comments_url":"https://api.github.com/repos/autotest/virt-test/pulls/1961/comments","review_comment_url":"https://api.github.com/repos/autotest/virt-test/pulls/comments/{number}","comments_url":"https://api.github.com/repos/autotest/virt-test/issues/1961/comments","statuses_url":"https://api.github.com/repos/autotest/virt-test/statuses/002d51fedb91a452339a98f2d07b137f0f161f6c","head":{"label":"Hao-Liu:guest_agent","ref":"guest_agent","sha":"002d51fedb91a452339a98f2d07b137f0f161f6c","user":{"login":"Hao-Liu","id":5862133,"avatar_url":"https://avatars.githubusercontent.com/u/5862133?v=3","gravatar_id":"","url":"https://api.github.com/users/Hao-Liu","html_url":"https://github.com/Hao-Liu","followers_url":"https://api.github.com/users/Hao-Liu/followers","following_url":"https://api.github.com/users/Hao-Liu/following{/other_user}","gists_url":"https://api.github.com/users/Hao-Liu/gists{/gist_id}","starred_url":"https://api.github.com/users/Hao-Liu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hao-Liu/subscriptions","organizations_url":"https://api.github.com/users/Hao-Liu/orgs","repos_url":"https://api.github.com/users/Hao-Liu/repos","events_url":"https://api.github.com/users/Hao-Liu/events{/privacy}","received_events_url":"https://api.github.com/users/Hao-Liu/received_events","type":"User","site_admin":false},"repo":{"id":14307900,"name":"virt-test","full_name":"Hao-Liu/virt-test","owner":{"login":"Hao-Liu","id":5862133,"avatar_url":"https://avatars.githubusercontent.com/u/5862133?v=3","gravatar_id":"","url":"https://api.github.com/users/Hao-Liu","html_url":"https://github.com/Hao-Liu","followers_url":"https://api.github.com/users/Hao-Liu/followers","following_url":"https://api.github.com/users/Hao-Liu/following{/other_user}","gists_url":"https://api.github.com/users/Hao-Liu/gists{/gist_id}","starred_url":"https://api.github.com/users/Hao-Liu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hao-Liu/subscriptions","organizations_url":"https://api.github.com/users/Hao-Liu/orgs","repos_url":"https://api.github.com/users/Hao-Liu/repos","events_url":"https://api.github.com/users/Hao-Liu/events{/privacy}","received_events_url":"https://api.github.com/users/Hao-Liu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Hao-Liu/virt-test","description":"Linux Virtualization Tests","fork":true,"url":"https://api.github.com/repos/Hao-Liu/virt-test","forks_url":"https://api.github.com/repos/Hao-Liu/virt-test/forks","keys_url":"https://api.github.com/repos/Hao-Liu/virt-test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hao-Liu/virt-test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hao-Liu/virt-test/teams","hooks_url":"https://api.github.com/repos/Hao-Liu/virt-test/hooks","issue_events_url":"https://api.github.com/repos/Hao-Liu/virt-test/issues/events{/number}","events_url":"https://api.github.com/repos/Hao-Liu/virt-test/events","assignees_url":"https://api.github.com/repos/Hao-Liu/virt-test/assignees{/user}","branches_url":"https://api.github.com/repos/Hao-Liu/virt-test/branches{/branch}","tags_url":"https://api.github.com/repos/Hao-Liu/virt-test/tags","blobs_url":"https://api.github.com/repos/Hao-Liu/virt-test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hao-Liu/virt-test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hao-Liu/virt-test/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hao-Liu/virt-test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hao-Liu/virt-test/statuses/{sha}","languages_url":"https://api.github.com/repos/Hao-Liu/virt-test/languages","stargazers_url":"https://api.github.com/repos/Hao-Liu/virt-test/stargazers","contributors_url":"https://api.github.com/repos/Hao-Liu/virt-test/contributors","subscribers_url":"https://api.github.com/repos/Hao-Liu/virt-test/subscribers","subscription_url":"https://api.github.com/repos/Hao-Liu/virt-test/subscription","commits_url":"https://api.github.com/repos/Hao-Liu/virt-test/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hao-Liu/virt-test/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hao-Liu/virt-test/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hao-Liu/virt-test/issues/comments/{number}","contents_url":"https://api.github.com/repos/Hao-Liu/virt-test/contents/{+path}","compare_url":"https://api.github.com/repos/Hao-Liu/virt-test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hao-Liu/virt-test/merges","archive_url":"https://api.github.com/repos/Hao-Liu/virt-test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hao-Liu/virt-test/downloads","issues_url":"https://api.github.com/repos/Hao-Liu/virt-test/issues{/number}","pulls_url":"https://api.github.com/repos/Hao-Liu/virt-test/pulls{/number}","milestones_url":"https://api.github.com/repos/Hao-Liu/virt-test/milestones{/number}","notifications_url":"https://api.github.com/repos/Hao-Liu/virt-test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hao-Liu/virt-test/labels{/name}","releases_url":"https://api.github.com/repos/Hao-Liu/virt-test/releases{/id}","created_at":"2013-11-11T17:30:11Z","updated_at":"2014-06-18T04:48:39Z","pushed_at":"2015-01-21T09:44:18Z","git_url":"git://github.com/Hao-Liu/virt-test.git","ssh_url":"git@github.com:Hao-Liu/virt-test.git","clone_url":"https://github.com/Hao-Liu/virt-test.git","svn_url":"https://github.com/Hao-Liu/virt-test","homepage":null,"size":18932,"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":"autotest:master","ref":"master","sha":"9d7bcfb0543f0a2bddbd5d453df606771962c023","user":{"login":"autotest","id":472856,"avatar_url":"https://avatars.githubusercontent.com/u/472856?v=3","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":5952670,"name":"virt-test","full_name":"autotest/virt-test","owner":{"login":"autotest","id":472856,"avatar_url":"https://avatars.githubusercontent.com/u/472856?v=3","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/virt-test","description":"Linux Virtualization Tests","fork":false,"url":"https://api.github.com/repos/autotest/virt-test","forks_url":"https://api.github.com/repos/autotest/virt-test/forks","keys_url":"https://api.github.com/repos/autotest/virt-test/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autotest/virt-test/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autotest/virt-test/teams","hooks_url":"https://api.github.com/repos/autotest/virt-test/hooks","issue_events_url":"https://api.github.com/repos/autotest/virt-test/issues/events{/number}","events_url":"https://api.github.com/repos/autotest/virt-test/events","assignees_url":"https://api.github.com/repos/autotest/virt-test/assignees{/user}","branches_url":"https://api.github.com/repos/autotest/virt-test/branches{/branch}","tags_url":"https://api.github.com/repos/autotest/virt-test/tags","blobs_url":"https://api.github.com/repos/autotest/virt-test/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autotest/virt-test/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autotest/virt-test/git/refs{/sha}","trees_url":"https://api.github.com/repos/autotest/virt-test/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autotest/virt-test/statuses/{sha}","languages_url":"https://api.github.com/repos/autotest/virt-test/languages","stargazers_url":"https://api.github.com/repos/autotest/virt-test/stargazers","contributors_url":"https://api.github.com/repos/autotest/virt-test/contributors","subscribers_url":"https://api.github.com/repos/autotest/virt-test/subscribers","subscription_url":"https://api.github.com/repos/autotest/virt-test/subscription","commits_url":"https://api.github.com/repos/autotest/virt-test/commits{/sha}","git_commits_url":"https://api.github.com/repos/autotest/virt-test/git/commits{/sha}","comments_url":"https://api.github.com/repos/autotest/virt-test/comments{/number}","issue_comment_url":"https://api.github.com/repos/autotest/virt-test/issues/comments/{number}","contents_url":"https://api.github.com/repos/autotest/virt-test/contents/{+path}","compare_url":"https://api.github.com/repos/autotest/virt-test/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autotest/virt-test/merges","archive_url":"https://api.github.com/repos/autotest/virt-test/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autotest/virt-test/downloads","issues_url":"https://api.github.com/repos/autotest/virt-test/issues{/number}","pulls_url":"https://api.github.com/repos/autotest/virt-test/pulls{/number}","milestones_url":"https://api.github.com/repos/autotest/virt-test/milestones{/number}","notifications_url":"https://api.github.com/repos/autotest/virt-test/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autotest/virt-test/labels{/name}","releases_url":"https://api.github.com/repos/autotest/virt-test/releases{/id}","created_at":"2012-09-25T16:10:43Z","updated_at":"2015-01-21T09:51:09Z","pushed_at":"2015-01-21T10:32:04Z","git_url":"git://github.com/autotest/virt-test.git","ssh_url":"git@github.com:autotest/virt-test.git","clone_url":"https://github.com/autotest/virt-test.git","svn_url":"https://github.com/autotest/virt-test","homepage":"http://virt-test.readthedocs.org/en/latest/","size":40555,"stargazers_count":71,"watchers_count":71,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":115,"mirror_url":null,"open_issues_count":48,"forks":115,"open_issues":48,"watchers":71,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/autotest/virt-test/pulls/1961"},"html":{"href":"https://github.com/autotest/virt-test/pull/1961"},"issue":{"href":"https://api.github.com/repos/autotest/virt-test/issues/1961"},"comments":{"href":"https://api.github.com/repos/autotest/virt-test/issues/1961/comments"},"review_comments":{"href":"https://api.github.com/repos/autotest/virt-test/pulls/1961/comments"},"review_comment":{"href":"https://api.github.com/repos/autotest/virt-test/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/autotest/virt-test/pulls/1961/commits"},"statuses":{"href":"https://api.github.com/repos/autotest/virt-test/statuses/002d51fedb91a452339a98f2d07b137f0f161f6c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"will-Do","id":1916899,"avatar_url":"https://avatars.githubusercontent.com/u/1916899?v=3","gravatar_id":"","url":"https://api.github.com/users/will-Do","html_url":"https://github.com/will-Do","followers_url":"https://api.github.com/users/will-Do/followers","following_url":"https://api.github.com/users/will-Do/following{/other_user}","gists_url":"https://api.github.com/users/will-Do/gists{/gist_id}","starred_url":"https://api.github.com/users/will-Do/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/will-Do/subscriptions","organizations_url":"https://api.github.com/users/will-Do/orgs","repos_url":"https://api.github.com/users/will-Do/repos","events_url":"https://api.github.com/users/will-Do/events{/privacy}","received_events_url":"https://api.github.com/users/will-Do/received_events","type":"User","site_admin":false},"comments":3,"review_comments":2,"commits":1,"additions":161,"deletions":43,"changed_files":3}}