{"action":"created","comment":{"url":"https://api.github.com/repos/xenserver/xenadmin/pulls/comments/181697254","pull_request_review_id":112368740,"id":181697254,"diff_hunk":"@@ -51,6 +53,32 @@ protected override bool ImplementsIsDirty()\n             return true;\r\n         }\r\n \r\n+        public override bool ShowNetwork(Host targetHost, XenAPI.Network network)\r\n+        {\r\n+            if (!network.Show(Properties.Settings.Default.ShowHiddenVMs))\r\n+                return false;\r\n+\r\n+            if (network.IsSlave())\r\n+                return false;\r\n+\r\n+            if (network.IsSriov() && !Allow_Sriov_Network())\r\n+                return false;\r\n+\r\n+            if (targetHost != null && !targetHost.CanSeeNetwork(network))\r\n+                return false;\r\n+\r\n+            if (targetHost == null && !network.AllHostsCanSeeNetwork())\r\n+                return false;\r\n+\r\n+            return true;\r\n+        }\r\n+\r\n+        private bool Allow_Sriov_Network()\r\n+        {\r\n+            string xml = OVF.ToXml(SelectedOvfEnvelope);\r\n+            return xml.Contains(\"allow-network-sriov\");\r","path":"XenAdmin/Wizards/ImportWizard/ImportSelectNetworkPage.cs","position":36,"original_position":36,"commit_id":"530dcfcb5eaa5329f5a17feae09489bed26dfa03","original_commit_id":"530dcfcb5eaa5329f5a17feae09489bed26dfa03","user":{"login":"MihaelaStoica","id":4976784,"avatar_url":"https://avatars2.githubusercontent.com/u/4976784?v=4","gravatar_id":"","url":"https://api.github.com/users/MihaelaStoica","html_url":"https://github.com/MihaelaStoica","followers_url":"https://api.github.com/users/MihaelaStoica/followers","following_url":"https://api.github.com/users/MihaelaStoica/following{/other_user}","gists_url":"https://api.github.com/users/MihaelaStoica/gists{/gist_id}","starred_url":"https://api.github.com/users/MihaelaStoica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MihaelaStoica/subscriptions","organizations_url":"https://api.github.com/users/MihaelaStoica/orgs","repos_url":"https://api.github.com/users/MihaelaStoica/repos","events_url":"https://api.github.com/users/MihaelaStoica/events{/privacy}","received_events_url":"https://api.github.com/users/MihaelaStoica/received_events","type":"User","site_admin":false},"body":"Also, we can export more than one VM in an OVF file, so in theory we can have some VMs with the allow-network-sriov flag present, others without it. This code will allow the selection of the SR-IOV network if one of the VMs has the flag on.","created_at":"2018-04-16T11:05:58Z","updated_at":"2018-04-16T11:05:58Z","html_url":"https://github.com/xenserver/xenadmin/pull/2037#discussion_r181697254","pull_request_url":"https://api.github.com/repos/xenserver/xenadmin/pulls/2037","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/xenserver/xenadmin/pulls/comments/181697254"},"html":{"href":"https://github.com/xenserver/xenadmin/pull/2037#discussion_r181697254"},"pull_request":{"href":"https://api.github.com/repos/xenserver/xenadmin/pulls/2037"}},"in_reply_to_id":181690895},"pull_request":{"url":"https://api.github.com/repos/xenserver/xenadmin/pulls/2037","id":181083938,"html_url":"https://github.com/xenserver/xenadmin/pull/2037","diff_url":"https://github.com/xenserver/xenadmin/pull/2037.diff","patch_url":"https://github.com/xenserver/xenadmin/pull/2037.patch","issue_url":"https://api.github.com/repos/xenserver/xenadmin/issues/2037","number":2037,"state":"open","locked":false,"title":"CA-286449: Filter out SR-IOV network when importing OVF","user":{"login":"jishengx","id":29916350,"avatar_url":"https://avatars2.githubusercontent.com/u/29916350?v=4","gravatar_id":"","url":"https://api.github.com/users/jishengx","html_url":"https://github.com/jishengx","followers_url":"https://api.github.com/users/jishengx/followers","following_url":"https://api.github.com/users/jishengx/following{/other_user}","gists_url":"https://api.github.com/users/jishengx/gists{/gist_id}","starred_url":"https://api.github.com/users/jishengx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jishengx/subscriptions","organizations_url":"https://api.github.com/users/jishengx/orgs","repos_url":"https://api.github.com/users/jishengx/repos","events_url":"https://api.github.com/users/jishengx/events{/privacy}","received_events_url":"https://api.github.com/users/jishengx/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-12T03:52:49Z","updated_at":"2018-04-16T11:05:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5db4e49361d93494c592cb9d835ca07561c56b50","assignee":null,"assignees":[],"requested_reviewers":[{"login":"MihaelaStoica","id":4976784,"avatar_url":"https://avatars2.githubusercontent.com/u/4976784?v=4","gravatar_id":"","url":"https://api.github.com/users/MihaelaStoica","html_url":"https://github.com/MihaelaStoica","followers_url":"https://api.github.com/users/MihaelaStoica/followers","following_url":"https://api.github.com/users/MihaelaStoica/following{/other_user}","gists_url":"https://api.github.com/users/MihaelaStoica/gists{/gist_id}","starred_url":"https://api.github.com/users/MihaelaStoica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MihaelaStoica/subscriptions","organizations_url":"https://api.github.com/users/MihaelaStoica/orgs","repos_url":"https://api.github.com/users/MihaelaStoica/repos","events_url":"https://api.github.com/users/MihaelaStoica/events{/privacy}","received_events_url":"https://api.github.com/users/MihaelaStoica/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/xenserver/xenadmin/pulls/2037/commits","review_comments_url":"https://api.github.com/repos/xenserver/xenadmin/pulls/2037/comments","review_comment_url":"https://api.github.com/repos/xenserver/xenadmin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xenserver/xenadmin/issues/2037/comments","statuses_url":"https://api.github.com/repos/xenserver/xenadmin/statuses/530dcfcb5eaa5329f5a17feae09489bed26dfa03","head":{"label":"jishengx:private/jishengx/CA-286449","ref":"private/jishengx/CA-286449","sha":"530dcfcb5eaa5329f5a17feae09489bed26dfa03","user":{"login":"jishengx","id":29916350,"avatar_url":"https://avatars2.githubusercontent.com/u/29916350?v=4","gravatar_id":"","url":"https://api.github.com/users/jishengx","html_url":"https://github.com/jishengx","followers_url":"https://api.github.com/users/jishengx/followers","following_url":"https://api.github.com/users/jishengx/following{/other_user}","gists_url":"https://api.github.com/users/jishengx/gists{/gist_id}","starred_url":"https://api.github.com/users/jishengx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jishengx/subscriptions","organizations_url":"https://api.github.com/users/jishengx/orgs","repos_url":"https://api.github.com/users/jishengx/repos","events_url":"https://api.github.com/users/jishengx/events{/privacy}","received_events_url":"https://api.github.com/users/jishengx/received_events","type":"User","site_admin":false},"repo":{"id":106662161,"name":"xenadmin","full_name":"jishengx/xenadmin","owner":{"login":"jishengx","id":29916350,"avatar_url":"https://avatars2.githubusercontent.com/u/29916350?v=4","gravatar_id":"","url":"https://api.github.com/users/jishengx","html_url":"https://github.com/jishengx","followers_url":"https://api.github.com/users/jishengx/followers","following_url":"https://api.github.com/users/jishengx/following{/other_user}","gists_url":"https://api.github.com/users/jishengx/gists{/gist_id}","starred_url":"https://api.github.com/users/jishengx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jishengx/subscriptions","organizations_url":"https://api.github.com/users/jishengx/orgs","repos_url":"https://api.github.com/users/jishengx/repos","events_url":"https://api.github.com/users/jishengx/events{/privacy}","received_events_url":"https://api.github.com/users/jishengx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jishengx/xenadmin","description":"XenCenter, the Windows management console for XenServer","fork":true,"url":"https://api.github.com/repos/jishengx/xenadmin","forks_url":"https://api.github.com/repos/jishengx/xenadmin/forks","keys_url":"https://api.github.com/repos/jishengx/xenadmin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jishengx/xenadmin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jishengx/xenadmin/teams","hooks_url":"https://api.github.com/repos/jishengx/xenadmin/hooks","issue_events_url":"https://api.github.com/repos/jishengx/xenadmin/issues/events{/number}","events_url":"https://api.github.com/repos/jishengx/xenadmin/events","assignees_url":"https://api.github.com/repos/jishengx/xenadmin/assignees{/user}","branches_url":"https://api.github.com/repos/jishengx/xenadmin/branches{/branch}","tags_url":"https://api.github.com/repos/jishengx/xenadmin/tags","blobs_url":"https://api.github.com/repos/jishengx/xenadmin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jishengx/xenadmin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jishengx/xenadmin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jishengx/xenadmin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jishengx/xenadmin/statuses/{sha}","languages_url":"https://api.github.com/repos/jishengx/xenadmin/languages","stargazers_url":"https://api.github.com/repos/jishengx/xenadmin/stargazers","contributors_url":"https://api.github.com/repos/jishengx/xenadmin/contributors","subscribers_url":"https://api.github.com/repos/jishengx/xenadmin/subscribers","subscription_url":"https://api.github.com/repos/jishengx/xenadmin/subscription","commits_url":"https://api.github.com/repos/jishengx/xenadmin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jishengx/xenadmin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jishengx/xenadmin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jishengx/xenadmin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jishengx/xenadmin/contents/{+path}","compare_url":"https://api.github.com/repos/jishengx/xenadmin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jishengx/xenadmin/merges","archive_url":"https://api.github.com/repos/jishengx/xenadmin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jishengx/xenadmin/downloads","issues_url":"https://api.github.com/repos/jishengx/xenadmin/issues{/number}","pulls_url":"https://api.github.com/repos/jishengx/xenadmin/pulls{/number}","milestones_url":"https://api.github.com/repos/jishengx/xenadmin/milestones{/number}","notifications_url":"https://api.github.com/repos/jishengx/xenadmin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jishengx/xenadmin/labels{/name}","releases_url":"https://api.github.com/repos/jishengx/xenadmin/releases{/id}","deployments_url":"https://api.github.com/repos/jishengx/xenadmin/deployments","created_at":"2017-10-12T07:54:54Z","updated_at":"2017-10-12T07:55:12Z","pushed_at":"2018-04-16T07:28:14Z","git_url":"git://github.com/jishengx/xenadmin.git","ssh_url":"git@github.com:jishengx/xenadmin.git","clone_url":"https://github.com/jishengx/xenadmin.git","svn_url":"https://github.com/jishengx/xenadmin","homepage":"","size":144231,"stargazers_count":0,"watchers_count":0,"language":"C#","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xenserver:master","ref":"master","sha":"0afda30d16af26c94c2a831564fa637f8f05e25a","user":{"login":"xenserver","id":4669806,"avatar_url":"https://avatars0.githubusercontent.com/u/4669806?v=4","gravatar_id":"","url":"https://api.github.com/users/xenserver","html_url":"https://github.com/xenserver","followers_url":"https://api.github.com/users/xenserver/followers","following_url":"https://api.github.com/users/xenserver/following{/other_user}","gists_url":"https://api.github.com/users/xenserver/gists{/gist_id}","starred_url":"https://api.github.com/users/xenserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenserver/subscriptions","organizations_url":"https://api.github.com/users/xenserver/orgs","repos_url":"https://api.github.com/users/xenserver/repos","events_url":"https://api.github.com/users/xenserver/events{/privacy}","received_events_url":"https://api.github.com/users/xenserver/received_events","type":"Organization","site_admin":false},"repo":{"id":10915984,"name":"xenadmin","full_name":"xenserver/xenadmin","owner":{"login":"xenserver","id":4669806,"avatar_url":"https://avatars0.githubusercontent.com/u/4669806?v=4","gravatar_id":"","url":"https://api.github.com/users/xenserver","html_url":"https://github.com/xenserver","followers_url":"https://api.github.com/users/xenserver/followers","following_url":"https://api.github.com/users/xenserver/following{/other_user}","gists_url":"https://api.github.com/users/xenserver/gists{/gist_id}","starred_url":"https://api.github.com/users/xenserver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenserver/subscriptions","organizations_url":"https://api.github.com/users/xenserver/orgs","repos_url":"https://api.github.com/users/xenserver/repos","events_url":"https://api.github.com/users/xenserver/events{/privacy}","received_events_url":"https://api.github.com/users/xenserver/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xenserver/xenadmin","description":"XenCenter, the Windows management console for XenServer","fork":false,"url":"https://api.github.com/repos/xenserver/xenadmin","forks_url":"https://api.github.com/repos/xenserver/xenadmin/forks","keys_url":"https://api.github.com/repos/xenserver/xenadmin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xenserver/xenadmin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xenserver/xenadmin/teams","hooks_url":"https://api.github.com/repos/xenserver/xenadmin/hooks","issue_events_url":"https://api.github.com/repos/xenserver/xenadmin/issues/events{/number}","events_url":"https://api.github.com/repos/xenserver/xenadmin/events","assignees_url":"https://api.github.com/repos/xenserver/xenadmin/assignees{/user}","branches_url":"https://api.github.com/repos/xenserver/xenadmin/branches{/branch}","tags_url":"https://api.github.com/repos/xenserver/xenadmin/tags","blobs_url":"https://api.github.com/repos/xenserver/xenadmin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xenserver/xenadmin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xenserver/xenadmin/git/refs{/sha}","trees_url":"https://api.github.com/repos/xenserver/xenadmin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xenserver/xenadmin/statuses/{sha}","languages_url":"https://api.github.com/repos/xenserver/xenadmin/languages","stargazers_url":"https://api.github.com/repos/xenserver/xenadmin/stargazers","contributors_url":"https://api.github.com/repos/xenserver/xenadmin/contributors","subscribers_url":"https://api.github.com/repos/xenserver/xenadmin/subscribers","subscription_url":"https://api.github.com/repos/xenserver/xenadmin/subscription","commits_url":"https://api.github.com/repos/xenserver/xenadmin/commits{/sha}","git_commits_url":"https://api.github.com/repos/xenserver/xenadmin/git/commits{/sha}","comments_url":"https://api.github.com/repos/xenserver/xenadmin/comments{/number}","issue_comment_url":"https://api.github.com/repos/xenserver/xenadmin/issues/comments{/number}","contents_url":"https://api.github.com/repos/xenserver/xenadmin/contents/{+path}","compare_url":"https://api.github.com/repos/xenserver/xenadmin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xenserver/xenadmin/merges","archive_url":"https://api.github.com/repos/xenserver/xenadmin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xenserver/xenadmin/downloads","issues_url":"https://api.github.com/repos/xenserver/xenadmin/issues{/number}","pulls_url":"https://api.github.com/repos/xenserver/xenadmin/pulls{/number}","milestones_url":"https://api.github.com/repos/xenserver/xenadmin/milestones{/number}","notifications_url":"https://api.github.com/repos/xenserver/xenadmin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xenserver/xenadmin/labels{/name}","releases_url":"https://api.github.com/repos/xenserver/xenadmin/releases{/id}","deployments_url":"https://api.github.com/repos/xenserver/xenadmin/deployments","created_at":"2013-06-24T18:10:24Z","updated_at":"2018-04-13T08:53:24Z","pushed_at":"2018-04-16T10:49:38Z","git_url":"git://github.com/xenserver/xenadmin.git","ssh_url":"git@github.com:xenserver/xenadmin.git","clone_url":"https://github.com/xenserver/xenadmin.git","svn_url":"https://github.com/xenserver/xenadmin","homepage":"","size":148047,"stargazers_count":158,"watchers_count":158,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":129,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"bsd-2-clause","name":"BSD 2-Clause \"Simplified\" License","spdx_id":"BSD-2-Clause","url":"https://api.github.com/licenses/bsd-2-clause"},"forks":129,"open_issues":12,"watchers":158,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xenserver/xenadmin/pulls/2037"},"html":{"href":"https://github.com/xenserver/xenadmin/pull/2037"},"issue":{"href":"https://api.github.com/repos/xenserver/xenadmin/issues/2037"},"comments":{"href":"https://api.github.com/repos/xenserver/xenadmin/issues/2037/comments"},"review_comments":{"href":"https://api.github.com/repos/xenserver/xenadmin/pulls/2037/comments"},"review_comment":{"href":"https://api.github.com/repos/xenserver/xenadmin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xenserver/xenadmin/pulls/2037/commits"},"statuses":{"href":"https://api.github.com/repos/xenserver/xenadmin/statuses/530dcfcb5eaa5329f5a17feae09489bed26dfa03"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"MihaelaStoica"}}