{"action":"created","comment":{"url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/comments/75380048","id":75380048,"diff_hunk":"@@ -77,6 +77,8 @@ def call(env)\n               @mode = iface_configuration.fetch(:mode, 'bridge')\n               @type = iface_configuration.fetch(:type, 'direct')\n               @model_type = iface_configuration.fetch(:model_type, @nic_model_type)\n+              @portgroup = iface_configuration.fetch(:portgroup, '')","path":"lib/vagrant-libvirt/action/create_network_interfaces.rb","position":null,"original_position":4,"commit_id":"63e347a92321aac566b949efe087bc79eae2b684","original_commit_id":"b33b6a4c2e1617633b41f578689a3440e91b668c","user":{"login":"borisroman","id":5996146,"avatar_url":"https://avatars.githubusercontent.com/u/5996146?v=3","gravatar_id":"","url":"https://api.github.com/users/borisroman","html_url":"https://github.com/borisroman","followers_url":"https://api.github.com/users/borisroman/followers","following_url":"https://api.github.com/users/borisroman/following{/other_user}","gists_url":"https://api.github.com/users/borisroman/gists{/gist_id}","starred_url":"https://api.github.com/users/borisroman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borisroman/subscriptions","organizations_url":"https://api.github.com/users/borisroman/orgs","repos_url":"https://api.github.com/users/borisroman/repos","events_url":"https://api.github.com/users/borisroman/events{/privacy}","received_events_url":"https://api.github.com/users/borisroman/received_events","type":"User","site_admin":false},"body":"Thanks for the response! I've updated the PR to reflect the changes.","created_at":"2016-08-18T20:11:39Z","updated_at":"2016-08-18T20:11:39Z","html_url":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/642#discussion_r75380048","pull_request_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/642","_links":{"self":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/comments/75380048"},"html":{"href":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/642#discussion_r75380048"},"pull_request":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/642"}}},"pull_request":{"url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/642","id":81816703,"html_url":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/642","diff_url":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/642.diff","patch_url":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/642.patch","issue_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/642","number":642,"state":"open","locked":false,"title":"Add libvirt portgroup support.","user":{"login":"borisroman","id":5996146,"avatar_url":"https://avatars.githubusercontent.com/u/5996146?v=3","gravatar_id":"","url":"https://api.github.com/users/borisroman","html_url":"https://github.com/borisroman","followers_url":"https://api.github.com/users/borisroman/followers","following_url":"https://api.github.com/users/borisroman/following{/other_user}","gists_url":"https://api.github.com/users/borisroman/gists{/gist_id}","starred_url":"https://api.github.com/users/borisroman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borisroman/subscriptions","organizations_url":"https://api.github.com/users/borisroman/orgs","repos_url":"https://api.github.com/users/borisroman/repos","events_url":"https://api.github.com/users/borisroman/events{/privacy}","received_events_url":"https://api.github.com/users/borisroman/received_events","type":"User","site_admin":false},"body":"This PR enables support for the networking feature `portgroup` in `vagrant-libvirt`.\r\n\r\nFor libvirt details see: `https://libvirt.org/formatdomain.html#elementsNICSVirtual`\r\n\r\nTo verify the functionality you can use the following basic Vagrantfile:\r\n```\r\nVagrant.configure(\"2\") do |config|\r\n\r\n  config.vm.box = \"centos/7\"\r\n\r\n  config.vm.network :public_network,\r\n      :type => 'network',\r\n      :portgroup => 'admin',\r\n      :network_name => 'ovs-net'\r\nend\r\n```\r\n\r\nThe command `virsh edit vagrant-libvirt_default` will show the portgroup and network:\r\n```\r\n...\r\n    <interface type='network'>\r\n      <mac address='52:54:00:39:a7:9b'/>\r\n      <source network='ovs-net' portgroup='admin'/>\r\n      <model type='virtio'/>\r\n      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>\r\n    </interface>\r\n...\r\n```\r\n\r\nInside the VM:\r\n```\r\n[vagrant@localhost ~]$ ip a\r\n1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN\r\n    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00\r\n    inet 127.0.0.1/8 scope host lo\r\n       valid_lft forever preferred_lft forever\r\n    inet6 ::1/128 scope host\r\n       valid_lft forever preferred_lft forever\r\n2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\r\n    link/ether 52:54:00:76:7b:c7 brd ff:ff:ff:ff:ff:ff\r\n    inet 192.168.121.14/24 brd 192.168.121.255 scope global dynamic eth0\r\n       valid_lft 3499sec preferred_lft 3499sec\r\n    inet6 fe80::5054:ff:fe76:7bc7/64 scope link\r\n       valid_lft forever preferred_lft forever\r\n3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\r\n    link/ether 52:54:00:a7:a8:21 brd ff:ff:ff:ff:ff:ff\r\n    inet6 fe80::5054:ff:fea7:a821/64 scope link\r\n       valid_lft forever preferred_lft forever\r\n```\r\n","created_at":"2016-08-18T13:35:40Z","updated_at":"2016-08-18T20:11:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f127f625e78c751839742763c9ea12d638d841e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/642/commits","review_comments_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/642/comments","review_comment_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/642/comments","statuses_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/statuses/63e347a92321aac566b949efe087bc79eae2b684","head":{"label":"borisroman:add/portgroup_public","ref":"add/portgroup_public","sha":"63e347a92321aac566b949efe087bc79eae2b684","user":{"login":"borisroman","id":5996146,"avatar_url":"https://avatars.githubusercontent.com/u/5996146?v=3","gravatar_id":"","url":"https://api.github.com/users/borisroman","html_url":"https://github.com/borisroman","followers_url":"https://api.github.com/users/borisroman/followers","following_url":"https://api.github.com/users/borisroman/following{/other_user}","gists_url":"https://api.github.com/users/borisroman/gists{/gist_id}","starred_url":"https://api.github.com/users/borisroman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borisroman/subscriptions","organizations_url":"https://api.github.com/users/borisroman/orgs","repos_url":"https://api.github.com/users/borisroman/repos","events_url":"https://api.github.com/users/borisroman/events{/privacy}","received_events_url":"https://api.github.com/users/borisroman/received_events","type":"User","site_admin":false},"repo":{"id":64933355,"name":"vagrant-libvirt","full_name":"borisroman/vagrant-libvirt","owner":{"login":"borisroman","id":5996146,"avatar_url":"https://avatars.githubusercontent.com/u/5996146?v=3","gravatar_id":"","url":"https://api.github.com/users/borisroman","html_url":"https://github.com/borisroman","followers_url":"https://api.github.com/users/borisroman/followers","following_url":"https://api.github.com/users/borisroman/following{/other_user}","gists_url":"https://api.github.com/users/borisroman/gists{/gist_id}","starred_url":"https://api.github.com/users/borisroman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borisroman/subscriptions","organizations_url":"https://api.github.com/users/borisroman/orgs","repos_url":"https://api.github.com/users/borisroman/repos","events_url":"https://api.github.com/users/borisroman/events{/privacy}","received_events_url":"https://api.github.com/users/borisroman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/borisroman/vagrant-libvirt","description":"Vagrant provider for libvirt.","fork":true,"url":"https://api.github.com/repos/borisroman/vagrant-libvirt","forks_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/forks","keys_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/teams","hooks_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/hooks","issue_events_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/issues/events{/number}","events_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/events","assignees_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/assignees{/user}","branches_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/branches{/branch}","tags_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/tags","blobs_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/git/refs{/sha}","trees_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/statuses/{sha}","languages_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/languages","stargazers_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/stargazers","contributors_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/contributors","subscribers_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/subscribers","subscription_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/subscription","commits_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/commits{/sha}","git_commits_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/git/commits{/sha}","comments_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/comments{/number}","issue_comment_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/issues/comments{/number}","contents_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/contents/{+path}","compare_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/merges","archive_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/downloads","issues_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/issues{/number}","pulls_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/pulls{/number}","milestones_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/milestones{/number}","notifications_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/labels{/name}","releases_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/releases{/id}","deployments_url":"https://api.github.com/repos/borisroman/vagrant-libvirt/deployments","created_at":"2016-08-04T12:37:25Z","updated_at":"2016-08-04T12:37:26Z","pushed_at":"2016-08-18T20:10:55Z","git_url":"git://github.com/borisroman/vagrant-libvirt.git","ssh_url":"git@github.com:borisroman/vagrant-libvirt.git","clone_url":"https://github.com/borisroman/vagrant-libvirt.git","svn_url":"https://github.com/borisroman/vagrant-libvirt","homepage":null,"size":827,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"vagrant-libvirt:master","ref":"master","sha":"31c62ea52da2a3aae4a9e5c7c01116aff14b4277","user":{"login":"vagrant-libvirt","id":18666954,"avatar_url":"https://avatars.githubusercontent.com/u/18666954?v=3","gravatar_id":"","url":"https://api.github.com/users/vagrant-libvirt","html_url":"https://github.com/vagrant-libvirt","followers_url":"https://api.github.com/users/vagrant-libvirt/followers","following_url":"https://api.github.com/users/vagrant-libvirt/following{/other_user}","gists_url":"https://api.github.com/users/vagrant-libvirt/gists{/gist_id}","starred_url":"https://api.github.com/users/vagrant-libvirt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vagrant-libvirt/subscriptions","organizations_url":"https://api.github.com/users/vagrant-libvirt/orgs","repos_url":"https://api.github.com/users/vagrant-libvirt/repos","events_url":"https://api.github.com/users/vagrant-libvirt/events{/privacy}","received_events_url":"https://api.github.com/users/vagrant-libvirt/received_events","type":"Organization","site_admin":false},"repo":{"id":9043012,"name":"vagrant-libvirt","full_name":"vagrant-libvirt/vagrant-libvirt","owner":{"login":"vagrant-libvirt","id":18666954,"avatar_url":"https://avatars.githubusercontent.com/u/18666954?v=3","gravatar_id":"","url":"https://api.github.com/users/vagrant-libvirt","html_url":"https://github.com/vagrant-libvirt","followers_url":"https://api.github.com/users/vagrant-libvirt/followers","following_url":"https://api.github.com/users/vagrant-libvirt/following{/other_user}","gists_url":"https://api.github.com/users/vagrant-libvirt/gists{/gist_id}","starred_url":"https://api.github.com/users/vagrant-libvirt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vagrant-libvirt/subscriptions","organizations_url":"https://api.github.com/users/vagrant-libvirt/orgs","repos_url":"https://api.github.com/users/vagrant-libvirt/repos","events_url":"https://api.github.com/users/vagrant-libvirt/events{/privacy}","received_events_url":"https://api.github.com/users/vagrant-libvirt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vagrant-libvirt/vagrant-libvirt","description":"Vagrant provider for libvirt.","fork":false,"url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt","forks_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/forks","keys_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/teams","hooks_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/hooks","issue_events_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/events{/number}","events_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/events","assignees_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/assignees{/user}","branches_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/branches{/branch}","tags_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/tags","blobs_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/git/refs{/sha}","trees_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/statuses/{sha}","languages_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/languages","stargazers_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/stargazers","contributors_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/contributors","subscribers_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/subscribers","subscription_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/subscription","commits_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/commits{/sha}","git_commits_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/git/commits{/sha}","comments_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/comments{/number}","issue_comment_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/comments{/number}","contents_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/contents/{+path}","compare_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/merges","archive_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/downloads","issues_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues{/number}","pulls_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls{/number}","milestones_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/milestones{/number}","notifications_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/labels{/name}","releases_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/releases{/id}","deployments_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/deployments","created_at":"2013-03-26T23:54:32Z","updated_at":"2016-08-18T13:43:36Z","pushed_at":"2016-08-18T20:10:56Z","git_url":"git://github.com/vagrant-libvirt/vagrant-libvirt.git","ssh_url":"git@github.com:vagrant-libvirt/vagrant-libvirt.git","clone_url":"https://github.com/vagrant-libvirt/vagrant-libvirt.git","svn_url":"https://github.com/vagrant-libvirt/vagrant-libvirt","homepage":null,"size":1108,"stargazers_count":827,"watchers_count":827,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":222,"mirror_url":null,"open_issues_count":77,"forks":222,"open_issues":77,"watchers":827,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/642"},"html":{"href":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/642"},"issue":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/642"},"comments":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/642/comments"},"review_comments":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/642/comments"},"review_comment":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/642/commits"},"statuses":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/statuses/63e347a92321aac566b949efe087bc79eae2b684"}}}}
{"actor":{"display_login":"borisroman"}}