{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/powernsx/pulls/comments/211118299","pull_request_review_id":147473932,"id":211118299,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTExODI5OQ==","diff_hunk":"@@ -28,20 +28,38 @@ Describe -Name \"SecurityTagAssignment\" -Tag \"Get\" -Fixture {\n         #We load the mod and establish connection to NSX Manager here.\n \n         #Put any setup tasks in here that are required to perform your tests.  Typical defaults:\n+        Write-Verbose -Verbose \"Performing setup tasks for SecurityTag tests\"\n         Import-Module $pnsxmodule\n         $script:DefaultNsxConnection = Connect-NsxServer -vCenterServer $PNSXTestVC -NsxServerHint $PNSXTestNSX -Credential $PNSXTestDefViCred -ViWarningAction \"Ignore\"\n \n+        ## GUID to use as suffix for some temporary vSphere/NSX objects, so as to prevent any naming conflict with existing objects\n+        $strSuffixGuid = [System.Guid]::NewGuid().Guid.Replace(\"-\",\"\")","path":"tests/integration/17.SecurityTag.Tests.ps1","position":null,"original_position":9,"commit_id":"35d744e2cacae0b09e4586c0f96c61bc9c663113","original_commit_id":"3f6cff72efd714b207252d860926dac751387604","user":{"login":"mtboren","id":5177629,"node_id":"MDQ6VXNlcjUxNzc2Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/5177629?v=4","gravatar_id":"","url":"https://api.github.com/users/mtboren","html_url":"https://github.com/mtboren","followers_url":"https://api.github.com/users/mtboren/followers","following_url":"https://api.github.com/users/mtboren/following{/other_user}","gists_url":"https://api.github.com/users/mtboren/gists{/gist_id}","starred_url":"https://api.github.com/users/mtboren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtboren/subscriptions","organizations_url":"https://api.github.com/users/mtboren/orgs","repos_url":"https://api.github.com/users/mtboren/repos","events_url":"https://api.github.com/users/mtboren/events{/privacy}","received_events_url":"https://api.github.com/users/mtboren/received_events","type":"User","site_admin":false},"body":"Howdy-  We could, if we want to leave a chance for object naming collision (although, granted, it would still be fairly improbable that a collision would happen even with just the prefix).  I added the GUID suffix to drive the possibility of naming collision closer to zero.  If a lower chance of collision is better, we could update other test suites at some point to also employ a GUID suffix.","created_at":"2018-08-19T23:03:38Z","updated_at":"2018-08-19T23:03:38Z","html_url":"https://github.com/vmware/powernsx/pull/545#discussion_r211118299","pull_request_url":"https://api.github.com/repos/vmware/powernsx/pulls/545","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/vmware/powernsx/pulls/comments/211118299"},"html":{"href":"https://github.com/vmware/powernsx/pull/545#discussion_r211118299"},"pull_request":{"href":"https://api.github.com/repos/vmware/powernsx/pulls/545"}},"in_reply_to_id":211083532},"pull_request":{"url":"https://api.github.com/repos/vmware/powernsx/pulls/545","id":208091353,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MDkxMzUz","html_url":"https://github.com/vmware/powernsx/pull/545","diff_url":"https://github.com/vmware/powernsx/pull/545.diff","patch_url":"https://github.com/vmware/powernsx/pull/545.patch","issue_url":"https://api.github.com/repos/vmware/powernsx/issues/545","number":545,"state":"open","locked":false,"title":"optimize Get-NsxSecurityTagAssignment per #541","user":{"login":"mtboren","id":5177629,"node_id":"MDQ6VXNlcjUxNzc2Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/5177629?v=4","gravatar_id":"","url":"https://api.github.com/users/mtboren","html_url":"https://github.com/mtboren","followers_url":"https://api.github.com/users/mtboren/followers","following_url":"https://api.github.com/users/mtboren/following{/other_user}","gists_url":"https://api.github.com/users/mtboren/gists{/gist_id}","starred_url":"https://api.github.com/users/mtboren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtboren/subscriptions","organizations_url":"https://api.github.com/users/mtboren/orgs","repos_url":"https://api.github.com/users/mtboren/repos","events_url":"https://api.github.com/users/mtboren/events{/privacy}","received_events_url":"https://api.github.com/users/mtboren/received_events","type":"User","site_admin":false},"body":"Updated the `VirtualMachine` parameterset code for getting assigned NSX Security Tags by VM:\r\n- uses GET method `/api/2.0/services/securitytags/vm/{vmId}` that came with NSX v6.3.0\r\n- still returns one object per assigned Security Tag (or `$null` if no tags assigned to given VM)\r\n- nice performance bump in test environment of 8,000 VMs and ~40 security tags; for getting assigned tag for one VM:\r\n    - took ~7 minutes (424.6290539 seconds) with know-to-be-less-than-optimal method\r\n    - took ~1 second with updated method\r\n","created_at":"2018-08-13T20:18:05Z","updated_at":"2018-08-19T23:03:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6953b801f1b4c3609cab8a4a567109ff324fcd0d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/powernsx/pulls/545/commits","review_comments_url":"https://api.github.com/repos/vmware/powernsx/pulls/545/comments","review_comment_url":"https://api.github.com/repos/vmware/powernsx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/powernsx/issues/545/comments","statuses_url":"https://api.github.com/repos/vmware/powernsx/statuses/35d744e2cacae0b09e4586c0f96c61bc9c663113","head":{"label":"mtboren:master","ref":"master","sha":"35d744e2cacae0b09e4586c0f96c61bc9c663113","user":{"login":"mtboren","id":5177629,"node_id":"MDQ6VXNlcjUxNzc2Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/5177629?v=4","gravatar_id":"","url":"https://api.github.com/users/mtboren","html_url":"https://github.com/mtboren","followers_url":"https://api.github.com/users/mtboren/followers","following_url":"https://api.github.com/users/mtboren/following{/other_user}","gists_url":"https://api.github.com/users/mtboren/gists{/gist_id}","starred_url":"https://api.github.com/users/mtboren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtboren/subscriptions","organizations_url":"https://api.github.com/users/mtboren/orgs","repos_url":"https://api.github.com/users/mtboren/repos","events_url":"https://api.github.com/users/mtboren/events{/privacy}","received_events_url":"https://api.github.com/users/mtboren/received_events","type":"User","site_admin":false},"repo":{"id":144614465,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ2MTQ0NjU=","name":"powernsx_fork","full_name":"mtboren/powernsx_fork","owner":{"login":"mtboren","id":5177629,"node_id":"MDQ6VXNlcjUxNzc2Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/5177629?v=4","gravatar_id":"","url":"https://api.github.com/users/mtboren","html_url":"https://github.com/mtboren","followers_url":"https://api.github.com/users/mtboren/followers","following_url":"https://api.github.com/users/mtboren/following{/other_user}","gists_url":"https://api.github.com/users/mtboren/gists{/gist_id}","starred_url":"https://api.github.com/users/mtboren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtboren/subscriptions","organizations_url":"https://api.github.com/users/mtboren/orgs","repos_url":"https://api.github.com/users/mtboren/repos","events_url":"https://api.github.com/users/mtboren/events{/privacy}","received_events_url":"https://api.github.com/users/mtboren/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mtboren/powernsx_fork","description":"PowerShell module that abstracts the VMware NSX-v API to a set of easily used PowerShell functions","fork":true,"url":"https://api.github.com/repos/mtboren/powernsx_fork","forks_url":"https://api.github.com/repos/mtboren/powernsx_fork/forks","keys_url":"https://api.github.com/repos/mtboren/powernsx_fork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mtboren/powernsx_fork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mtboren/powernsx_fork/teams","hooks_url":"https://api.github.com/repos/mtboren/powernsx_fork/hooks","issue_events_url":"https://api.github.com/repos/mtboren/powernsx_fork/issues/events{/number}","events_url":"https://api.github.com/repos/mtboren/powernsx_fork/events","assignees_url":"https://api.github.com/repos/mtboren/powernsx_fork/assignees{/user}","branches_url":"https://api.github.com/repos/mtboren/powernsx_fork/branches{/branch}","tags_url":"https://api.github.com/repos/mtboren/powernsx_fork/tags","blobs_url":"https://api.github.com/repos/mtboren/powernsx_fork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mtboren/powernsx_fork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mtboren/powernsx_fork/git/refs{/sha}","trees_url":"https://api.github.com/repos/mtboren/powernsx_fork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mtboren/powernsx_fork/statuses/{sha}","languages_url":"https://api.github.com/repos/mtboren/powernsx_fork/languages","stargazers_url":"https://api.github.com/repos/mtboren/powernsx_fork/stargazers","contributors_url":"https://api.github.com/repos/mtboren/powernsx_fork/contributors","subscribers_url":"https://api.github.com/repos/mtboren/powernsx_fork/subscribers","subscription_url":"https://api.github.com/repos/mtboren/powernsx_fork/subscription","commits_url":"https://api.github.com/repos/mtboren/powernsx_fork/commits{/sha}","git_commits_url":"https://api.github.com/repos/mtboren/powernsx_fork/git/commits{/sha}","comments_url":"https://api.github.com/repos/mtboren/powernsx_fork/comments{/number}","issue_comment_url":"https://api.github.com/repos/mtboren/powernsx_fork/issues/comments{/number}","contents_url":"https://api.github.com/repos/mtboren/powernsx_fork/contents/{+path}","compare_url":"https://api.github.com/repos/mtboren/powernsx_fork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mtboren/powernsx_fork/merges","archive_url":"https://api.github.com/repos/mtboren/powernsx_fork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mtboren/powernsx_fork/downloads","issues_url":"https://api.github.com/repos/mtboren/powernsx_fork/issues{/number}","pulls_url":"https://api.github.com/repos/mtboren/powernsx_fork/pulls{/number}","milestones_url":"https://api.github.com/repos/mtboren/powernsx_fork/milestones{/number}","notifications_url":"https://api.github.com/repos/mtboren/powernsx_fork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mtboren/powernsx_fork/labels{/name}","releases_url":"https://api.github.com/repos/mtboren/powernsx_fork/releases{/id}","deployments_url":"https://api.github.com/repos/mtboren/powernsx_fork/deployments","created_at":"2018-08-13T17:50:33Z","updated_at":"2018-08-18T17:21:48Z","pushed_at":"2018-08-18T17:21:47Z","git_url":"git://github.com/mtboren/powernsx_fork.git","ssh_url":"git@github.com:mtboren/powernsx_fork.git","clone_url":"https://github.com/mtboren/powernsx_fork.git","svn_url":"https://github.com/mtboren/powernsx_fork","homepage":null,"size":6507,"stargazers_count":0,"watchers_count":0,"language":"PowerShell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"vmware:master","ref":"master","sha":"dc8f003964636b16821e06c165cd25fbfdca42ba","user":{"login":"vmware","id":473334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzMzNA==","avatar_url":"https://avatars0.githubusercontent.com/u/473334?v=4","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":65896161,"node_id":"MDEwOlJlcG9zaXRvcnk2NTg5NjE2MQ==","name":"powernsx","full_name":"vmware/powernsx","owner":{"login":"vmware","id":473334,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzMzNA==","avatar_url":"https://avatars0.githubusercontent.com/u/473334?v=4","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/powernsx","description":"PowerShell module that abstracts the VMware NSX-v API to a set of easily used PowerShell functions","fork":false,"url":"https://api.github.com/repos/vmware/powernsx","forks_url":"https://api.github.com/repos/vmware/powernsx/forks","keys_url":"https://api.github.com/repos/vmware/powernsx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/powernsx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/powernsx/teams","hooks_url":"https://api.github.com/repos/vmware/powernsx/hooks","issue_events_url":"https://api.github.com/repos/vmware/powernsx/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/powernsx/events","assignees_url":"https://api.github.com/repos/vmware/powernsx/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/powernsx/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/powernsx/tags","blobs_url":"https://api.github.com/repos/vmware/powernsx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/powernsx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/powernsx/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/powernsx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/powernsx/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/powernsx/languages","stargazers_url":"https://api.github.com/repos/vmware/powernsx/stargazers","contributors_url":"https://api.github.com/repos/vmware/powernsx/contributors","subscribers_url":"https://api.github.com/repos/vmware/powernsx/subscribers","subscription_url":"https://api.github.com/repos/vmware/powernsx/subscription","commits_url":"https://api.github.com/repos/vmware/powernsx/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/powernsx/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/powernsx/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/powernsx/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/powernsx/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/powernsx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/powernsx/merges","archive_url":"https://api.github.com/repos/vmware/powernsx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/powernsx/downloads","issues_url":"https://api.github.com/repos/vmware/powernsx/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/powernsx/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/powernsx/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/powernsx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/powernsx/labels{/name}","releases_url":"https://api.github.com/repos/vmware/powernsx/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/powernsx/deployments","created_at":"2016-08-17T09:49:35Z","updated_at":"2018-08-13T03:22:06Z","pushed_at":"2018-08-18T19:03:40Z","git_url":"git://github.com/vmware/powernsx.git","ssh_url":"git@github.com:vmware/powernsx.git","clone_url":"https://github.com/vmware/powernsx.git","svn_url":"https://github.com/vmware/powernsx","homepage":null,"size":6500,"stargazers_count":120,"watchers_count":120,"language":"PowerShell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":71,"mirror_url":null,"archived":false,"open_issues_count":101,"license":null,"forks":71,"open_issues":101,"watchers":120,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/powernsx/pulls/545"},"html":{"href":"https://github.com/vmware/powernsx/pull/545"},"issue":{"href":"https://api.github.com/repos/vmware/powernsx/issues/545"},"comments":{"href":"https://api.github.com/repos/vmware/powernsx/issues/545/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/powernsx/pulls/545/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/powernsx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/powernsx/pulls/545/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/powernsx/statuses/35d744e2cacae0b09e4586c0f96c61bc9c663113"}},"author_association":"NONE"}}
{"actor":{"display_login":"mtboren"}}