{"action":"created","comment":{"url":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/comments/89433119","pull_request_review_id":9978355,"id":89433119,"diff_hunk":"@@ -0,0 +1,49 @@\n+#\n+# Author:: Scott Williams (<scott@backups.net.au>)\n+# License:: Apache License, Version 2.0\n+#\n+require 'chef/knife'\n+require 'chef/knife/base_vsphere_command'\n+require 'rbvmomi'\n+require 'netaddr'\n+\n+class Chef::Knife::VsphereVmNetworkList < Chef::Knife::BaseVsphereCommand\n+  banner 'knife vsphere vm network list VMNAME'\n+\n+  common_options\n+\n+  def run\n+    $stdout.sync = true\n+\n+    vmname = @name_args[0]\n+    if vmname.nil?\n+      show_usage\n+      fatal_exit('You must specify a virtual machine name')\n+    end\n+\n+    vim_connection\n+    dc = datacenter\n+    folder = find_folder(get_config(:folder)) || dc.vmFolder\n+    vm = traverse_folders_for_vm(folder, vmname) || abort(\"VM #{vmname} not found\")\n+\n+\n+    vm.config.hardware.device.each.grep(RbVmomi::VIM::VirtualEthernetCard) do |a|\n+\n+      backing = a.backing","path":"lib/chef/knife/vsphere_vm_network_list.rb","position":32,"original_position":32,"commit_id":"e3ae5ecb0cdf08f470aadfad6c74b339be0ffdfe","original_commit_id":"e3ae5ecb0cdf08f470aadfad6c74b339be0ffdfe","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Useless assignment to variable - backing.","created_at":"2016-11-24T04:00:55Z","updated_at":"2016-11-24T04:00:55Z","html_url":"https://github.com/chef-partners/knife-vsphere/pull/320#discussion_r89433119","pull_request_url":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/320","_links":{"self":{"href":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/comments/89433119"},"html":{"href":"https://github.com/chef-partners/knife-vsphere/pull/320#discussion_r89433119"},"pull_request":{"href":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/320"}}},"pull_request":{"url":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/320","id":95114284,"html_url":"https://github.com/chef-partners/knife-vsphere/pull/320","diff_url":"https://github.com/chef-partners/knife-vsphere/pull/320.diff","patch_url":"https://github.com/chef-partners/knife-vsphere/pull/320.patch","issue_url":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/320","number":320,"state":"open","locked":false,"title":"vm network list initial upload","user":{"login":"coda4096","id":8097631,"avatar_url":"https://avatars.githubusercontent.com/u/8097631?v=3","gravatar_id":"","url":"https://api.github.com/users/coda4096","html_url":"https://github.com/coda4096","followers_url":"https://api.github.com/users/coda4096/followers","following_url":"https://api.github.com/users/coda4096/following{/other_user}","gists_url":"https://api.github.com/users/coda4096/gists{/gist_id}","starred_url":"https://api.github.com/users/coda4096/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coda4096/subscriptions","organizations_url":"https://api.github.com/users/coda4096/orgs","repos_url":"https://api.github.com/users/coda4096/repos","events_url":"https://api.github.com/users/coda4096/events{/privacy}","received_events_url":"https://api.github.com/users/coda4096/received_events","type":"User","site_admin":false},"body":"knife vsphere vm network list VMNAME\r\n\r\nfor a vm (VMNAME), list its network cards and for each network card, list its connected network (vlan)\r\n\r\ncurrently not working.\r\n\r\nI need some help with listing the networks that a NIC is connected to.","created_at":"2016-11-24T04:00:48Z","updated_at":"2016-11-24T04:00:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6fc7983b4f6627d52c5236bd6a64bf8efa8e4418","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/320/commits","review_comments_url":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/320/comments","review_comment_url":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/320/comments","statuses_url":"https://api.github.com/repos/chef-partners/knife-vsphere/statuses/e3ae5ecb0cdf08f470aadfad6c74b339be0ffdfe","head":{"label":"coda4096:network_list","ref":"network_list","sha":"e3ae5ecb0cdf08f470aadfad6c74b339be0ffdfe","user":{"login":"coda4096","id":8097631,"avatar_url":"https://avatars.githubusercontent.com/u/8097631?v=3","gravatar_id":"","url":"https://api.github.com/users/coda4096","html_url":"https://github.com/coda4096","followers_url":"https://api.github.com/users/coda4096/followers","following_url":"https://api.github.com/users/coda4096/following{/other_user}","gists_url":"https://api.github.com/users/coda4096/gists{/gist_id}","starred_url":"https://api.github.com/users/coda4096/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coda4096/subscriptions","organizations_url":"https://api.github.com/users/coda4096/orgs","repos_url":"https://api.github.com/users/coda4096/repos","events_url":"https://api.github.com/users/coda4096/events{/privacy}","received_events_url":"https://api.github.com/users/coda4096/received_events","type":"User","site_admin":false},"repo":{"id":74634012,"name":"knife-vsphere","full_name":"coda4096/knife-vsphere","owner":{"login":"coda4096","id":8097631,"avatar_url":"https://avatars.githubusercontent.com/u/8097631?v=3","gravatar_id":"","url":"https://api.github.com/users/coda4096","html_url":"https://github.com/coda4096","followers_url":"https://api.github.com/users/coda4096/followers","following_url":"https://api.github.com/users/coda4096/following{/other_user}","gists_url":"https://api.github.com/users/coda4096/gists{/gist_id}","starred_url":"https://api.github.com/users/coda4096/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coda4096/subscriptions","organizations_url":"https://api.github.com/users/coda4096/orgs","repos_url":"https://api.github.com/users/coda4096/repos","events_url":"https://api.github.com/users/coda4096/events{/privacy}","received_events_url":"https://api.github.com/users/coda4096/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/coda4096/knife-vsphere","description":"VMware vSphere support for Chef Knife","fork":true,"url":"https://api.github.com/repos/coda4096/knife-vsphere","forks_url":"https://api.github.com/repos/coda4096/knife-vsphere/forks","keys_url":"https://api.github.com/repos/coda4096/knife-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coda4096/knife-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coda4096/knife-vsphere/teams","hooks_url":"https://api.github.com/repos/coda4096/knife-vsphere/hooks","issue_events_url":"https://api.github.com/repos/coda4096/knife-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/coda4096/knife-vsphere/events","assignees_url":"https://api.github.com/repos/coda4096/knife-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/coda4096/knife-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/coda4096/knife-vsphere/tags","blobs_url":"https://api.github.com/repos/coda4096/knife-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coda4096/knife-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coda4096/knife-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/coda4096/knife-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coda4096/knife-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/coda4096/knife-vsphere/languages","stargazers_url":"https://api.github.com/repos/coda4096/knife-vsphere/stargazers","contributors_url":"https://api.github.com/repos/coda4096/knife-vsphere/contributors","subscribers_url":"https://api.github.com/repos/coda4096/knife-vsphere/subscribers","subscription_url":"https://api.github.com/repos/coda4096/knife-vsphere/subscription","commits_url":"https://api.github.com/repos/coda4096/knife-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/coda4096/knife-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/coda4096/knife-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/coda4096/knife-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/coda4096/knife-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/coda4096/knife-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coda4096/knife-vsphere/merges","archive_url":"https://api.github.com/repos/coda4096/knife-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coda4096/knife-vsphere/downloads","issues_url":"https://api.github.com/repos/coda4096/knife-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/coda4096/knife-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/coda4096/knife-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/coda4096/knife-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coda4096/knife-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/coda4096/knife-vsphere/releases{/id}","deployments_url":"https://api.github.com/repos/coda4096/knife-vsphere/deployments","created_at":"2016-11-24T03:16:07Z","updated_at":"2016-11-24T03:16:08Z","pushed_at":"2016-11-24T03:55:52Z","git_url":"git://github.com/coda4096/knife-vsphere.git","ssh_url":"git@github.com:coda4096/knife-vsphere.git","clone_url":"https://github.com/coda4096/knife-vsphere.git","svn_url":"https://github.com/coda4096/knife-vsphere","homepage":"","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":"chef-partners:master","ref":"master","sha":"11aa06cf023afc4589f8025099b079c38f4d57cf","user":{"login":"chef-partners","id":6988876,"avatar_url":"https://avatars.githubusercontent.com/u/6988876?v=3","gravatar_id":"","url":"https://api.github.com/users/chef-partners","html_url":"https://github.com/chef-partners","followers_url":"https://api.github.com/users/chef-partners/followers","following_url":"https://api.github.com/users/chef-partners/following{/other_user}","gists_url":"https://api.github.com/users/chef-partners/gists{/gist_id}","starred_url":"https://api.github.com/users/chef-partners/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef-partners/subscriptions","organizations_url":"https://api.github.com/users/chef-partners/orgs","repos_url":"https://api.github.com/users/chef-partners/repos","events_url":"https://api.github.com/users/chef-partners/events{/privacy}","received_events_url":"https://api.github.com/users/chef-partners/received_events","type":"Organization","site_admin":false},"repo":{"id":1974414,"name":"knife-vsphere","full_name":"chef-partners/knife-vsphere","owner":{"login":"chef-partners","id":6988876,"avatar_url":"https://avatars.githubusercontent.com/u/6988876?v=3","gravatar_id":"","url":"https://api.github.com/users/chef-partners","html_url":"https://github.com/chef-partners","followers_url":"https://api.github.com/users/chef-partners/followers","following_url":"https://api.github.com/users/chef-partners/following{/other_user}","gists_url":"https://api.github.com/users/chef-partners/gists{/gist_id}","starred_url":"https://api.github.com/users/chef-partners/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef-partners/subscriptions","organizations_url":"https://api.github.com/users/chef-partners/orgs","repos_url":"https://api.github.com/users/chef-partners/repos","events_url":"https://api.github.com/users/chef-partners/events{/privacy}","received_events_url":"https://api.github.com/users/chef-partners/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chef-partners/knife-vsphere","description":"VMware vSphere support for Chef Knife","fork":false,"url":"https://api.github.com/repos/chef-partners/knife-vsphere","forks_url":"https://api.github.com/repos/chef-partners/knife-vsphere/forks","keys_url":"https://api.github.com/repos/chef-partners/knife-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chef-partners/knife-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chef-partners/knife-vsphere/teams","hooks_url":"https://api.github.com/repos/chef-partners/knife-vsphere/hooks","issue_events_url":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/chef-partners/knife-vsphere/events","assignees_url":"https://api.github.com/repos/chef-partners/knife-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/chef-partners/knife-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/chef-partners/knife-vsphere/tags","blobs_url":"https://api.github.com/repos/chef-partners/knife-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chef-partners/knife-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chef-partners/knife-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/chef-partners/knife-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chef-partners/knife-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/chef-partners/knife-vsphere/languages","stargazers_url":"https://api.github.com/repos/chef-partners/knife-vsphere/stargazers","contributors_url":"https://api.github.com/repos/chef-partners/knife-vsphere/contributors","subscribers_url":"https://api.github.com/repos/chef-partners/knife-vsphere/subscribers","subscription_url":"https://api.github.com/repos/chef-partners/knife-vsphere/subscription","commits_url":"https://api.github.com/repos/chef-partners/knife-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/chef-partners/knife-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/chef-partners/knife-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/chef-partners/knife-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/chef-partners/knife-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chef-partners/knife-vsphere/merges","archive_url":"https://api.github.com/repos/chef-partners/knife-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chef-partners/knife-vsphere/downloads","issues_url":"https://api.github.com/repos/chef-partners/knife-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/chef-partners/knife-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/chef-partners/knife-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chef-partners/knife-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/chef-partners/knife-vsphere/releases{/id}","deployments_url":"https://api.github.com/repos/chef-partners/knife-vsphere/deployments","created_at":"2011-06-29T19:52:01Z","updated_at":"2016-11-17T00:20:11Z","pushed_at":"2016-11-24T04:00:48Z","git_url":"git://github.com/chef-partners/knife-vsphere.git","ssh_url":"git@github.com:chef-partners/knife-vsphere.git","clone_url":"https://github.com/chef-partners/knife-vsphere.git","svn_url":"https://github.com/chef-partners/knife-vsphere","homepage":"","size":827,"stargazers_count":159,"watchers_count":159,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":109,"mirror_url":null,"open_issues_count":22,"forks":109,"open_issues":22,"watchers":159,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/320"},"html":{"href":"https://github.com/chef-partners/knife-vsphere/pull/320"},"issue":{"href":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/320"},"comments":{"href":"https://api.github.com/repos/chef-partners/knife-vsphere/issues/320/comments"},"review_comments":{"href":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/320/comments"},"review_comment":{"href":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chef-partners/knife-vsphere/pulls/320/commits"},"statuses":{"href":"https://api.github.com/repos/chef-partners/knife-vsphere/statuses/e3ae5ecb0cdf08f470aadfad6c74b339be0ffdfe"}}}}
{"actor":{"display_login":"houndci-bot"}}