{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/comments/209569483","pull_request_review_id":145605592,"id":209569483,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTU2OTQ4Mw==","diff_hunk":"@@ -111,6 +111,43 @@ def test_provision(request, appliance, provider, provision_data):\n     assert found_vms, 'VM `{}` not found'.format(vm_name)\n \n \n+@pytest.mark.rhv2\n+@pytest.mark.uncollectif(lambda provider: not provider.one_of(RHEVMProvider),\n+                         reason='These profile names are RHV specific.')\n+@pytest.mark.parametrize('vnic_profile', ['no_vnic_profile', 'specific_vnic_profile'])\n+def test_provision_vlan(request, appliance, provision_data, vnic_profile, provider):\n+    \"\"\"Tests provision via REST API.\n+    Prerequisities:\n+        * Have a provider set up with templates suitable for provisioning.\n+    Steps:\n+        * POST /api/provision_requests (method ``create``) the JSON with provisioning data. The\n+            request is returned.\n+        * Apart from the usual provisioning settings, set vlan\n+          to values <Empty>/profile_name (network_name)\n+        * Query the request by its id until the state turns to ``finished`` or ``provisioned``.\n+    Metadata:\n+        test_flag: rest, provision\n+    \"\"\"\n+    vm_name = provision_data['vm_fields']['vm_name']\n+    if vnic_profile == 'no_vnic_profile':\n+        vnic_profile = '<Empty>'\n+    elif vnic_profile == 'specific_vnic_profile':\n+        vlan_data = provider.data[\"provisioning\"][\"vlan\"]\n+        vnic_profile = '{0} ({0})'.format(vlan_data)\n+    provision_data['vm_fields']['vlan'] = vnic_profile\n+    request.addfinalizer(lambda: clean_vm(appliance, provider, vm_name))\n+    appliance.rest_api.collections.provision_requests.action.create(**provision_data)\n+    assert_response(appliance)\n+    provision_request = appliance.collections.requests.instantiate(description=vm_name,\n+                                                                   partial_check=True)\n+    provision_request.wait_for_request()\n+    msg = \"Provisioning failed with the message {}\".format(\n+        provision_request.rest.message)\n+    assert provision_request.is_succeeded(), msg\n+    found_vms = appliance.rest_api.collections.vms.find_by(name=vm_name)\n+    assert found_vms, 'VM `{}` not found'.format(vm_name)","path":"cfme/tests/infrastructure/test_provisioning_rest.py","position":38,"original_position":38,"commit_id":"3567642d04e5630153300fb21e33b690a34aa61e","original_commit_id":"3567642d04e5630153300fb21e33b690a34aa61e","user":{"login":"rhrazdil","id":32546791,"node_id":"MDQ6VXNlcjMyNTQ2Nzkx","avatar_url":"https://avatars0.githubusercontent.com/u/32546791?v=4","gravatar_id":"","url":"https://api.github.com/users/rhrazdil","html_url":"https://github.com/rhrazdil","followers_url":"https://api.github.com/users/rhrazdil/followers","following_url":"https://api.github.com/users/rhrazdil/following{/other_user}","gists_url":"https://api.github.com/users/rhrazdil/gists{/gist_id}","starred_url":"https://api.github.com/users/rhrazdil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhrazdil/subscriptions","organizations_url":"https://api.github.com/users/rhrazdil/orgs","repos_url":"https://api.github.com/users/rhrazdil/repos","events_url":"https://api.github.com/users/rhrazdil/events{/privacy}","received_events_url":"https://api.github.com/users/rhrazdil/received_events","type":"User","site_admin":false},"body":"@jan-zmeskal I think the problem here is in naming. The `vnic_profile == 'no_vnic_profile'` you mention actually refers to Empty profile (on line 133). Although this profile is called Empty (which I believe means no QoS limitation or qota), it is a profile. Hence there is a NIC. If you create a VM from a template and do not select any profile (not even the Empty one), the created VM won't have a NIC. This is a desired behaviour AFAIK.\r\n\r\nSo I would suggest renaming the `no_vnic_profile` to `empty_vnic_profile`. Additionally, `no_vnic_profile` may be tested by something  like: `vnic_profile = None` or `vnic_profile = '<Use template nics>'` (where both options are effectively the same, so I would prefer the second one for better readability).","created_at":"2018-08-13T11:05:06Z","updated_at":"2018-08-13T11:05:06Z","html_url":"https://github.com/ManageIQ/integration_tests/pull/7619#discussion_r209569483","pull_request_url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/7619","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/comments/209569483"},"html":{"href":"https://github.com/ManageIQ/integration_tests/pull/7619#discussion_r209569483"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/7619"}},"in_reply_to_id":209554116},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/7619","id":207098112,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MDk4MTEy","html_url":"https://github.com/ManageIQ/integration_tests/pull/7619","diff_url":"https://github.com/ManageIQ/integration_tests/pull/7619.diff","patch_url":"https://github.com/ManageIQ/integration_tests/pull/7619.patch","issue_url":"https://api.github.com/repos/ManageIQ/integration_tests/issues/7619","number":7619,"state":"open","locked":false,"title":"[RFR] Expand provision test to check more vlan options for RHV provider","user":{"login":"istein1","id":26868085,"node_id":"MDQ6VXNlcjI2ODY4MDg1","avatar_url":"https://avatars2.githubusercontent.com/u/26868085?v=4","gravatar_id":"","url":"https://api.github.com/users/istein1","html_url":"https://github.com/istein1","followers_url":"https://api.github.com/users/istein1/followers","following_url":"https://api.github.com/users/istein1/following{/other_user}","gists_url":"https://api.github.com/users/istein1/gists{/gist_id}","starred_url":"https://api.github.com/users/istein1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istein1/subscriptions","organizations_url":"https://api.github.com/users/istein1/orgs","repos_url":"https://api.github.com/users/istein1/repos","events_url":"https://api.github.com/users/istein1/events{/privacy}","received_events_url":"https://api.github.com/users/istein1/received_events","type":"User","site_admin":false},"body":"A RHV only addition:\r\nExpanding the provision rest testing, to include RHV vlan added options:\r\n <Empty> & Profile name (network name). \r\n\r\nThis should cover customer Bug 1574351 - prov.set_vlan() method didn't set the vnicprofiles identifier.\r\n\r\nVM provision Rest api, network options, for RHV provider:\r\n1) \"vlan\": \"3a8dce01-dd59-4a46-8a6f-823acccda79f\" (specific vnic profile ID) \r\n    - Not covered yet. \r\n2) \"vlan\": <Empty> (no vNIC profile) \r\n    - Covered in this PR, by 'test_provision_vlan'\r\n3) \"vlan\": <Template> (use template's default vNIC profile) \r\n   - Already covered in existing code, by 'test_provision' \r\n4) \"vlan\": \"profile_name(network_name)\" (Specific vnic profile&network, for example ovirtmgmt (ovirtmgmt)) \r\n   - Covered in this PR, by 'test_provision_vlan'\r\n\r\n\r\n\r\n","created_at":"2018-08-08T18:32:14Z","updated_at":"2018-08-13T11:05:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"509d6f188a03d06bdbd2b709c895ae375b897c86","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":118710104,"node_id":"MDU6TGFiZWwxMTg3MTAxMDQ=","url":"https://api.github.com/repos/ManageIQ/integration_tests/labels/lint-ok","name":"lint-ok","color":"ffffff","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/7619/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/7619/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/integration_tests/issues/7619/comments","statuses_url":"https://api.github.com/repos/ManageIQ/integration_tests/statuses/3567642d04e5630153300fb21e33b690a34aa61e","head":{"label":"istein1:provision_rest_vlan_addition","ref":"provision_rest_vlan_addition","sha":"3567642d04e5630153300fb21e33b690a34aa61e","user":{"login":"istein1","id":26868085,"node_id":"MDQ6VXNlcjI2ODY4MDg1","avatar_url":"https://avatars2.githubusercontent.com/u/26868085?v=4","gravatar_id":"","url":"https://api.github.com/users/istein1","html_url":"https://github.com/istein1","followers_url":"https://api.github.com/users/istein1/followers","following_url":"https://api.github.com/users/istein1/following{/other_user}","gists_url":"https://api.github.com/users/istein1/gists{/gist_id}","starred_url":"https://api.github.com/users/istein1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istein1/subscriptions","organizations_url":"https://api.github.com/users/istein1/orgs","repos_url":"https://api.github.com/users/istein1/repos","events_url":"https://api.github.com/users/istein1/events{/privacy}","received_events_url":"https://api.github.com/users/istein1/received_events","type":"User","site_admin":false},"repo":{"id":93312556,"node_id":"MDEwOlJlcG9zaXRvcnk5MzMxMjU1Ng==","name":"integration_tests","full_name":"istein1/integration_tests","owner":{"login":"istein1","id":26868085,"node_id":"MDQ6VXNlcjI2ODY4MDg1","avatar_url":"https://avatars2.githubusercontent.com/u/26868085?v=4","gravatar_id":"","url":"https://api.github.com/users/istein1","html_url":"https://github.com/istein1","followers_url":"https://api.github.com/users/istein1/followers","following_url":"https://api.github.com/users/istein1/following{/other_user}","gists_url":"https://api.github.com/users/istein1/gists{/gist_id}","starred_url":"https://api.github.com/users/istein1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/istein1/subscriptions","organizations_url":"https://api.github.com/users/istein1/orgs","repos_url":"https://api.github.com/users/istein1/repos","events_url":"https://api.github.com/users/istein1/events{/privacy}","received_events_url":"https://api.github.com/users/istein1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/istein1/integration_tests","description":"ManageIQ integration tests","fork":true,"url":"https://api.github.com/repos/istein1/integration_tests","forks_url":"https://api.github.com/repos/istein1/integration_tests/forks","keys_url":"https://api.github.com/repos/istein1/integration_tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/istein1/integration_tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/istein1/integration_tests/teams","hooks_url":"https://api.github.com/repos/istein1/integration_tests/hooks","issue_events_url":"https://api.github.com/repos/istein1/integration_tests/issues/events{/number}","events_url":"https://api.github.com/repos/istein1/integration_tests/events","assignees_url":"https://api.github.com/repos/istein1/integration_tests/assignees{/user}","branches_url":"https://api.github.com/repos/istein1/integration_tests/branches{/branch}","tags_url":"https://api.github.com/repos/istein1/integration_tests/tags","blobs_url":"https://api.github.com/repos/istein1/integration_tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/istein1/integration_tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/istein1/integration_tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/istein1/integration_tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/istein1/integration_tests/statuses/{sha}","languages_url":"https://api.github.com/repos/istein1/integration_tests/languages","stargazers_url":"https://api.github.com/repos/istein1/integration_tests/stargazers","contributors_url":"https://api.github.com/repos/istein1/integration_tests/contributors","subscribers_url":"https://api.github.com/repos/istein1/integration_tests/subscribers","subscription_url":"https://api.github.com/repos/istein1/integration_tests/subscription","commits_url":"https://api.github.com/repos/istein1/integration_tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/istein1/integration_tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/istein1/integration_tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/istein1/integration_tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/istein1/integration_tests/contents/{+path}","compare_url":"https://api.github.com/repos/istein1/integration_tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/istein1/integration_tests/merges","archive_url":"https://api.github.com/repos/istein1/integration_tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/istein1/integration_tests/downloads","issues_url":"https://api.github.com/repos/istein1/integration_tests/issues{/number}","pulls_url":"https://api.github.com/repos/istein1/integration_tests/pulls{/number}","milestones_url":"https://api.github.com/repos/istein1/integration_tests/milestones{/number}","notifications_url":"https://api.github.com/repos/istein1/integration_tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/istein1/integration_tests/labels{/name}","releases_url":"https://api.github.com/repos/istein1/integration_tests/releases{/id}","deployments_url":"https://api.github.com/repos/istein1/integration_tests/deployments","created_at":"2017-06-04T12:38:29Z","updated_at":"2018-08-08T12:26:42Z","pushed_at":"2018-08-12T07:58:45Z","git_url":"git://github.com/istein1/integration_tests.git","ssh_url":"git@github.com:istein1/integration_tests.git","clone_url":"https://github.com/istein1/integration_tests.git","svn_url":"https://github.com/istein1/integration_tests","homepage":"","size":27833,"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":"ManageIQ:master","ref":"master","sha":"582bb3e202b276200ac8b50351550eaa053fd83c","user":{"login":"ManageIQ","id":1125575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjU1NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":8061086,"node_id":"MDEwOlJlcG9zaXRvcnk4MDYxMDg2","name":"integration_tests","full_name":"ManageIQ/integration_tests","owner":{"login":"ManageIQ","id":1125575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjU1NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/integration_tests","description":"ManageIQ integration tests","fork":false,"url":"https://api.github.com/repos/ManageIQ/integration_tests","forks_url":"https://api.github.com/repos/ManageIQ/integration_tests/forks","keys_url":"https://api.github.com/repos/ManageIQ/integration_tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/integration_tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/integration_tests/teams","hooks_url":"https://api.github.com/repos/ManageIQ/integration_tests/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/integration_tests/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/integration_tests/events","assignees_url":"https://api.github.com/repos/ManageIQ/integration_tests/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/integration_tests/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/integration_tests/tags","blobs_url":"https://api.github.com/repos/ManageIQ/integration_tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/integration_tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/integration_tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/integration_tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/integration_tests/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/integration_tests/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/integration_tests/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/integration_tests/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/integration_tests/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/integration_tests/subscription","commits_url":"https://api.github.com/repos/ManageIQ/integration_tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/integration_tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/integration_tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/integration_tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/integration_tests/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/integration_tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/integration_tests/merges","archive_url":"https://api.github.com/repos/ManageIQ/integration_tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/integration_tests/downloads","issues_url":"https://api.github.com/repos/ManageIQ/integration_tests/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/integration_tests/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/integration_tests/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/integration_tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/integration_tests/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/integration_tests/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/integration_tests/deployments","created_at":"2013-02-06T21:59:17Z","updated_at":"2018-08-10T21:14:08Z","pushed_at":"2018-08-13T10:22:50Z","git_url":"git://github.com/ManageIQ/integration_tests.git","ssh_url":"git@github.com:ManageIQ/integration_tests.git","clone_url":"https://github.com/ManageIQ/integration_tests.git","svn_url":"https://github.com/ManageIQ/integration_tests","homepage":"","size":28033,"stargazers_count":61,"watchers_count":61,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":140,"mirror_url":null,"archived":false,"open_issues_count":171,"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":140,"open_issues":171,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/7619"},"html":{"href":"https://github.com/ManageIQ/integration_tests/pull/7619"},"issue":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/issues/7619"},"comments":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/issues/7619/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/7619/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/pulls/7619/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/integration_tests/statuses/3567642d04e5630153300fb21e33b690a34aa61e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rhrazdil"}}