{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/vic/pulls/comments/119421661","pull_request_review_id":41300057,"id":119421661,"diff_hunk":"@@ -0,0 +1,108 @@\n+// Copyright 2017 VMware, Inc. All Rights Reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+//    http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+package plugin7\n+\n+import (\n+\t\"context\"\n+\t\"fmt\"\n+\t\"strings\"\n+\n+\tlog \"github.com/Sirupsen/logrus\"\n+\n+\t\"github.com/vmware/vic/lib/migration/errors\"\n+\t\"github.com/vmware/vic/lib/migration/feature\"\n+\t\"github.com/vmware/vic/lib/migration/manager\"\n+\t\"github.com/vmware/vic/pkg/trace\"\n+\t\"github.com/vmware/vic/pkg/vsphere/extraconfig\"\n+\t\"github.com/vmware/vic/pkg/vsphere/session\"\n+)\n+\n+// Translates the proxy environment variables from the old appliance to the new appliance for vic admin\n+const (\n+\ttarget      = manager.ApplianceConfigure\n+\toldHProxy   = \"HTTP_PROXY\"\n+\tnewHProxy   = \"VICADMIN_HTTP_PROXY\"\n+\toldSProxy   = \"HTTPS_PROXY\"\n+\tnewSProxy   = \"VICADMIN_HTTPS_PROXY\"\n+\tsessionName = \"vicadmin\"\n+)\n+\n+func init() {\n+\tdefer trace.End(trace.Begin(fmt.Sprintf(\"Registering plugin %s:%d\", target, feature.VicadminProxyVarRenameVersion)))\n+\tif err := manager.Migrator.Register(feature.VicadminProxyVarRenameVersion, target, &VicadminProxyVarRename{}); err != nil {\n+\t\tlog.Errorf(\"Failed to register plugin %s:%d, %s\", target, feature.VicadminProxyVarRenameVersion, err)\n+\t}\n+}\n+\n+// VicadminProxyVarRename is plugin for vic 0.8.0-GA version upgrade\n+type VicadminProxyVarRename struct {\n+}\n+\n+type VCHConfig struct {\n+\tExecutorConfig `vic:\"0.1\" scope:\"read-only\" key:\"init\"`\n+}\n+\n+type ExecutorConfig struct {\n+\tSessions map[string]*SessionConfig `vic:\"0.1\" scope:\"read-only\" key:\"sessions\"`\n+}\n+\n+type SessionConfig struct {\n+\tCmd Cmd `vic:\"0.1\" scope:\"read-only\" key:\"cmd\"`\n+}\n+\n+type Cmd struct {\n+\tEnv []string `vic:\"0.1\" scope:\"read-only\" key:\"Env\"`\n+}\n+\n+func (p *VicadminProxyVarRename) Migrate(ctx context.Context, s *session.Session, data interface{}) error {\n+\tdefer trace.End(trace.Begin(fmt.Sprintf(\"%d\", feature.VicadminProxyVarRenameVersion)))\n+\tif data == nil {\n+\t\treturn nil\n+\t}\n+\tmapData := data.(map[string]string)\n+\toldStruct := &VCHConfig{}\n+\tresult := extraconfig.Decode(extraconfig.MapSource(mapData), oldStruct)\n+\tif result == nil {\n+\t\treturn &errors.DecodeError{}\n+\t}\n+\t//translate old proxy env var keys into to proxy env var keys\n+","path":"lib/migration/plugins/plugin7/vicadminProxyVarRename.go","position":81,"original_position":81,"commit_id":"6b5560717b1ecb50d6a94a3dc5e05559b372c71c","original_commit_id":"6b5560717b1ecb50d6a94a3dc5e05559b372c71c","user":{"login":"jzt","id":128130,"avatar_url":"https://avatars3.githubusercontent.com/u/128130?v=3","gravatar_id":"","url":"https://api.github.com/users/jzt","html_url":"https://github.com/jzt","followers_url":"https://api.github.com/users/jzt/followers","following_url":"https://api.github.com/users/jzt/following{/other_user}","gists_url":"https://api.github.com/users/jzt/gists{/gist_id}","starred_url":"https://api.github.com/users/jzt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzt/subscriptions","organizations_url":"https://api.github.com/users/jzt/orgs","repos_url":"https://api.github.com/users/jzt/repos","events_url":"https://api.github.com/users/jzt/events{/privacy}","received_events_url":"https://api.github.com/users/jzt/received_events","type":"User","site_admin":false},"body":"whitespace looks like it should be on line 80 instead :)","created_at":"2017-05-31T17:29:39Z","updated_at":"2017-05-31T17:29:39Z","html_url":"https://github.com/vmware/vic/pull/5233#discussion_r119421661","pull_request_url":"https://api.github.com/repos/vmware/vic/pulls/5233","_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments/119421661"},"html":{"href":"https://github.com/vmware/vic/pull/5233#discussion_r119421661"},"pull_request":{"href":"https://api.github.com/repos/vmware/vic/pulls/5233"}}},"pull_request":{"url":"https://api.github.com/repos/vmware/vic/pulls/5233","id":122290651,"html_url":"https://github.com/vmware/vic/pull/5233","diff_url":"https://github.com/vmware/vic/pull/5233.diff","patch_url":"https://github.com/vmware/vic/pull/5233.patch","issue_url":"https://api.github.com/repos/vmware/vic/issues/5233","number":5233,"state":"open","locked":false,"title":"4557/proxy vic admin [full ci]","user":{"login":"morris-jason","id":10388115,"avatar_url":"https://avatars3.githubusercontent.com/u/10388115?v=3","gravatar_id":"","url":"https://api.github.com/users/morris-jason","html_url":"https://github.com/morris-jason","followers_url":"https://api.github.com/users/morris-jason/followers","following_url":"https://api.github.com/users/morris-jason/following{/other_user}","gists_url":"https://api.github.com/users/morris-jason/gists{/gist_id}","starred_url":"https://api.github.com/users/morris-jason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morris-jason/subscriptions","organizations_url":"https://api.github.com/users/morris-jason/orgs","repos_url":"https://api.github.com/users/morris-jason/repos","events_url":"https://api.github.com/users/morris-jason/events{/privacy}","received_events_url":"https://api.github.com/users/morris-jason/received_events","type":"User","site_admin":false},"body":"Fixes #4557 \r\n\r\n- Removed HTTP[S]_PROXY env var for vicadmin. It was causing govmomi to attempt connections to vSphere over the proxy.\r\n- WAN Checks now go over the proxy if it exists.","created_at":"2017-05-24T18:11:46Z","updated_at":"2017-05-31T17:29:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41d8cf8994c0e12400d4d913478e4e411ae3a27b","assignee":null,"assignees":[],"requested_reviewers":[{"login":"gigawhitlocks","id":3743903,"avatar_url":"https://avatars0.githubusercontent.com/u/3743903?v=3","gravatar_id":"","url":"https://api.github.com/users/gigawhitlocks","html_url":"https://github.com/gigawhitlocks","followers_url":"https://api.github.com/users/gigawhitlocks/followers","following_url":"https://api.github.com/users/gigawhitlocks/following{/other_user}","gists_url":"https://api.github.com/users/gigawhitlocks/gists{/gist_id}","starred_url":"https://api.github.com/users/gigawhitlocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gigawhitlocks/subscriptions","organizations_url":"https://api.github.com/users/gigawhitlocks/orgs","repos_url":"https://api.github.com/users/gigawhitlocks/repos","events_url":"https://api.github.com/users/gigawhitlocks/events{/privacy}","received_events_url":"https://api.github.com/users/gigawhitlocks/received_events","type":"User","site_admin":false},{"login":"mhagen-vmware","id":19393273,"avatar_url":"https://avatars3.githubusercontent.com/u/19393273?v=3","gravatar_id":"","url":"https://api.github.com/users/mhagen-vmware","html_url":"https://github.com/mhagen-vmware","followers_url":"https://api.github.com/users/mhagen-vmware/followers","following_url":"https://api.github.com/users/mhagen-vmware/following{/other_user}","gists_url":"https://api.github.com/users/mhagen-vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/mhagen-vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhagen-vmware/subscriptions","organizations_url":"https://api.github.com/users/mhagen-vmware/orgs","repos_url":"https://api.github.com/users/mhagen-vmware/repos","events_url":"https://api.github.com/users/mhagen-vmware/events{/privacy}","received_events_url":"https://api.github.com/users/mhagen-vmware/received_events","type":"User","site_admin":false},{"login":"rajanashok","id":21340516,"avatar_url":"https://avatars1.githubusercontent.com/u/21340516?v=3","gravatar_id":"","url":"https://api.github.com/users/rajanashok","html_url":"https://github.com/rajanashok","followers_url":"https://api.github.com/users/rajanashok/followers","following_url":"https://api.github.com/users/rajanashok/following{/other_user}","gists_url":"https://api.github.com/users/rajanashok/gists{/gist_id}","starred_url":"https://api.github.com/users/rajanashok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajanashok/subscriptions","organizations_url":"https://api.github.com/users/rajanashok/orgs","repos_url":"https://api.github.com/users/rajanashok/repos","events_url":"https://api.github.com/users/rajanashok/events{/privacy}","received_events_url":"https://api.github.com/users/rajanashok/received_events","type":"User","site_admin":false},{"login":"rogeliosanchez","id":26554503,"avatar_url":"https://avatars1.githubusercontent.com/u/26554503?v=3","gravatar_id":"","url":"https://api.github.com/users/rogeliosanchez","html_url":"https://github.com/rogeliosanchez","followers_url":"https://api.github.com/users/rogeliosanchez/followers","following_url":"https://api.github.com/users/rogeliosanchez/following{/other_user}","gists_url":"https://api.github.com/users/rogeliosanchez/gists{/gist_id}","starred_url":"https://api.github.com/users/rogeliosanchez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogeliosanchez/subscriptions","organizations_url":"https://api.github.com/users/rogeliosanchez/orgs","repos_url":"https://api.github.com/users/rogeliosanchez/repos","events_url":"https://api.github.com/users/rogeliosanchez/events{/privacy}","received_events_url":"https://api.github.com/users/rogeliosanchez/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/vic/pulls/5233/commits","review_comments_url":"https://api.github.com/repos/vmware/vic/pulls/5233/comments","review_comment_url":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/vic/issues/5233/comments","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/6b5560717b1ecb50d6a94a3dc5e05559b372c71c","head":{"label":"morris-jason:4557/proxy-vic-admin","ref":"4557/proxy-vic-admin","sha":"6b5560717b1ecb50d6a94a3dc5e05559b372c71c","user":{"login":"morris-jason","id":10388115,"avatar_url":"https://avatars3.githubusercontent.com/u/10388115?v=3","gravatar_id":"","url":"https://api.github.com/users/morris-jason","html_url":"https://github.com/morris-jason","followers_url":"https://api.github.com/users/morris-jason/followers","following_url":"https://api.github.com/users/morris-jason/following{/other_user}","gists_url":"https://api.github.com/users/morris-jason/gists{/gist_id}","starred_url":"https://api.github.com/users/morris-jason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morris-jason/subscriptions","organizations_url":"https://api.github.com/users/morris-jason/orgs","repos_url":"https://api.github.com/users/morris-jason/repos","events_url":"https://api.github.com/users/morris-jason/events{/privacy}","received_events_url":"https://api.github.com/users/morris-jason/received_events","type":"User","site_admin":false},"repo":{"id":91376388,"name":"vic","full_name":"morris-jason/vic","owner":{"login":"morris-jason","id":10388115,"avatar_url":"https://avatars3.githubusercontent.com/u/10388115?v=3","gravatar_id":"","url":"https://api.github.com/users/morris-jason","html_url":"https://github.com/morris-jason","followers_url":"https://api.github.com/users/morris-jason/followers","following_url":"https://api.github.com/users/morris-jason/following{/other_user}","gists_url":"https://api.github.com/users/morris-jason/gists{/gist_id}","starred_url":"https://api.github.com/users/morris-jason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morris-jason/subscriptions","organizations_url":"https://api.github.com/users/morris-jason/orgs","repos_url":"https://api.github.com/users/morris-jason/repos","events_url":"https://api.github.com/users/morris-jason/events{/privacy}","received_events_url":"https://api.github.com/users/morris-jason/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/morris-jason/vic","description":"Integrated containers engine on vSphere","fork":true,"url":"https://api.github.com/repos/morris-jason/vic","forks_url":"https://api.github.com/repos/morris-jason/vic/forks","keys_url":"https://api.github.com/repos/morris-jason/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/morris-jason/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/morris-jason/vic/teams","hooks_url":"https://api.github.com/repos/morris-jason/vic/hooks","issue_events_url":"https://api.github.com/repos/morris-jason/vic/issues/events{/number}","events_url":"https://api.github.com/repos/morris-jason/vic/events","assignees_url":"https://api.github.com/repos/morris-jason/vic/assignees{/user}","branches_url":"https://api.github.com/repos/morris-jason/vic/branches{/branch}","tags_url":"https://api.github.com/repos/morris-jason/vic/tags","blobs_url":"https://api.github.com/repos/morris-jason/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/morris-jason/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/morris-jason/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/morris-jason/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/morris-jason/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/morris-jason/vic/languages","stargazers_url":"https://api.github.com/repos/morris-jason/vic/stargazers","contributors_url":"https://api.github.com/repos/morris-jason/vic/contributors","subscribers_url":"https://api.github.com/repos/morris-jason/vic/subscribers","subscription_url":"https://api.github.com/repos/morris-jason/vic/subscription","commits_url":"https://api.github.com/repos/morris-jason/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/morris-jason/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/morris-jason/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/morris-jason/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/morris-jason/vic/contents/{+path}","compare_url":"https://api.github.com/repos/morris-jason/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/morris-jason/vic/merges","archive_url":"https://api.github.com/repos/morris-jason/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/morris-jason/vic/downloads","issues_url":"https://api.github.com/repos/morris-jason/vic/issues{/number}","pulls_url":"https://api.github.com/repos/morris-jason/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/morris-jason/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/morris-jason/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/morris-jason/vic/labels{/name}","releases_url":"https://api.github.com/repos/morris-jason/vic/releases{/id}","deployments_url":"https://api.github.com/repos/morris-jason/vic/deployments","created_at":"2017-05-15T19:24:34Z","updated_at":"2017-05-15T19:24:38Z","pushed_at":"2017-05-31T15:17:06Z","git_url":"git://github.com/morris-jason/vic.git","ssh_url":"git@github.com:morris-jason/vic.git","clone_url":"https://github.com/morris-jason/vic.git","svn_url":"https://github.com/morris-jason/vic","homepage":"http://vmware.github.io/vic","size":63258,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"vmware:master","ref":"master","sha":"572bd3381bb7d5adee3b015929f6764184ca3a99","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars3.githubusercontent.com/u/473334?v=3","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":49597898,"name":"vic","full_name":"vmware/vic","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars3.githubusercontent.com/u/473334?v=3","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/vic","description":"Integrated containers engine on vSphere","fork":false,"url":"https://api.github.com/repos/vmware/vic","forks_url":"https://api.github.com/repos/vmware/vic/forks","keys_url":"https://api.github.com/repos/vmware/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/vic/teams","hooks_url":"https://api.github.com/repos/vmware/vic/hooks","issue_events_url":"https://api.github.com/repos/vmware/vic/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/vic/events","assignees_url":"https://api.github.com/repos/vmware/vic/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/vic/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/vic/tags","blobs_url":"https://api.github.com/repos/vmware/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/vic/languages","stargazers_url":"https://api.github.com/repos/vmware/vic/stargazers","contributors_url":"https://api.github.com/repos/vmware/vic/contributors","subscribers_url":"https://api.github.com/repos/vmware/vic/subscribers","subscription_url":"https://api.github.com/repos/vmware/vic/subscription","commits_url":"https://api.github.com/repos/vmware/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/vic/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/vic/merges","archive_url":"https://api.github.com/repos/vmware/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/vic/downloads","issues_url":"https://api.github.com/repos/vmware/vic/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/vic/labels{/name}","releases_url":"https://api.github.com/repos/vmware/vic/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/vic/deployments","created_at":"2016-01-13T19:53:57Z","updated_at":"2017-05-31T10:34:16Z","pushed_at":"2017-05-31T17:06:04Z","git_url":"git://github.com/vmware/vic.git","ssh_url":"git@github.com:vmware/vic.git","clone_url":"https://github.com/vmware/vic.git","svn_url":"https://github.com/vmware/vic","homepage":"http://vmware.github.io/vic","size":64692,"stargazers_count":242,"watchers_count":242,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":100,"mirror_url":null,"open_issues_count":795,"forks":100,"open_issues":795,"watchers":242,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/5233"},"html":{"href":"https://github.com/vmware/vic/pull/5233"},"issue":{"href":"https://api.github.com/repos/vmware/vic/issues/5233"},"comments":{"href":"https://api.github.com/repos/vmware/vic/issues/5233/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/vic/pulls/5233/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/vic/pulls/5233/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/vic/statuses/6b5560717b1ecb50d6a94a3dc5e05559b372c71c"}}}}
{"actor":{"display_login":"jzt"}}